Special scale computer drawing method for scutcheon
Technical field
The present invention relates to a kind of pattern drawing method, relate in particular to a kind of special scale computer drawing method for scutcheon, 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 is produced after printing film.Prior art has been done some improvement to the label software for drawing, based on the AutoCAD mapping software, draws label with the method for the parameters of input label circular arc, scale mark, scale value, has improved work efficiency.But to some special instrument label, its main part is a circular arc or many arcs, the scale mark of every circular arc is not conventional line segment, but some special graph, simple as circle, triangle etc., complexity as special graph that little line segment is arranged on rhombus, annulus, all kinds of arrow, the triangular apex, segment etc.Tensimeter label for example shown in Figure 1, the scale of its inside arc are common triangles, and the scale of lateral arcs is the triangle that the summit has little short line segment.There is following problem when drawing this type of label, at first, can realize with clearer and more definite figures of parameter such as the parametrization method for drafting draw circles of routine, triangles, but complicated figure can't obtain the parameter of figure at all, therefore can't draw by the parametric method of routine; Secondly, draw, draw,, have tens kinds, also have hundreds of because the kind of scale graph is unknown but can not all make program module to all scale graph types even all scale graph can obtain parameter.And label enterprise work personnel must go out the anglec of rotation of scale graph according to the deflection angle hand computation of scale when drawing, the scale graph of duplicating needs one by one is to the relevant position, carrying out scale graph more manually rotates, make certain summit of scale graph point to the center of circle, this manual operations descends levels of precision greatly, so draughtsman's workload is very big when drawing this class label at present, work efficiency is not high.
Summary of the invention
The object of the present invention is to provide a kind of special scale computer drawing method for scutcheon, the scale that solves existing label method for drafting is drawn can only be based on line segment, can't draw various special graphs with complex parameters as the scale and the technical matters of carrying out automatic deflection.
Purpose of the present invention is achieved by the following technical programs:
A kind of special scale computer drawing method for scutcheon may further comprise the steps:
1) deflection method and the initial parameter of selection scale mark, initial parameter comprises the scale mark center of circle, radius, start angle, termination point, large, medium and small scale mark spacing parameter;
2) carry out cycle calculations according to above-mentioned parameter, obtain the anchor point (L point) and the deflection angle of each scale graph of circular arc, obtain the anglec of rotation (angle [alpha]) that the figure fixed vertices is pointed to the circular arc center of circle according to deflection angle again, and the L point and the angle [alpha] of each scale graph are preserved in parameter list;
3) inquiry tick mark type;
4) if the inquiry result of step 3) is conventional figure scale, then import the parameter list of the large, medium and small scale of conventional figure respectively;
5) on the anchor point (L point) of each scale graph, draw out this scale graph according to the parameter of the large, medium and small scale of conventional figure respectively;
6) according to the anglec of rotation (angle [alpha]) that calculates scale graph is rotated, make its fixed vertices aim at the circular arc center of circle, forward step 18 after the end to);
7) if the inquiry result of step 3) is the segment scale, then import segment in system's appointed positions;
8) convergent-divergent duplicates the segment of required large, medium and small scale, and deposits in respectively in high range, middle scale, the down scale choice set, forwards step 13) then to;
9), then draw the special graph of circular arc high range position and deposit in the high range choice set in appointed positions (A point) according to the requirement of label if the inquiry result of step 3) is the special graph scale;
10) scale, scaling that down scale is relative with high range in the input;
11) according to the figure of scaling scale in relevant position (B point) conversion goes out and in depositing in the scale choice set;
12) (C point) conversion goes out the figure of down scale and deposits in the down scale choice set in the relevant position according to scaling;
13) various calibration parameters are taken out in circulation in parameter list, and judge whether circulation finishes;
14) if judging circulation, step 13) do not finish then to carry out respectively the drafting of large, medium and small scale, if judge that loop ends then forwards step 18 to);
15) method for drafting of high range travels through the high range choice set for obtaining behind the high range parameter list, and circulation obtains all objects in the choice set, is center anglec of rotation α with the A point all with each object; Travel through the high range choice set again, circulation obtains all objects in the choice set, and all object tools in the choice set are arrived on the anchor point (L point) of this high range figure; Travel through the high range choice set then, circulation obtains all objects in the choice set, is center rotation-α angle with the A point all with each object, makes the original angle of object recovery in the choice set; Get back to step 13) at last;
16) method for drafting of scale is scale choice set in the calibration parameters tabulation back traversal in obtaining in, and circulation obtains all objects in the choice set, is center anglec of rotation α with the B point all with each object; Scale choice set in the traversal again, circulation obtains all objects in the choice set, and on the anchor point L point with the scale graph in this of all object tools in the choice set; Scale choice set in traveling through then, circulation obtains all objects in the choice set, is center rotation-α angle with the B point all with each object, makes the original angle of object recovery in the choice set; Get back to step 13) at last;
17) method for drafting of down scale travels through the down scale choice set for obtaining behind the down scale parameter list, and circulation obtains all objects in the choice set, is center anglec of rotation α with the C point all with each object; Travel through the down scale choice set again, circulation obtains all objects in the choice set, and with all object tools in the choice set to the anchor point L point of this down scale figure; Travel through the down scale choice set then, circulation obtains all objects in the choice set, is center rotation-α angle with the C point all with each object, makes the original angle of object recovery in the choice set; Get back to step 13) at last and finish special scale drafting.
Compared with prior art, the invention has the beneficial effects as follows: improved existing label method for drafting, except drawing scale, can also draw out the special graph of complex parameters and segment as scale and carry out automatic deflection based on line segment, reduce the drafting time, improved work efficiency.
Description of drawings
Fig. 1 is a kind of tensimeter label figure;
Fig. 2 is the tensimeter label with special graph scale of completing with this method;
Fig. 3 is a program flow diagram of the present invention.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments.
The sign manufacturing system generally forms with computing machine and laser photocomposing machine by drawing, computing machine and film setter be interconnected to carry out communication, computing machine will be drawn the file layout that good label graphic file converts to the laser photocomposing machine compatibility and output to film setter, and film setter is produced after printing film.The present invention utilizes ObjectARX2008 to carry out secondary development at AutoCAD2008, improved existing label method for drafting, except drawing scale based on line segment, can also draw out the special graph of complex parameters and segment as scale and carry out automatic deflection, reduce the drafting time, improved work efficiency.
As shown in Figure 3, the present invention includes following steps:
1) at first selects the deflection method of scale mark, common scale mark deflection method comprises divides equally scale method, uneven scale division method, and uneven scale division method has two kinds of situations according to the calibration parameters table of receiving from label client enterprise, a kind of is directly to carry out deflection according to certain angle, also has a kind of skew multiple of the scale according to a certain fixing, the arc divided equally to carry out deflection as parameter; Next imports initial parameter, and initial parameter comprises the scale mark center of circle, radius, start angle, termination point, the spacing parameter of large, medium and small scale mark;
2) carry out cycle calculations according to above-mentioned parameter, obtain each scale graph of circular arc and comprise large, medium and small scale anchor point L point and deflection angle separately, obtain the anglec of rotation α that this scale graph fixed vertices is pointed to the circular arc center of circle according to deflection angle separately again, and the L point and the angle [alpha] of each scale graph preserved in parameter list, therefore have what scales that what L point and angle [alpha] are just arranged, all deposit in the parameter list;
3) inquiry tick mark type, tick mark type comprises conventional figure, special graph and segment, conventional graphics package vinculum section, circle, triangle etc. can be used the figure of parametric description, special graph comprises rhombus, rectangle, tensimeter label as shown in Figure 1, the scale of its lateral arcs is that the triangle that the summit has a little short line segment also belongs to this type of, and segment is the figure of some special shapes of providing of label factory;
4) if the inquiry result of step 3) is conventional figure scale, then import the parameter list of the large, medium and small scale of conventional figure respectively;
5) on the anchor point (L point) of each scale graph, draw out this scale graph according to the parameter of the large, medium and small scale of conventional figure respectively;
6) according to step 2) the scale graph fixed vertices that calculates points to the circular arc center of circle anglec of rotation (angle [alpha]) with the scale graph rotation, makes its fixed vertices aim at the circular arc center of circle, forwards step 18 after the end to);
7), then import segment in certain position of system's appointment if the inquiry result of step 3) is the segment scale;
8) according to the proportional zoom between the large, medium and small scale and duplicate the segment of required large, medium and small scale, and deposit in respectively in high range, middle scale, three choice sets of down scale, forward step 13) then to;
9) if the inquiry result of step 3) is the special graph scale, then the figure that requires according to label is drawn the special graph of circular arc high range and is deposited in the high range choice set at certain assigned address (A point);
10) scale, scaling that down scale is relative with high range in the input;
11) according to the figure of scaling scale in corresponding B point evolution goes out and in depositing in the scale choice set;
12) go out the figure of down scale and deposit in the down scale choice set at corresponding C point evolution according to scaling;
13) various calibration parameters are taken out in circulation in parameter list, the spacing parameter that comprises large, medium and small scale, each scale anchor point L point and deflection angle α separately, and judge whether circulation should finish, the parameter that promptly judges whether each scale is all taken out and is completed;
14) if judging circulation, step 13) do not finish then to carry out respectively the drafting of large, medium and small scale, if judge that loop ends then forwards step 18 to);
15) method for drafting of high range travels through the high range choice set for obtaining behind certain high range parameter list, circulation obtains all objects in the choice set, promptly forming all graphic elements of special graph in the choice set or segment, is center anglec of rotation α with the A point all with each object; Travel through the high range choice set again, circulation obtains all objects in the choice set, and with all object tools in the choice set to the anchor point L point of this high range figure; Travel through the high range choice set then, circulation obtains all objects in the choice set, with each object is center rotation-α angle with the A point all, make the original angle of object recovery in the choice set, its objective is the rotation that makes next scale still from initial position, otherwise next scale can carry out the rotation of self anglec of rotation again on the basis of a last scale anglec of rotation α; Get back to step 13) at last;
16) method for drafting of scale is scale choice set in the calibration parameters tabulation back traversal in obtaining in, and circulation obtains all objects in the choice set, is center anglec of rotation α with the B point all with each object; Scale choice set in the traversal again, circulation obtains all objects in the choice set, and on the anchor point L point with the scale graph in this of all object tools in the choice set; Scale choice set in traveling through then, circulation obtains all objects in the choice set, is center rotation-α angle with the B point all with each object, makes the original angle of object recovery in the choice set; Get back to step 13) at last;
17) method for drafting of down scale travels through the down scale choice set for obtaining behind the down scale parameter list, and circulation obtains all objects in the choice set, is center anglec of rotation α with the C point all with each object; Travel through the down scale choice set again, circulation obtains all objects in the choice set, and with all object tools in the choice set to the anchor point L point of this down scale figure; Travel through the down scale choice set then, circulation obtains all objects in the choice set, is center rotation-α angle with the C point all with each object, makes the original angle of object recovery in the choice set; Get back to step 13) at last and finish special scale drafting.
This method is used to draw special graph scale and the segment scale with complex parameters, the main circular arc and the scale value of label can be used existing method, shown in Figure 2 is the tensimeter label with special graph scale of completing with this method, the scale of its inside arc is common triangle, and the scale of lateral arcs is the triangle that the summit has little short line segment.
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.