Line cut machine tool implements the technology of automatic process designing of cut Chinese character

  • Time:
  • Click:413
  • source:WEDEMEYER CNC Machining
Because we need the attrib border outline of label glyph only, accordingly its translate into 2 values image can. glyph outline translate into 2 values image, namely its translate into uses matrix image of denotive dot elephantine element, in matrix each it is binary number, it is when this 1 when the stroke that shows character passes this, this are 0 when the stroke that shows character does not pass this. Because want resolution to go out some a little bit to be only 0 or 1, because this is nodded every,should use a binary number to express only can, a such byte can state 8 elephants element is nodded, but narrate this literary grace in order to to go to the lavatory a byte states 1 is nodded will undertake demonstrative. Want glyph outline translate into 2 values image, above all the basis needs (like size of font, dimension, aspect ratio, whether to rotate, be out of shape etc) the glyph rough sketch that on screen scale gives place to want cut character; Undertake scanning to the graph next, the place that will stroke is passed (correspondence resembles element at be the same as with photograph of character facial expression) value buy is 1, and of other choose a place for 0, after scanning ends glyph outline translate into 2 values image. After creating 2 values image, still need to undertake proper modification to image, in order to satisfy the need that line cut machines. Undertake editing handling to image, can replace a magnified elephant element with a small diamonds, edit an area through building reseau, each reseau small diamonds is a magnified elephant element, can undertake editing handling like element to every so, control mouse fills character or setting color inside relevant reseau key point, the seat that fills correspondence of place of character facial expression at the same time is 1, the seat that fills correspondence of setting color place is 0. Cut dictates generate the glyph outline translate into the Chinese character 2 values image and after the editor is handled, to make cut the instruction must be used linear or circular arc has a description to its, because Chinese character glyph suits to use relatively,have a description to its point-blank, because this uses straight line segment,will realize the description of pair of Chinese character glyphs. As a result of line cut machine can the graph of cut has certain specific characteristics (need to be able to draw) with brushstroke namely, because this needs only,use some kind of algorithm to undertake alling over all previous to the graph attainable treatment contrail. Want to have one by one to image, need to search strategy certainly above all. Because can be had by the graph of cut characteristic, use improved deepness preferential search method will have one by one to image. Main idea is: Decide the initial drop of image first, be in along anticlockwise direction next should search all round the dot below a bit, the determined at 2 o'clock along this direction after finding continues to search, till the dot on this direction the search ends, next backdate, the point that gains with backdate repeats above search for the foundation, till all dots had been searched, the value of the point that in the search process lieutenant general passes is from 1 buy 0, what record a course at the same time is linear. The main data structure that place should use introduces below. What the record uses a structure to be TLineRecord point-blank, it uses the start that records line of every Duan Zhi and terminal coordinate, its define as follows: TLineRecord=record StartPoint, endPoint: TPoint; // is linear and bit more initiative, stop TLineRecord of bit of End; PLineRecord= ^ ; Among them StartPoint, endPoint is sharp starting point and terminus respectively. Image uses 2 dimension group to undertake expression, find the initiative place of image to large order as a child according to travel, row above all, use anticlockwise square all along again next below the search a bit. The definition that searchs direction is: SearchDirection:aRray [0.

.

7, 0.

.

1] Of Interger=((1, 0) , (1, - 1) , (0, - 1) , (- 1, - 1) , (- 1, 0) , (- 1, 1) , (0, 1) , (1, 1)) ; The algorithm that all over all previous is as follows: (1) scanning image seeks initial drop, its coordinate is written down for (K, 1) ; Record the cost of the a bitth horizontal stroke, ordinate with FirstPointX, FirstPointY; (2) initialization records linear finger, build the catenary list with sharp record; bit more initiative K, 1 value serves as sharp starting point and terminal horizontal stroke, ordinate, the chain that joins this linear record point-blank goes in the watch; (3) with the a bitth search along anticlockwise direction for datum mark below a bit, if search a value to write down search direction to be I for the dot of 1, horizontal stroke of this bits, ordinate is written down for (K, 1) , the record setting of linear terminal horizontal stroke, ordinate is K, 1; (Whether does 4) buy search ending mark SearchCompleted to if SearchCompleted does not repeat 6-13 situation for True,be False; (5) ; (6) buy SearchCompleted is True; (7) place is same a line mark SameLine for True; (8) if SameLine repeats 9-12 situation for True; (SameLine is 9) buy False; (Direction of 10) edge I undertakes searching, namely K:=K+SearchDirection [I] [0] ;1:=1+SearchDirection [I] [1] if; (11) is nodded (K, 1) is 1, criterion SameLine is buy True; linear terminal coordinate the setting is (K, 1) ; Will nod (K, the value setting of 1) is 0; (If 12) is nodded (K, 1) is 0, criterion SameLine is buy False; (13) in order to nod (K, 1) is searched along anticlockwise direction for datum mark below a bit, if search a value to be the dot of 1, write down search direction to be I; One increases in recording list point-blank new linear, k, 1 value serves as the horizontal stroke of sharp starting point, ordinate; The horizontal stroke of the point that reachs the search, ordinate is written down for (K, 1) , the horizontal stroke of linear terminus, ordinate the setting is (K, 1) ; Buy Searhcompleted is False, sameLine is buy True; Will nod (K, the value setting of 1) is 0; (14) undertakes the graph closes change processing, one increases in recording list point-blank linear, k, 1 value serves as the horizontal stroke of sharp starting point, ordinate, firstPointX, FirstPointY regards the horizontal stroke of linear terminus, ordinate as the value. After should alling over all previous to finish so, ergodic orbit is saved be in linear record list, already came true to used the glyph rough sketch of the Chinese character linear Duan Jin to be described all right that is to say. Those who need to point out is, because itself of Chinese character glyph perhaps edits the reason of processing, having picture ergodic in the process, the likelihood exists a few disharmonious dot, make all previous cannot be finished (the circumstance) that reachs redundant point like existence breakpoint, sharp drop, the skill that needs to apply image to handle before alling over all previous nods these complemental or eliminate is dropped, finish in order to make one by one can great, the algorithm that concerns this respect no longer give uncecessary details. Should realize cut Chinese character to leave the question that how makes cut statement only so far. Because already used the glyph rough sketch of the Chinese character,have a description point-blank, and these return from beginning to end point-blank conterminous composition closes outline, want to generate the cut of line cut machine to dictate, the requirement that needs to dictate by cut only has these transition point-blank can. Last word the article introduced to draw glyph rough sketch from inside Chinese character font, its after undertaking editing handling translate into cut dictates, the technology of automatic process designing of cut Chinese character implements on online cut machine thereby. It can make line cut machine implements the cut of the Chinese character simply conveniently, still can undertake all sorts of processing to wanting the Chinese character of cut. Carry out a proof, use this kind of method to be able to satisfy need well, and obtain better result. CNC Milling