Label curve literal method for drafting
Technical field
The present invention relates to a kind of label method for drafting, relate in particular to a kind of label curve literal method for drafting, belong to printing technology.
Background technology
Along with computing machine popularizing in factory, more and more enterprises uses CAD software to draw, in the sign manufacturing technological process of label factory, the general label figure that will need to make with the CAD mapping software is earlier drawn good in computing machine and preservation, the file layout that then the label graphic file is converted to the laser photocomposing machine compatibility outputs to film setter, and film setter prints the laggard rower board of film to be manufactured.
Prior art has been done some improvement to the label method for drafting, generally be based on the AutoCAD mapping software, draw comment in label and the label with the method for the parameters of input label circular arc, scale mark, scale value, improved work efficiency on the original basis.But having some comments in the label is curve literal, requires to show that along certain circular arc what the font height of curve literal had will seek unification, and the requirement that has from big to small or gradual from small to large variation.Bother very much when drawing the curve literal of highly gradual variation in AutoCAD software, character is drawn one by one one by one, manual again its position of adjusting one by one.So draughtsman's workload is very big when drawing label curve literal at present owing to staff's manual operations, work efficiency is not high.Simultaneously, utilize manual location to cause the curve literal to draw the out of true of position, label is drawn the quality of making and be can not get guaranteeing.
Summary of the invention
The object of the present invention is to provide a kind of label curve literal method for drafting, solving the curve plotting literal needs manual operations to cause that draughtsman's workload is big, work efficiency is not high, and the location causes the curve literal to draw the position out of true by hand, influences the problem of label quality.
Purpose of the present invention is achieved by the following technical programs:
A kind of label curve literal method for drafting may further comprise the steps:
(1) determines and the center of circle, radius, start angle, the termination point of input path, label curve literal place arc;
(2) text style of trade-off curve literal, input text font starting altitude h1, termination height h2;
(3) the curve word content that will draw is inserted among the character string s;
(4) determine the sense of rotation of curve literal, from vertical, to the center of circle, oppositely the center of circle and self-defined selection a kind of;
(5) obtain each character of character string s and record one-dimension array S[n by the circulation of Get function] in, n is the capacity of one-dimension array, and obtains array length length;
(6) calculate the actual deflection angle angle of each character in the array respectively according to start angle, termination point, array length length;
(7) according to initial font height h1, stop the true altitude h[i that height h2, array length length calculate each character in the array respectively];
(8) sense of rotation and the deflection angle according to the front calculates each character S[i respectively] the anglec of rotation and preserve;
(9) the deflection angle angle according to the center of circle, radius and each character of the path arc of curve literal calculates this character actual location point respectively, this anchor point be each character upper left angle point Point2d (x, y);
(10) according to the height h[i of each character], font parameter with the mode of multirow literal character locating put Point2d (x y) draws array S[n one by one on the position] each element S [i];
(11) according to the anglec of rotation parameter of each character each character is rotated corresponding angle respectively, the curve literal is completed.
Purpose of the present invention can also further realize by following technical measures:
A kind of label curve literal method for drafting, the anglec of rotation to center of circle mode in the described step (8) is that deflection angle subtracts 90 degree, oppositely the anglec of rotation of center of circle mode is that deflection angle adds 90 degree, vertical mode and self-defined mode need not be calculated, vertical mode is 90 degree, and self-defined angle is the anglec of rotation.
Compared with prior art, the invention has the beneficial effects as follows: having solved the curve literal that existing label rendering technique rendered fonts height do not wait needs manual operation, curve literal one by one locate coarse technical matters, reduce the drafting time, improved work efficiency, guaranteed the sign manufacturing quality.
Description of drawings
Fig. 1 is an embodiment master drawing of label curve literal;
Fig. 2 process flow diagram of the present invention.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, the label curve text parameter that present embodiment will be drawn is as follows: curve type path arc central coordinate of circle (0,0), radius 50mm, start angle 220 degree, termination point 320 degree, word content " the professional enterprise of Chinese sign manufacturing ", font is an imitation Song-Dynasty-Style typeface, and sense of rotation is the reverse center of circle, the literal height from 10mm to 20mm equal difference gradual change.
The present invention draws out the label of curve literal automatically for the parameters of curve literal in the energy Identifiaction plates, utilizes ObjectARX2008 to carry out secondary development at AutoCAD2008, has improved existing label method for drafting, and as shown in Figure 2, concrete steps are:
(1) determines and home position, radius, start angle, the termination point of input path, label curve literal place arc, be specially central coordinate of circle (0,0), radius 50mm, start angle 220 degree, termination point 320 degree;
(2) text style of trade-off curve literal is an imitation Song-Dynasty-Style typeface, input text font starting altitude h1=10mm, termination height h2=20mm;
(3) the curve word content that will draw " the professional enterprise of Chinese sign manufacturing " is inserted among the character string s;
(4) determine the sense of rotation of curve literal, from vertical, to the center of circle, oppositely the center of circle and self-defined selection a kind of, present embodiment is the reverse center of circle;
(5) obtain each character of character string s and record one-dimension array S[n by the circulation of Get function] in, n is the capacity of one-dimension array, and obtains array length length, the present embodiment array length is 10;
(6) calculate the actual deflection angle angle of each character in the array respectively according to start angle, termination point, array length length, the deflection angle difference of adjacent two characters is: (termination point-start angle) ÷ (array length-1);
(7) according to initial font height 10mm, stop the true altitude h[i that height 20mm, array length 10 calculate each character in the array respectively], to 20mm equal difference gradual change, the difference of two adjacent literal height is: (20-10) ÷ 9 from 10mm for present embodiment literal height;
(8) sense of rotation and the deflection angle according to the front calculates each character S[i respectively] the anglec of rotation and preserve, the anglec of rotation of the reverse center of circle of present embodiment mode is that deflection angle adds 90 degree;
(9) the deflection angle angle according to the center of circle, radius and each character of the path arc of curve literal calculates this character actual location point respectively, this anchor point be actually each character upper left angle point Point2d (x, y);
(10) according to the height h[i of each character], font parameter with the mode of multirow literal among the CAD character locating put Point2d (x y) draws array S[n one by one on the position] each element S [i];
(11) according to the anglec of rotation parameter of each character each character is rotated corresponding angle respectively, the curve literal is completed.
Next can carry out the drafting of label other parts, carry out color separation and makeup again, use film setter to print to publish picture after the plate-making flow process is finished and print.
In addition to the implementation, the present invention can also have other embodiments, and all employings are equal to the technical scheme of replacement or equivalent transformation formation, all drop in the protection domain of requirement of the present invention.