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 make with the CAD mapping software is earlier drawn good in computing machine and is preserved, and the label graphic file is converted to the compatible file layout of laser photocomposing machine output to film setter then, 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; Method with the parameters of input label circular arc, scale mark, scale value is drawn the comment in label and the label, has 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 in AutoCAD software, drawing the curve literal of highly gradual variation, 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 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.
The object of the invention is achieved through following technical scheme:
A kind of label curve literal method for drafting may further comprise the steps:
(1) definite and input label curve literal belongs to the center of circle, radius, start angle, the termination point of path 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) confirm the sense of rotation of curve literal, from vertical, to the center of circle, the reverse center of circle and self-defined selection a kind of;
(5) obtain each character of character string s through Get function circulation and record among the one-dimension array S [n], 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) calculate the anglec of rotation of each character S [i] respectively according to said sense of rotation and deflection angle angle 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) (x y) draws each element S [i] of array S [n] one by one on the position to put Point2d with the mode of multirow literal in character locating according to the height h [i] of each character, font parameter;
(11) according to the anglec of rotation parameter of each character each character is rotated corresponding angle respectively, the curve literal is completed.
The object of the invention can also further realize through following technical measures:
A kind of label curve literal method for drafting; The anglec of rotation to center of circle mode in the said step (8) is that deflection angle subtracts 90 degree; The anglec of rotation of reverse center of circle mode is that deflection angle adds 90 degree; Vertical mode and self-defined mode need not be calculated, and 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
Below in conjunction with accompanying drawing and specific embodiment the present invention is described further.
As shown in Figure 1, the label curve text parameter that present embodiment will be drawn is following: 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 ability Identifiaction plates, utilizes ObjectARX2008 to be directed against AutoCAD2008 and carries out secondary development, has improved existing label method for drafting, and as shown in Figure 2, concrete steps are:
(1) definite and input label curve literal belongs to home position, radius, start angle, the termination point of path arc, is 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) confirm the sense of rotation of curve literal, from vertical, to the center of circle, the reverse 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 through Get function circulation and record among the one-dimension array S [n], n is the capacity of one-dimension array, and obtains array length length, and 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) calculate the anglec of rotation of each character S [i] respectively according to said sense of rotation and deflection angle angle 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) (x y) draws each element S [i] of array S [n] one by one on the position to put Point2d with the mode of multirow literal among the CAD in character locating according to the height h [i] of each character, font parameter;
(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 other part of label, carry out color separation and makeup again, use film setter to print to publish picture after the plate-making flow process is accomplished and print.
Except that the foregoing description, 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.