Summary of the invention
The embodiment of the present invention provides profile and the extracting method of angle point information in a kind of pcb board design drawing, to solve
The problem that extraction degree of accuracy of the prior art is poor.
In order to solve above-mentioned technical problem, the embodiment of the invention discloses following technical scheme:
Profile and the extracting method of angle point information in a kind of pcb board design drawing, comprise the following steps:
Obtain the CAM data of pcb board design drawing;
Resolve described CAM data, determine all of drafting item and drawing order, the kind of described drafting item and drawing order
Corresponding with described pcb board design drawing;
According to described drawing order, extract each successively and draw item coordinate information in described pcb board design drawing;
According to described drawing order, utilize vector aperture according to the track of the movement of described coordinate information, by each
Drawing item and be converted into closing vector graphics, described closing vector graphics carries figure polarity information;
According to described transforming sequence, judge the figure polarity information of described closing vector graphics successively, by transforming sequence phase
Even and the identical closing vector graphics of figure polarity divides one group into, utilize accelerated graphics Boolean calculation algorithm, obtain described PCB
The profile of plate design drawing and angle point information, wherein, described accelerated graphics Boolean calculation algorithm refers to, first enters figure in each group
Row operation obtains organizing interior operation result, then by computing between operation result group in all of group.
Preferably, in above-mentioned pcb board design drawing in the extracting method of profile and angle point information, the kind of described drafting item
Including straight line, circular arc, multiple polygonal shape and pad.
Preferably, in above-mentioned pcb board design drawing in the extracting method of profile and angle point information, paint according to described described
System order, extracts successively after each draws item coordinate information in described pcb board design drawing and also includes, determine described vector light
The radius of circle, the diameter of described vector aperture is identical with the width drawing item.
Preferably, in above-mentioned pcb board design drawing in the extracting method of profile and angle point information, described according to described drafting
Sequentially, utilize the track that vector aperture moves according to described coordinate information, each drafting item is converted into closing vectogram
Shape, described closing vector graphics carries figure polarity information and includes:
Each drafting item is decomposed into drafting unit successively, is utilized respectively the movement according to described coordinate information of the vector aperture
And the track formed, described drawing unit is converted into closing vector graphics unit, described closing vector graphics unit forms institute
Stating closing vector graphics, wherein drawing unit includes for circle, rectangle, polygon and/or circle rectangle.
Preferably, in above-mentioned pcb board design drawing in the extracting method of profile and angle point information, utilize vector light described
The track that circle moves according to described coordinate information, according to described drawing order, is converted into closing vector by each drafting item
Figure, after described closing vector graphics carries figure polarity information, also includes:
By described closing vector graphics subregion, parallel described accelerated graphics Boolean calculation between each district, obtain described
The profile of pcb board design drawing and angle point information.
Preferably, in above-mentioned pcb board design drawing in the extracting method of profile and angle point information, described accelerated graphics boolean
Computing includes organizing interior boolean's union, also includes between group boolean's difference operation between boolean's union or group.
From above technical scheme, profile and the extracting method of angle point information in the pcb board design drawing that the present invention provides
In, change the mode obtaining PCB design circuit diagram according to CAM literature pictures, draw item according to each in CAM data and carry
Vector data information, each drafting item is converted into the vector graphics of closing, one by one because being from vector data to vectogram
The conversion process of equal value of shape, so this conversion process of equal value is not result in drawing the loss of accuracy of item vector data, and,
Exactly because improving again the algorithm of figure Boolean calculation based on above-mentioned conversion results of equal value, the computing after improvement is keeping
On the premise of the order of graphic operation, utilizing the carrying out of figure self polarity to be grouped, computing in preferential parallel group, next carries out group
Between computing, computing will be converted into batch and calculate one by one, and improve the efficiency of computing.As can be seen here, provide according to the present invention
The profile of PCB design circuit that obtains of extracting method and angle point information, comparing for utilizing current extracting method is more
Accurately.
Detailed description of the invention
For the technical scheme making those skilled in the art be more fully understood that in the present invention, real below in conjunction with the present invention
Execute the accompanying drawing in example, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described enforcement
Example is only a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, this area is common
The every other embodiment that technical staff is obtained under not making creative work premise, all should belong to present invention protection
Scope.
In the CAM data of PCB design figure, generally comprise following kind of drafting item, have straight line, circular arc, multiple polygonal shape,
(standard circular pad is exactly a circle closed, and inside may be little containing one for standard circular pad, standard rectangular pad
Circular or square hole), standard round rectangular pads (standard rectangular pad be exactly one close rectangle, inside may contain
(regular polygon pad is exactly the envelope of a band anglec of rotation a little circle or square hole, regular polygon pad
Closing regular polygon, a little circle or square hole may be contained in inside), self-defined circular pad be exactly a circle
Shape, inside does not contains hole, (central straight line style pad is with center-width-highly-anglec of rotation for central straight line style pad
The linear type pad of formal definition), vector type pad (vector type pad with start-stop position-width-anglec of rotation formal definition
Linear type pad), lower-left angle-style straight line pad (straight with lower left corner coordinate-width-highly-rotation angle parameter definition
The linear type pad of line formal definition), foreign steamer profile pad (with a starting point, profile point sum (most 50 points) and
The shape of one of the X/Y coordinate definition of each point closing), special polygon pad is (with summit quantity (3~10), centre bit
Put, the centrosymmetric regular polygon of circumscribed circle diameter, anglec of rotation definition), the ripple type pad (circle symmetrical by a group switching centre
Ring and cross hairs composition shape, by number of rings, circumscribed circle diameter, cross hairs live width, cross hairs length, the anglec of rotation,
The definition of the parameter such as the spacing of annulus), heat dissipation bonding pad is (by the annulus figure that constitute tangent with concentric cross hairs, it is known that external diameter, interior
Footpath, cross hairs live width, the relative X-axis anglec of rotation, center point coordinate) etc..
Below as a example by a pcb board design drawing, profile and angle point information in the pcb board design drawing that the present invention is provided
Extracting method explains.Above-mentioned various composition pcb board design drawinies draw item, according to the coordinate feature of self, all can by with
The similar mode of lower example extracts respective angle point and profile information.
Seeing Fig. 1, a kind of pcb board design drawing provided for the embodiment of the present invention, the CAM data for this pcb board solves
Analysis, as it is shown in figure 1, the drafting item obtaining this pcb board includes straight line 1, circular arc 2, straight line 3, standard circular pad 4 and circle rectangle weldering
Dish 5, for apparent display straight line, the width of circular arc and the size of pad, uses the form of filling to represent, draws in Fig. 1
Order is followed successively by straight line 1 circular arc 2 straight line 3 circular pad 4 circle rectangular pads 5, according to drawing order, extracts each successively
Individual drafting item coordinate information on this pcb board, the coordinate system X axis right side is just, is just under Y-axis:
For straight line 1, obtain starting point coordinate (-20,20), terminal point coordinate (-20,0);
For circular arc 2, obtain central coordinate of circle (0,0), start angle 180, termination point 270;
For straight line 3, obtain starting point coordinate (0 ,-20), terminal point coordinate (20 ,-20);
According to the positive and negative definition of coordinate system, the polarity for straight line 1, circular arc 2 and straight line 3 is positive polarity.
According to drawing order straight line 1-circular arc 2-straight line 3, vector aperture is utilized to form according to the movement of described coordinate information
Track, by each drafting item be converted into closing vector graphics specifically refer to:
For same pcb board, the polarity closing vector graphics of the formation that the moving direction of aperture is identical is consistent, light
The opposite polarity of the vector graphics of the different formation of moving direction of circle.Coordinate from straight line 1, circular arc 2 and straight line 3 can
Going out, the polarity closing vector graphics that three converts is consistent, and we are defined as positive polarity.For straight line 1, it it is one
There is the straight line of one fixed width, it is possible to use circular iris 11 is according to the motion track playing terminal of straight line 1, by 1 turn of straight line
Turning to the vector graphics closed, conversion process and result are as shown in Figure 2.Fig. 2 A is conversion process schematic diagram, dashed circle in figure
Representing the motion track of aperture, Fig. 2 B is conversion results, and the conversion results of straight line 1 is the closing vector of an endless track pattern
Figure.The conversion process of straight line 3 is similar to, and this does not describes in detail.Fig. 3 A and Fig. 3 B is respectively conversion process and the result of circular arc 2.By scheming
1-Fig. 4 understands, and when drafting item is converted into closing vector graphics, will determine the radius of described vector aperture, described vector light
The radius of circle is identical with the width drawing item, thus can ensure that, the profile closing vector graphics obtained and drafting item
Profile is consistent.The vector aperture of visible line 1, circular arc 2 and straight line 3 is circular iris 11, and the diameter of circular iris used
Equal.A diameter of the 5 of circular iris 11.
Refer to Fig. 5, Fig. 5 and show that round pad 4 is converted into the process closing vector graphics.For round pad 4
Speech, is the inside pad that contains a little circular opening.The concentric circular of two different-diameters can be broken down into certainly
Definition pad 401 and 402 is for drawing unit, and round pad 4 is a drafting item after the combination of the two self-defined pad.In order to
Item and the size of drawing unit are drawn in display, and Fig. 5 is shown as filling forms, the part of filling just represent circular pad 4 at PCB
Etched width in design circuit.The coordinate information of two drawing units is respectively as follows: center and is (40 ,-20), self-defined pad
401 utilize the track that circular iris 22, self-defined pad 402 utilize circular iris 33 to move according to described coordinate information,
All it is converted into the equal diameters of diameter and the circular iris 11 closing vector circular trace, wherein circular iris 33, is 5, circle
A diameter of the 10 of shape aperture 22.
Then the two obtained is closed vector circle and carries out Boolean calculation according to polarity, obtain drawing item disk 5
Boolean calculation result, closes the opposite polarity that vector is circular for two, it should do boolean's difference operation.
The conversion process of similar above-mentioned circular pad 4, circle rectangular pads 5 is that a little square hole is contained in an inside
Pad.It is that being broken down into two pads is drawing unit that circle rectangular pads 5 draws the conversion process of item, draws single for one
Unit is the internal standard round rectangular pads 501 without hole, and a drawing unit is regular polygon pad 502.Utilize circle rectangle
Inside is converted into closing vector circle rectangle without the standard round rectangular pads 501 of hole by aperture 44, and the coordinate information of foundation is
Center (30,20), circle rectangle aperture 44 a width of 20, a height of 10;Utilize rectangle aperture 55 that regular polygon pad 502 is converted into envelope
Close vector square, rectangular light, 55 wide and high be 5.
Then according to inside drawing order straight line 1-circular arc 2-straight line 3-self-defined pad 401-self-defined pad 402-not
With the standard round rectangular pads 501 regular polygon pad 502 of hole, after conversion of equal value, figure polarity respectively is n-
N-Negative-Positive-Negative-negative, according to transforming sequence, by straight line 1 identical for polarity, circular arc 2 and straight line 3 and the envelope of self-defined pad 401
Close vector graphics and divide first group into, divide the self-defined pad 402 that reversing is negative into second group, polarity is changed again to
Positive inside divides the 3rd group into without the standard round rectangular pads 501 of hole, the regular polygon pad 502 polarity again changed
Dividing the 4th group into, do the interior union of group first with accelerated graphics boolean, Fig. 4 is that cathetus 1, circular arc 2 and straight line 3 are through acceleration figure
Result schematic diagram after the computing of shape Boolean calculation, boolean's difference operation between operation result group in four groups that then will obtain,
To the connected region of each the closing vector graphics corresponding with the design drawing of the pcb board provided in Fig. 1, this connected region shows
In Fig. 6.As shown in Figure 6, the position of arrow is the separation position drawn between item, i.e. corner location, will calculate gained wheel
Wide drawing through filling, gained drawing result is with directly utilize CAM data to carry out drawing the result obtained be consistent.
From above technical scheme, profile and the extracting method of angle point information in the pcb board design drawing that the present invention provides
In, draw, according to each in CAM data, the vector data information that item carries, each drafting item is converted into one by one the arrow of closing
Spirogram shape, because being the conversion process of equal value from vector data to vector graphics, so this conversion process of equal value is not result in
Draw the loss of accuracy of item vector data, and, exactly because improving again figure based on above-mentioned conversion results of equal value
The algorithm of Boolean calculation, the computing after improvement, on the premise of the order keeping graphic operation, utilizes entering of figure self polarity
Row packet, computing in preferential group parallel, next carries out assembly computing, computing will be converted into batch calculating one by one, and improve
The accuracy of computing.As can be seen here, the profile of the PCB design circuit that the extracting method provided according to the present invention obtains and angle point letter
Breath, comparing for utilizing current extracting method is more accurately.
On the basis of technique scheme, it is optimized, especially when pcb board design drawing is relative complex, extracts it
The process of profile and angle point can be at the described track utilizing vector aperture to move according to described coordinate information, according to described
Drawing order, is converted into closing vector graphics by each drafting item, after described closing vector graphics carries figure polarity information, also
Including: by described closing vector graphics subregion, between each district, parallel described accelerated graphics Boolean calculation, obtains described PCB
The profile of plate design drawing and angle point information, improve the speed of Boolean calculation with this.
By the description of above embodiment of the method, those skilled in the art is it can be understood that can to the present invention
The mode adding required general hardware platform by software realizes, naturally it is also possible to by hardware, but a lot of in the case of the former
It it is more preferably embodiment.Based on such understanding, prior art is made tribute by technical scheme the most in other words
The part offered can embody with the form of software product, and this computer software product is stored in a storage medium, bag
Include some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) performs
All or part of step of method described in each embodiment of the present invention.And aforesaid storage medium includes: read only memory
(ROM), the various media that can store program code such as random access memory (RAM), magnetic disc or CD.
The above is only the detailed description of the invention of the present invention, it is noted that for the ordinary skill people of the art
For Yuan, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications also should
It is considered as protection scope of the present invention.