Invention content
To overcome the problems in correlation technique, a kind of profile engraving method of offer of the embodiment of the present invention and device.
In order to solve the above-mentioned technical problem, the embodiment of the invention discloses following technical solutions:
According to a first aspect of the embodiments of the present invention, a kind of profile engraving method is provided, including:
The types of profiles for each contour segment for including is obtained in figure to be etched, wherein the types of profiles includes:Straight line
Section, arc section and circle;
According to the dimensional parameters of each contour segment, experience etch quantity is obtained, and determines that the iris radius r of etching aperture is
The experience etch quantity;
The corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles, and according to the contour segment
Dimensional parameters, profile mask algorithm and the iris radius r calculate the wheel in the compensation etch quantity all same of each contour segment
Wide mask;
It, will be in the figure to be etched by carrying out figure Boolean calculation to each contour segment and the profile mask
The contour segment for including in overlapping region merges, wherein the result obtained after figure Boolean calculation is profile to be etched.
Preferably,
If the types of profiles of the contour segment is straightway, the dimensional parameters of the contour segment are the starting point of the straightway
S and terminal e;
It is described that the corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles, and according to the profile
Dimensional parameters, profile mask algorithm and the iris radius r of section calculate the compensation etch quantity all same in each contour segment
Profile mask, including:
According to the starting point s and terminal e of the straightway, the Euclidean distance d between the starting point s and terminal e is calculated, and count
Calculate the midpoint O of the starting point s and terminal e1And the angle theta of the straightway and x-axis;
Calculate first kind calibration point, wherein the first kind calibration point is:P0(- d/2 ,-r), P1(d/2 ,-r), P2
(d/2, r), P3(- d/2, r), P4(- d/2,0) and P5(d/2,0);
Build directed line segmentWith P5For the oriented circular arc in the center of circleDirected line segmentWith with P4For having for the center of circle
To circular arcThe closed curve of composition;
Centered on origin, the closed curve is rotated into θ angles, and the center translation of postrotational closed curve is arrived
The midpoint O1, the closed curve after translation is the profile mask.
Preferably,
If the types of profiles of the contour segment is circle, the dimensional parameters of the contour segment are the radius R of circle1With center of circle O2
(xa,ya);
It is described that the corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles, and according to the profile
Dimensional parameters, profile mask algorithm and the iris radius r of section calculate the compensation etch quantity all same in each contour segment
Profile mask, including:
If r < R1, one is obtained with the center of circle O2Centered on annular, wherein the boundary of the annular be respectively with
(R1+ r) for the rounded outer profiles of radius and with (R1- r) be radius round Internal periphery, it is described annular be the profile mask.
Preferably,
If the types of profiles of the contour segment is arc section, the dimensional parameters of the contour segment are the start angle of arc section
α1With termination point α2, radius R2With center of circle O3(xc,yc);
It is described that the corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles, and according to the profile
Dimensional parameters, profile mask algorithm and the iris radius r of section calculate the compensation etch quantity all same in each contour segment
Profile mask, including:
If r < R2, and | α1-α2| 2 π of < calculate separately starting point, terminal and the Second Type calibration point of the arc section,
Wherein, the starting point is:Pc1(xc+R2×cosα1,yc+R2×sinα1), the terminal is:Pc2(xc+R2×cosα2,yc+R2×
sinα2), the Second Type calibration point is respectively:P1(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cos
α2,yc+(R2-r)sinα2)、P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)
sinα2);
Structure is with O3For the oriented circular arc in the center of circleWith Pc1For the oriented circular arc in the center of circleWith O3For the oriented of the center of circle
Circular arcWith Pc2For the oriented circular arc in the center of circleThe closed curve of composition, wherein the closed curve is the wheel
Wide mask;
If r=R2, calculate separately starting point, terminal and the third type calibration point of the arc section, wherein the starting point Pc1
For:(xc+R2×cosα1,yc+R2×sinα1), the terminal Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the third
Type calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、
P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)sinα2);
Structure is with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentAnd directed line segmentComposition
Closed figure G1 is built with Pc1For the center of circle, r is the full circle G2 of radius, and structure with Pc2For the center of circle, r is the full circle of radius
G3, and to closed figure G1, full circle G2 and full circle G3 ask the figure Boolean calculation of union, the closed curve obtained after operation
The as described profile mask;
If r > R2, calculate separately starting point, terminal and the 4th type calibration point of the arc section, wherein the starting point Pc1
For:(xc+R2×cosα1,yc+R2×sinα1), the terminal Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the described 4th
Type calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、
P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)sinα2);
Structure is with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentWith O3(xc,yc) it is having for the center of circle
To circular arcAnd directed line segmentThe closed figure G1 of composition is built with Pc1For the center of circle, r is the full circle G2 of radius, and
With Pc2For the center of circle, r is the full circle G3 of radius, and to closed figure G1, full circle G2 and full circle G3 ask the figure boolean of union
Operation, the closed curve obtained after operation are the profile mask.
Preferably, described by carrying out figure Boolean calculation to each contour segment and the profile mask, it is waited for described
The contour segment for including in overlapping region in etched figure merges, including:
The difference operation that figure boolean is carried out to each contour segment for including in the figure to be etched and the profile mask, from
The etching mask is subtracted in each contour segment for including in the figure to be etched.
Preferably, described by carrying out figure Boolean calculation to each contour segment and the profile mask, it is waited for described
The contour segment for including in overlapping region in etched figure merges, including:
The union that figure boolean is carried out to the etching mask, using operation result as the first etching mask;
The poor of figure boolean is carried out to each contour segment for including in the figure to be etched with first etching mask to transport
It calculates, first etching mask is subtracted from each contour segment for including in the figure to be etched, obtains each the first profile section;
The union of figure boolean is carried out to the outer profile of each the first profile section, and to each the first profile section
Internal periphery carries out the difference operation of figure boolean.
Preferably, described by carrying out figure Boolean calculation to each contour segment and the profile mask, it is waited for described
The contour segment for including in overlapping region in etched figure merges, including:
The union that figure boolean is carried out to the etching mask, using operation result as the first etching mask;
The poor of figure boolean is carried out to each contour segment for including in the figure to be etched with first etching mask to transport
It calculates, first etching mask is subtracted from each contour segment for including in the figure to be etched, obtains each the first profile section;
The union of figure boolean is carried out to the outer profile of each the first profile section, obtain outer profile union as a result,
And the union of figure boolean is carried out to the Internal periphery of each the first profile section, obtain Internal periphery union result;
The outer profile union result and the Internal periphery union result are carried out to the difference operation of figure boolean.
Preferably, described by carrying out figure Boolean calculation to each contour segment and the profile mask, it is waited for described
The contour segment for including in overlapping region in etched figure merges, including:
The union of figure boolean is carried out to the profile mask, obtains profile mask union result;
Figure boolean is carried out to each contour segment and the profile mask union result that include in the figure to be etched
Difference operation.
According to a second aspect of the embodiments of the present invention, a kind of profile Etaching device is provided, including:
Types of profiles acquisition module, the types of profiles for obtaining in figure to be etched each contour segment for including, wherein institute
Stating types of profiles includes:Straightway, arc section and circle;
Iris radius acquisition module obtains experience etch quantity, and determine for the dimensional parameters according to each contour segment
The iris radius r for etching aperture is the experience etch quantity;
Profile mask computing module is calculated for choosing the corresponding profile mask of each contour segment according to the types of profiles
Method, and according to the dimensional parameters of the contour segment, profile mask algorithm and the iris radius r, calculate in each contour segment
Compensation etch quantity all same profile mask;
Graphic operation module is used for by carrying out figure Boolean calculation to each contour segment and the profile mask, will
The contour segment that includes in overlapping region in the figure to be etched merges, wherein the result obtained after figure Boolean calculation is
Profile to be etched.
Preferably,
If the types of profiles of the contour segment is straightway, the dimensional parameters of the contour segment are the starting point of the straightway
S and terminal e;
The profile mask computing module includes:
First parameter calculation unit calculates the starting point s and terminal for the starting point s and terminal e according to the straightway
Euclidean distance d between e, and calculate the midpoint O of the starting point s and terminal e1And the angle theta of the straightway and x-axis;
First kind calibration point computing unit, for calculating first kind calibration point, wherein the first kind calibration point
For:P0(- d/2 ,-r), P1(d/2 ,-r), P2(d/2, r), P3(- d/2, r), P4(- d/2,0) and P5(d/2,0);
First closed curve construction unit, for building directed line segmentWith P5For the oriented circular arc in the center of circleHave
To line segmentWith with P4For the oriented circular arc in the center of circleThe closed curve of composition;
The first profile mask acquiring unit, for centered on origin, the closed curve being rotated θ angles, and will rotation
The center translation of closed curve after turning is to the midpoint O1, the closed curve after translation is the profile mask.
Preferably,
If the types of profiles of the contour segment is circle, the dimensional parameters of the contour segment are the radius R of circle1With center of circle O2
(xa,ya);
The profile mask computing module includes:
Second profile mask acquiring unit, if r < R1, one is obtained with the center of circle O2Centered on annular, wherein institute
The boundary for stating annular is respectively with (R1+ r) for the rounded outer profiles of radius and with (R1- r) be radius round Internal periphery, it is described
Annular is the profile mask.
Preferably,
If the types of profiles of the contour segment is arc section, the dimensional parameters of the contour segment are the start angle of arc section
α1With termination point α2, radius R2With center of circle O3(xc,yc);
The profile mask computing module includes:
Second parameter calculation unit, if r < R2, and | α1-α2| 2 π of <, second parameter calculation unit is for distinguishing
Calculate starting point, terminal and the Second Type calibration point of the arc section, wherein the starting point is:Pc1(xc+R2×cosα1,yc+
R2×sinα1), the terminal is:Pc2(xc+R2×cosα2,yc+R2×sinα2), the Second Type calibration point is respectively:P1
(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc+(R2+r)cos
α1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)sinα2);
Third profile mask acquiring unit, for building with O3For the oriented circular arc in the center of circleWith Pc1For having for the center of circle
To circular arcWith O3For the oriented circular arc in the center of circleWith Pc2For the oriented circular arc in the center of circleThe closed curve of composition,
In, the closed curve is the profile mask;
Third parameter calculation unit, if r=R2, the third parameter calculation unit is for calculating separately the arc section
Starting point, terminal and third type calibration point, wherein the starting point Pc1For:(xc+R2×cosα1,yc+R2×sinα1), the end
Point Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the third type calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-
r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc
+(R2+r)cosα2,yc+(R2+r)sinα2);
Fourth contoured mask acquiring unit, for building with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentAnd directed line segmentThe closed figure G1 of composition is built with Pc1For the center of circle, r be the full circle G2 of radius, and structure with
Pc2For the center of circle, r is the full circle G3 of radius, and ask the figure boolean of union to transport closed figure G1, full circle G2 and full circle G3
It calculates, the closed curve obtained after operation is the profile mask;
4th parameter calculation unit, if r > R2, the 4th parameter calculation unit is for calculating separately the arc section
Starting point, terminal and the 4th type calibration point, wherein the starting point Pc1For:(xc+R2×cosα1,yc+R2×sinα1), the end
Point Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the 4th type calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-
r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc
+(R2+r)cosα2,yc+(R2+r)sinα2);
5th profile mask acquiring unit, for building with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentWith O3(xc,yc) be the center of circle oriented circular arcAnd directed line segmentThe closed figure G1 of composition is built with Pc1
For the center of circle, r is the full circle G2 of radius, and with Pc2For the center of circle, r is the full circle G3 of radius, and to closed figure G1, full circle G2 and
Full circle G3 ask the figure Boolean calculation of union, and the closed curve obtained after operation is the profile mask.
Preferably, the graphic operation module includes:
First arithmetic element carries out figure for each contour segment to including in the figure to be etched with the profile mask
The difference operation of shape boolean subtracts the etching mask from each contour segment for including in the figure to be etched.
Preferably, the graphic operation module includes:
Second arithmetic element, the union for carrying out figure boolean to the etching mask, using operation result as the
One etching mask;
Third arithmetic element, for each contour segment and first etching mask to including in the figure to be etched into
The difference operation of row figure boolean subtracts first etching mask from each contour segment for including in the figure to be etched, obtains
Take each the first profile section;
4th arithmetic element, the union for carrying out figure boolean to the outer profile of each the first profile section, and it is right
The Internal periphery of each the first profile section carries out the difference operation of figure boolean.
Preferably, the graphic operation module includes:
5th arithmetic element, the union for carrying out figure boolean to the etching mask, using operation result as the
One etching mask;
6th arithmetic element, for each contour segment and first etching mask to including in the figure to be etched into
The difference operation of row figure boolean subtracts first etching mask from each contour segment for including in the figure to be etched, obtains
Take each the first profile section;
6th arithmetic element, the union for carrying out figure boolean to the outer profile of each the first profile section obtain
Outer profile union is as a result, and to the union of the Internal periphery of each the first profile section progress figure boolean, obtain Internal periphery
Union result;
7th arithmetic element, for the outer profile union result and the Internal periphery union result to be carried out figure
The difference operation of boolean.
Preferably, the graphic operation module includes:
8th arithmetic element, the union for carrying out figure boolean to the profile mask obtain profile mask and transport
Calculate result;
9th arithmetic element, for each contour segment and the profile mask union to including in the figure to be etched
As a result the difference operation of figure boolean is carried out.
The technical scheme provided by this disclosed embodiment can include the following benefits:
The embodiment of the present invention discloses a kind of profile engraving method and device, in this method, according to the size of the contour segment
Parameter, profile mask algorithm and iris radius calculate profile mask.Wherein, the profile mask is lost in the compensation of each contour segment
Quarter measures all same, in this case, even if obtain around the corner etch quantity and if the etching that is obtained at other positions of profile
Amount is identical, is still after the etching fillet, without becoming point if the turning in figure to be etched is fillet therefore
Angle.Also, this method will pass through corresponding etching to compensate by carrying out figure Boolean calculation to each contour segment and the profile mask
The figure to be etched in overlapping region in include contour segment merge, extra contour segment can be removed.Therefore, pass through
Profile engraving method disclosed by the embodiments of the present invention can make etching result identical as desired etching result, existing to solve
Etching result present in technology and desired etching result different problems.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not
It can the limitation present invention.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects being described in detail in claims, of the invention.
A kind of profile engraving method of offer of the embodiment of the present invention and device, to solve to carry out simulation etching using the prior art
Existing etching result and desired etching result different problems.
The first embodiment of the present invention discloses a kind of profile engraving method.Workflow schematic diagram shown in Figure 3, should
Method includes:
Step S11, the types of profiles for each contour segment for including in figure to be etched is obtained, wherein the types of profiles packet
It includes:Straightway, arc section and circle.
Figure to be etched is often made of the contour segment of one or more types, therefore, in embodiments of the present invention, is needed
Divide the types of profiles of each contour segment.
Step S12, according to the dimensional parameters of each contour segment, experience etch quantity is obtained, and determine the light of etching aperture
It is the experience etch quantity to enclose radius r.
In the embodiment of the present invention, the correspondence between each dimensional parameters and experience etch quantity is usually prestored, this
In the case of kind, after the dimensional parameters for obtaining the contour segment, this experience etch quantity can be obtained by searching the correspondence.
Furthermore it is also possible to which the experience etch quantity needed for this is arranged according to the dimensional parameters of the contour segment by staff.
In addition, in embodiments of the present invention, the etching process that the figure to be etched is simulated by etching aperture,
Wherein, the radius r of the etching aperture is the experience etch quantity.
Step S13, the corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles, and according to described
Dimensional parameters, profile mask algorithm and the iris radius r of contour segment, calculating are equal in the compensation etch quantity of each contour segment
Identical profile mask.
It is equal to the etching aperture of experience etch quantity using a radius, is moved along the contour edge of figure to be etched, when
When it returns to starting point, the edge of the profile is just reamed a circle, to reach etch effect.Wherein, profile mask is described
The route that etching aperture is moved.
It step S14, will be described to be etched by carrying out figure Boolean calculation to each contour segment and the profile mask
The contour segment for including in overlapping region in figure merges, wherein the result obtained after figure Boolean calculation is profile to be etched.
After obtaining the profile to be etched, the etching simulated along the profile to be etched, you can obtain etching
As a result.
In profile engraving method disclosed by the embodiments of the present invention, calculated according to the dimensional parameters of the contour segment, profile mask
Method and iris radius calculate profile mask.Wherein, the profile mask each contour segment compensation etch quantity all same, it is this
In the case of, though obtain around the corner etch quantity and if the etch quantity that is obtained at other positions of profile be it is identical,
Therefore, if the turning in figure to be etched is fillet, still it is after the etching fillet, is pointed at without becoming.Also, this method is logical
It crosses and figure Boolean calculation is carried out to each contour segment and the profile mask, by the figure to be etched Jing Guo corresponding etching to compensate
In overlapping region in include contour segment merge, extra contour segment can be removed.Therefore, it discloses through the embodiment of the present invention
Profile engraving method, etching result can be made identical as desired etching result, to solve etching existing in the prior art
As a result with desired etching result different problems.
In addition, types of profiles is different, corresponding dimensional parameters are different.
Wherein, if the types of profiles of the contour segment is straightway, the dimensional parameters of the contour segment are the straightway
Starting point s and terminal e.In this case, described that the corresponding profile mask of each contour segment is chosen according to the types of profiles
Algorithm, and according to the dimensional parameters of the contour segment, profile mask algorithm and the iris radius r, calculate in each profile
The profile mask of the compensation etch quantity all same of section, includes the following steps:
The first step, according to the starting point s and terminal e of the straightway, calculate Euclidean between the starting point s and terminal e away from
From d, and calculate the midpoint O of the starting point s and terminal e1And the angle theta of the straightway and x-axis.
Second step calculates first kind calibration point, wherein the first kind calibration point is:P0(- d/2 ,-r), P1(d/
2 ,-r), P2(d/2, r), P3(- d/2, r), P4(- d/2,0) and P5(d/2,0)。
Third walks, and builds directed line segmentWith P5For the oriented circular arc in the center of circleDirected line segmentWith with P4For
The oriented circular arc in the center of circleThe closed curve of composition.
The closed curve is rotated θ angles, and will be in postrotational closed curve by the 4th step centered on origin
The heart moves to the midpoint O1, the closed curve after translation is the profile mask.
If the types of profiles of the contour segment is straightway, corresponding profile mask can be obtained through the above steps.Ginseng
The schematic diagram of the profile mask of four straightways as shown in Figure 4, two endpoints of the profile mask be using starting point as the center of circle, with
Etch aperture radius be radius semicircle, middle section be respectively using the beginning and end in the dimensional parameters of contour segment as
Terminal, straightway of the radius as width to etch aperture.
If in addition, the types of profiles of the contour segment is circle, the dimensional parameters of the contour segment are the radius R of circle1And circle
Heart O2(xa,ya).It is in this case, described that the corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles,
And according to the dimensional parameters of the contour segment, profile mask algorithm and the iris radius r, calculate the benefit in each contour segment
The profile mask for repaying etch quantity all same, includes the following steps:
If r < R1, schematic diagram shown in Figure 5 then obtains one with the center of circle O2Centered on annular, wherein institute
The boundary for stating annular is respectively with (R1+ r) for the rounded outer profiles of radius and with (R1- r) be radius round Internal periphery, it is described
Annular is the profile mask.
If r >=R1, then it is not necessarily to obtain the profile mask of the contour segment.
If in addition, the types of profiles of the contour segment is arc section, the dimensional parameters of the contour segment are rising for arc section
Beginning angle [alpha]1With termination point α2, radius R2With center of circle O3(xc,yc)。
In this case, if r < R2, and | α1-α2| < 2 π, it is described that each profile is chosen according to the types of profiles
The corresponding profile mask algorithm of section, and according to the dimensional parameters of the contour segment, profile mask algorithm and the iris radius r,
The profile mask in the compensation etch quantity all same of each contour segment is calculated, is included the following steps:
First, starting point, terminal and the Second Type calibration point of the arc section are calculated separately, wherein the starting point is:Pc1
(xc+R2×cosα1,yc+R2×sinα1), the terminal is:Pc2(xc+R2×cosα2,yc+R2×sinα2), the Second Type
Calibration point is respectively:P1(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、
P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)sinα2);
Then, structure is with O3For the oriented circular arc in the center of circleWith Pc1For the oriented circular arc in the center of circleWith O3For the center of circle
Oriented circular arcWith Pc2For the oriented circular arc in the center of circleThe closed curve of composition, wherein the closed curve is institute
State profile mask.
If r=R2, it is described that the corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles, and according to
Dimensional parameters, profile mask algorithm and the iris radius r of the contour segment, the compensation calculated in each contour segment etch
The profile mask for measuring all same, includes the following steps:
First, starting point, terminal and the third type calibration point of the arc section are calculated separately, wherein the starting point Pc1For:
(xc+R2×cosα1,yc+R2×sinα1), the terminal Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the third type
Calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc
+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)sinα2);
Then, structure is with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentAnd directed line segmentGroup
At closed figure G1, build with Pc1For the center of circle, r is the full circle G2 of radius, and structure with Pc2For the center of circle, r is the whole of radius
Circle G3, and to closed figure G1, full circle G2 and full circle G3 ask the figure Boolean calculation of union, the closing obtained after operation is bent
Line is the profile mask.
If r > R2, it is described that the corresponding profile mask algorithm of each contour segment is chosen according to the types of profiles, and according to
Dimensional parameters, profile mask algorithm and the iris radius r of the contour segment, the compensation calculated in each contour segment etch
The profile mask for measuring all same, includes the following steps:
First, starting point, terminal and the 4th type calibration point of the arc section are calculated separately, wherein the starting point Pc1For:
(xc+R2×cosα1,yc+R2×sinα1), the terminal Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the 4th type
Calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc
+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)sinα2);
Then, structure is with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentWith O3(xc,yc) it is the center of circle
Oriented circular arcAnd directed line segmentThe closed figure G1 of composition is built with Pc1For the center of circle, r is the full circle G2 of radius,
And with Pc2For the center of circle, r is the full circle G3 of radius, and to closed figure G1, full circle G2 and full circle G3 ask the figure of union
Boolean calculation, the closed curve obtained after operation are the profile mask.
If the types of profiles of the contour segment is arc section, corresponding profile mask can be obtained through the above steps.Ginseng
The schematic diagram of the profile mask of two arc sections as shown in Figure 6, two endpoints of the profile mask are respectively with starting point with circle
The heart, semicircle of the radius as radius to etch aperture, in addition, the middle section of the profile mask is respectively with according to dimensional parameters
Radius arc section as width of the beginning and end being calculated as terminal, to etch aperture.
Further, in order to remove extra contour segment, in profile engraving method disclosed by the embodiments of the present invention, including it is right
Each contour segment carries out the operation of figure Boolean calculation with profile mask, to pass through in the figure to be etched of corresponding etching to compensate
Overlapping region in include contour segment merge.
Figure Boolean calculation refers to carrying out geometric operation to two figures in plane, this to obtain new figure
Geometric operation is using figure as by the object of operation.Wherein, figure Boolean calculation includes the types such as intersecting and merging and the difference of two figures
Operation.Assuming that two figures for carrying out figure Boolean calculation are respectively A and B, figure Boolean calculation is broadly divided into following several:
(1) C=A ∪ B or C=A+B, which indicates that C is A and B " simultaneously " collection, for realizing " fused " of two figures of A and B;
(2) C=A ∩ B or C=A × B, i.e. " friendship " are operated, and operation result is the public part for only retaining two figures of A and B;(3)C
=A-B executes the operation of " poor ", operation result is to realize B figures to A figures " cutting ";(4) C=B-A, and on
Operation is stated on the contrary, the intersection that its operation result is B and A is cut away by A.
Figure Boolean calculation can be carried out in profile engraving method disclosed by the embodiments of the present invention by a variety of methods.
It is described by carrying out figure boolean's fortune to each contour segment and the profile mask in wherein a kind of method
It calculates, the contour segment for including in the overlapping region in the figure to be etched is merged, including:
The difference operation that figure boolean is carried out to each contour segment for including in the figure to be etched and the profile mask, from
The etching mask is subtracted in each contour segment for including in the figure to be etched.
It is in another approach, described by carrying out figure Boolean calculation to each contour segment and the profile mask,
The contour segment for including in overlapping region in the figure to be etched is merged, is included the following steps:
First, the union that figure boolean is carried out to the etching mask, using operation result as the first etching mask.
Figure to be etched is often made of multistage contour segment, correspondingly, the etching mask of multistage can be obtained.In the step,
The union that figure boolean is carried out to the multistage etching mask got, obtains the first etching mask.
Then, figure boolean is carried out to each contour segment and first etching mask that include in the figure to be etched
Difference operation subtracts first etching mask from each contour segment for including in the figure to be etched, obtains each the first profile
Section.
Finally, the union of figure boolean is carried out to the outer profile of each the first profile section, and to each first round
The Internal periphery of wide section carries out the difference operation of figure boolean.
It is in another approach, described by carrying out figure Boolean calculation to each contour segment and the profile mask,
The contour segment for including in overlapping region in the figure to be etched is merged, is included the following steps:
The first step carries out the etching mask union of figure boolean, using operation result as the first etching mask.
Figure to be etched is often made of multistage contour segment, correspondingly, the etching mask of multistage can be obtained.In the step,
The union that figure boolean is carried out to the multistage etching mask got, obtains the first etching mask.
Second step carries out figure boolean to each contour segment and first etching mask that include in the figure to be etched
Difference operation, first etching mask is subtracted from each contour segment for including in the figure to be etched, obtains each first round
Wide section.
Third walks, and the union of figure boolean is carried out to the outer profile of each the first profile section, obtains outer profile and transports
It calculates as a result, and to the union of the Internal periphery of each the first profile section progress figure boolean, obtaining Internal periphery union result.
4th step, the difference that the outer profile union result and the Internal periphery union result are carried out to figure boolean are transported
It calculates.
Alternatively, in another approach, it is described by carrying out figure boolean to each contour segment and the profile mask
Operation merges the contour segment for including in the overlapping region in the figure to be etched, including:
First, the union of figure boolean is carried out to the profile mask, obtains profile mask union result;
Then, figure is carried out to each contour segment and the profile mask union result that include in the figure to be etched
The difference operation of boolean.
By the method for figure Boolean calculation disclosed above, extra contour segment can be removed.
The second embodiment of the present invention discloses a kind of profile Etaching device.Structural schematic diagram shown in Figure 7, the wheel
Wide Etaching device includes:Types of profiles acquisition module 100, iris radius acquisition module 200,300 and of profile mask computing module
Graphic operation module 400.
Wherein, the types of profiles acquisition module 100, the profile for obtaining in figure to be etched each contour segment for including
Type, wherein the types of profiles includes:Straightway, arc section and circle.
Figure to be etched is often made of the contour segment of one or more types, therefore, in embodiments of the present invention, is needed
Divide the types of profiles of each contour segment.
The iris radius acquisition module 200 obtains experience etching for the dimensional parameters according to each contour segment
Amount, and determine that the iris radius r of etching aperture is the experience etch quantity.
In the embodiment of the present invention, the correspondence between each dimensional parameters and experience etch quantity is usually prestored, this
In the case of kind, after the dimensional parameters for obtaining the contour segment, this experience etch quantity can be obtained by searching the correspondence.
Furthermore it is also possible to which the experience etch quantity needed for this is arranged according to the dimensional parameters of the contour segment by staff.
In addition, in embodiments of the present invention, the etching process that the figure to be etched is simulated by etching aperture,
Wherein, the radius r of the etching aperture is the experience etch quantity.
The profile mask computing module 300, for choosing the corresponding wheel of each contour segment according to the types of profiles
Wide mask algorithm, and according to the dimensional parameters of the contour segment, profile mask algorithm and the iris radius r, calculate described
The profile mask of the compensation etch quantity all same of each contour segment.
It is equal to the etching aperture of experience etch quantity using a radius, is moved along the contour edge of figure to be etched, when
When it returns to starting point, the edge of the profile is just reamed a circle, to reach etch effect.Wherein, profile mask is described
The route that etching aperture is moved.
The graphic operation module 400, for by carrying out figure boolean to each contour segment and the profile mask
Operation merges the contour segment for including in the overlapping region in the figure to be etched, wherein obtained after figure Boolean calculation
As a result it is profile to be etched.
After obtaining the profile to be etched, the etching simulated along the profile to be etched, you can obtain etching
As a result.
In profile Etaching device disclosed by the embodiments of the present invention, calculated according to the dimensional parameters of the contour segment, profile mask
Method and iris radius calculate profile mask.Wherein, the profile mask each contour segment compensation etch quantity all same, it is this
In the case of, though obtain around the corner etch quantity and if the etch quantity that is obtained at other positions of profile be it is identical,
Therefore, if the turning in figure to be etched is fillet, still it is after the etching fillet, is pointed at without becoming.Also, this method is logical
It crosses and figure Boolean calculation is carried out to each contour segment and the profile mask, by the figure to be etched Jing Guo corresponding etching to compensate
In overlapping region in include contour segment merge, extra contour segment can be removed.Therefore, it discloses through the embodiment of the present invention
Profile engraving method, etching result can be made identical as desired etching result, to solve etching existing in the prior art
As a result with desired etching result different problems.
Further, if the types of profiles of the contour segment is straightway, the dimensional parameters of the contour segment are described straight
The starting point s and terminal e of line segment;
In this case, the profile mask computing module includes:
First parameter calculation unit calculates the starting point s and terminal for the starting point s and terminal e according to the straightway
Euclidean distance d between e, and calculate the midpoint O of the starting point s and terminal e1And the angle theta of the straightway and x-axis;
First kind calibration point computing unit, for calculating first kind calibration point, wherein the first kind calibration point
For:P0(- d/2 ,-r), P1(d/2 ,-r), P2(d/2, r), P3(- d/2, r), P4(- d/2,0) and P5(d/2,0);
First closed curve construction unit, for building directed line segmentWith P5For the oriented circular arc in the center of circleHave
To line segmentWith with P4For the oriented circular arc in the center of circleThe closed curve of composition;
The first profile mask acquiring unit, for centered on origin, the closed curve being rotated θ angles, and will rotation
The center translation of closed curve after turning is to the midpoint O1, the closed curve after translation is the profile mask.
If the types of profiles of the contour segment is straightway, pass through said units, you can obtain corresponding profile mask.Ginseng
The schematic diagram of the profile mask of four straightways as shown in Figure 4, two endpoints of the profile mask be using starting point as the center of circle, with
Etch aperture radius be radius semicircle, middle section be respectively using the beginning and end in the dimensional parameters of contour segment as
Terminal, straightway of the radius as width to etch aperture.
Further, if the types of profiles of the contour segment is circle, the dimensional parameters of the contour segment are the radius R of circle1
With center of circle O2(xa,ya);
In this case, the profile mask computing module includes:
Second profile mask acquiring unit, if r < R1, schematic diagram shown in Figure 5, second profile mask obtains
Unit is for obtaining one with the center of circle O2Centered on annular, wherein the boundary of the annular be respectively with (R1+ r) it is half
Rounded outer profiles of diameter and with (R1- r) be radius round Internal periphery, it is described annular be the profile mask.
If in addition, r >=R1, then it is not necessarily to obtain the profile mask of the contour segment.
Further, if the types of profiles of the contour segment is arc section, the dimensional parameters of the contour segment are arc section
Start angle α1With termination point α2, radius R2With center of circle O3(xc,yc);
In this case, the profile mask computing module includes:
Second parameter calculation unit, if r < R2, and | α1-α2| 2 π of <, second parameter calculation unit is for distinguishing
Calculate starting point, terminal and the Second Type calibration point of the arc section, wherein the starting point is:Pc1(xc+R2×cosα1,yc+
R2×sinα1), the terminal is:Pc2(xc+R2×cosα2,yc+R2×sinα2), the Second Type calibration point is respectively:P1
(xc+(R2-r)cosα1,yc+(R2-r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc+(R2+r)cos
α1,yc+(R2+r)sinα1) and P4(xc+(R2+r)cosα2,yc+(R2+r)sinα2);
Third profile mask acquiring unit, for building with O3For the oriented circular arc in the center of circleWith Pc1For having for the center of circle
To circular arcWith O3For the oriented circular arc in the center of circleWith Pc2For the oriented circular arc in the center of circleThe closed curve of composition,
In, the closed curve is the profile mask;
Third parameter calculation unit, if r=R2, the third parameter calculation unit is for calculating separately the arc section
Starting point, terminal and third type calibration point, wherein the starting point Pc1For:(xc+R2×cosα1,yc+R2×sinα1), the end
Point Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the third type calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-
r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc
+(R2+r)cosα2,yc+(R2+r)sinα2);
Fourth contoured mask acquiring unit, for building with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentAnd directed line segmentThe closed figure G1 of composition is built with Pc1For the center of circle, r be the full circle G2 of radius, and structure with
Pc2For the center of circle, r is the full circle G3 of radius, and ask the figure boolean of union to transport closed figure G1, full circle G2 and full circle G3
It calculates, the closed curve obtained after operation is the profile mask;
4th parameter calculation unit, if r > R2, the 4th parameter calculation unit is for calculating separately the arc section
Starting point, terminal and the 4th type calibration point, wherein the starting point Pc1For:(xc+R2×cosα1,yc+R2×sinα1), the end
Point Pc2For:(xc+R2×cosα2,yc+R2×sinα2), the 4th type calibration point is:P1(xc+(R2-r)cosα1,yc+(R2-
r)sinα1)、P2(xc+(R2-r)cosα2,yc+(R2-r)sinα2)、P3(xc+(R2+r)cosα1,yc+(R2+r)sinα1) and P4(xc
+(R2+r)cosα2,yc+(R2+r)sinα2);
5th profile mask acquiring unit, for building with O3(xc,yc) be the center of circle oriented circular arcDirected line segmentWith O3(xc,yc) be the center of circle oriented circular arcAnd directed line segmentThe closed figure G1 of composition is built with Pc1
For the center of circle, r is the full circle G2 of radius, and with Pc2For the center of circle, r is the full circle G3 of radius, and to closed figure G1, full circle G2 and
Full circle G3 ask the figure Boolean calculation of union, and the closed curve obtained after operation is the profile mask.
If the types of profiles of the contour segment is arc section, corresponding profile mask can be obtained through the above steps.Ginseng
The schematic diagram of the profile mask of two arc sections as shown in Figure 6, two endpoints of the profile mask are respectively with starting point with circle
The heart, semicircle of the radius as radius to etch aperture, in addition, the middle section of the profile mask is respectively with according to dimensional parameters
Radius arc section as width of the beginning and end being calculated as terminal, to etch aperture.
Further, the graphic operation module includes:
First arithmetic element carries out figure for each contour segment to including in the figure to be etched with the profile mask
The difference operation of shape boolean subtracts the etching mask from each contour segment for including in the figure to be etched.
Further, the graphic operation module includes:
Second arithmetic element, the union for carrying out figure boolean to the etching mask, using operation result as the
One etching mask;
Third arithmetic element, for each contour segment and first etching mask to including in the figure to be etched into
The difference operation of row figure boolean subtracts first etching mask from each contour segment for including in the figure to be etched, obtains
Take each the first profile section;
4th arithmetic element, the union for carrying out figure boolean to the outer profile of each the first profile section, and it is right
The Internal periphery of each the first profile section carries out the difference operation of figure boolean.
Further, the graphic operation module includes:
5th arithmetic element, the union for carrying out figure boolean to the etching mask, using operation result as the
One etching mask;
6th arithmetic element, for each contour segment and first etching mask to including in the figure to be etched into
The difference operation of row figure boolean subtracts first etching mask from each contour segment for including in the figure to be etched, obtains
Take each the first profile section;
6th arithmetic element, the union for carrying out figure boolean to the outer profile of each the first profile section obtain
Outer profile union is as a result, and to the union of the Internal periphery of each the first profile section progress figure boolean, obtain Internal periphery
Union result;
7th arithmetic element, for the outer profile union result and the Internal periphery union result to be carried out figure
The difference operation of boolean.
Further, the graphic operation module includes:
8th arithmetic element, the union for carrying out figure boolean to the profile mask obtain profile mask and transport
Calculate result;
9th arithmetic element, for each contour segment and the profile mask union to including in the figure to be etched
As a result the difference operation of figure boolean is carried out.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit is realized can in the same or multiple software and or hardware when invention.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device or
For system embodiment, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method
The part of embodiment illustrates.Apparatus and system embodiment described above is only schematical, wherein the conduct
The unit that separating component illustrates may or may not be physically separated, the component shown as unit can be or
Person may not be physical unit, you can be located at a place, or may be distributed over multiple network units.It can root
According to actual need that some or all of module therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skill
Personnel are without creative efforts, you can to understand and implement.