Disclosure of Invention
Aiming at the defects and limitations of the prior art, the invention discloses a track generation method for processing a surface layer pattern by adopting a laser double-scanning strategy, which can ensure that the scanning speed of the track inside the pattern meets the dynamic performance constraint of a machine tool and also can meet the requirement of the consistency of the processing quality of the edge of the pattern by dividing the pattern into an outer area and an inner area and respectively adopting scanning strategies of ring scanning and line scanning, and the generated processing track and the edge of an etched pattern are smooth, and the local tool location point adjustment which is usually required in precision processing is easy to realize.
The technical scheme of the invention is a track generation method for processing surface layer patterns by adopting a laser double scanning strategy, which is characterized in that the method divides the patterns into an outer area and an inner area, and respectively adopts scanning strategies of ring scanning and line scanning; firstly, the geometric parameters of curvature radius, unit normal vector, concave-convex direction and the like of each point of the pattern contour curve are calculated by the pattern contour curve, and the minimum curvature radius and the position of the pattern contour curve are determined. Secondly, determining the maximum outer area width limited by the pattern contour curve and the machine tool limit processing capacity, matching the outer area width by combining the scanning line spacing condition, dividing the pattern into an inner area and an outer area by using the equidistant bias line of the pattern contour, and performing selfing treatment of the inner and outer boundary lines for the complex pattern with the contour being the splicing curve. Then, equidistant bias is carried out on the pattern contour to generate an outer zone circular scanning track, and for the complex pattern with the contour being a splicing curve, selfing removal processing of the circular scanning track is also needed. Finally, a series of linear sets which are arranged at intervals of scanning line intervals and cover the inner area are generated, and the parts of the linear sets, which are positioned outside the inner area, are calculated and removed, so that the inner area scanning track is generated. The method comprises the following specific steps:
step 1, calculating curve-related geometric parameters from the pattern outline curve
For example, when the profile curve c (t) is given by the parametric equation (x ═ x (t), y ═ y (t), and z ═ 0), when moving in the clockwise direction along c (t), the unit tangent vector is:
additionally setting unit vector
The unit normal vector pointing to the inside of c (t) is:
the first derivative, the second derivative and the curvature radius of C (t) are respectively:
the direction of the second derivative vector of a certain point on the curve is the same as the direction from the point to the center of the osculating circle, so that the concave-convex direction of the curve section of the neighborhood of the point is reflected. The second derivative vector of C (t) is calculated as follows:
then according to
And
establishing curve concave-convex direction judgment parameters according to the difference of the directions:
wherein dir (t) ═ 1 indicates that the point neighborhood curve segment is in a convex shape, if dir (t) ═ 1 indicates that the point neighborhood curve segment is in a concave shape, and if dir (t) ═ 0 indicates that the point neighborhood curve segment is in a straight line segment. The minimum radius of curvature of C (t) is expressed as:
ρmin=min{ρ(t)}=min{min{ρ(t)}|dir(t)=1,min{ρ(t)}|dir(t)=-1} (8)
wherein min { ρ (t) } memorydir(t)=1And min { ρ (t) } counting the cellsdir(t)=-1C (t) minimum radius of curvature of the convex portion and the concave portion, respectively.
Step 2, dividing the pattern into an inner region and an outer region
On the basis of calculating all the geometric parameters of C (t) in the step 1, carrying out equidistant bias on C (t) to obtain an equidistant bias line, namely an expression form of an inner and outer distinguishing boundary line of the pattern:
wherein d isNIs an equidistant bias line Cd(t), i.e., the outer region width of the pattern.
And CdThe radius of curvature of (t) is expressed as:
ρN(t)=ρ(t)-dir(t)dN (10)
the above formula indicates that for the curve segment concave upward in C (t), Cd(t) the radius of curvature of the corresponding location becomes larger, and for the convex curve segment on C (t), Cd(t) the radius of curvature of the corresponding position becomes smaller.
When C (t) is a first-order continuous curve
If ρmin=min{ρ(t)}|dir(t)=-1That is, when the minimum curvature radius of C (t) is located at the concave part and C (t) has the convex curve section, the constraint of the dynamic performance of the machine tool is relatively easy to satisfy only by Cd(t) minimum radius of curvatureRho or moreminThe accessibility of the scanning speed of the whole outer area can be ensured. The maximum outer region width is obtained from equations (8) and (10):
dN=min{ρ(t)}|dir(t)=1-ρmin (11)
if ρmin=min{ρ(t)}|dir(t)=1That is, when the minimum radius of curvature is located at the convex portion, the machine tool limit machining capability determined by the machining parameters and the machine tool parameters needs to be considered. For the linear interpolation motion, micro-line segments approach to curve segments, the scanning speed in each micro-line segment undergoes the processes of acceleration, uniform speed and deceleration, and the acceleration and the planned scanning speed of the machine tool are respectively expressed as a and v0Then the velocity increases from 0 to v0When in use, is v0A is calculated. The more the time proportion of the uniform motion is, the smaller the influence of the acceleration/deceleration stage on the whole processing quality is, the limit processing capacity of the machine tool is defined when the acceleration and deceleration motion distance accounts for the total motion distance 1/10, and the influence of overburning generated in the acceleration/deceleration stage can be ignored. The minimum linear scan distance is then expressed as:
in actual processing, v is planned0The curvature constraint of the pattern profile curve needs to be met with sufficient margin.
Because the approximated curve segment with small arc length can be regarded as a circular arc shape, and the radius of the circular arc is rho, and the chord height error is epsilon, the chord length s needs to satisfy:
the maximum outer region width at this time obtained from equations (10) and (12) is:
outside the above-defined patternThe zone width is only sufficient for machine tool dynamic performance requirements and does not allow for matching with the scan line spacing. Recording the line sweeping distance of the outer region as dcirAnd selecting the number of the circular scanning tracks which can be accommodated by the outer area according to actual needs as follows:
where INT (-) is a floor function. The outer zone width and the inner and outer zone boundary line equations matched with the circular sweep distance are obtained by the equations (9) and (15):
② when C (t) is formed by splicing curve segments
For each curve segment forming C (t), calculating according to the formula (i) and taking the minimum d in all the curve segmentsNThe value is obtained. In addition Cd(t) selfing also occurs at locations corresponding to the vicinity of the first-order discontinuity in C (t), to avoid Cd(t) the effect of local loop closure should be subject to a de-selfing treatment. Uniformly dispersing C (t) into n points and calculating according to the formula (9) to obtain CdDiscrete point set form of (t):
P={P1,P2,…,Pk,…,Pn},Pk=(xk,yk) (17)
wherein x iskAnd ykAre respectively a point PkThe abscissa and the ordinate. Thus Cd(t) is approximately represented by a set of micro-straight line segments, i.e., PP ═ P1P2,…,PkPk+1,…,Pn-1PnGet curve Cd(t) from the intersection point, the point is converted into the intersection point of the two straight line segments. For any line segment PkPk+1The linear equation is as follows:
then any point P in Pm=(xm,ym) To line PkPk+1The distance of (a) is:
for the numerator of the right side partial expression of the middle number of the above expression, if the absolute value operation is not carried out, the positive and negative of the numerator represents PmRelative to the straight line PkPk+1The position of (2): a value of 0 indicates that the point is on a straight line, and a value of positive and negative indicates that the point is on different sides of the straight line, respectively. It is referred to as a characterization point PmTo the straight line segment PkPk+1The parameter of the relative position is denoted sgn (d)mk) If two intersected straight line segments exist in the PP, two end points of one straight line segment are distributed on different sides of the other straight line segment, namely the product of relative position parameters of the two end points to the other straight line segment is determined to be-1. On the contrary, only if the product of the relative position parameters of two adjacent points to a certain straight line segment is-1, two straight line segments determined by the product are possible to intersect. In order to establish the criterion of intersection of certain two straight line segments in PP, the following matrix is constructed:
wherein, the value of each element of M is one of {0,1, -1 }. Straight line segment PmPm+1And straight line segment PkPk+1The essential conditions for the intersection are:
Mmkand MkmPositions in the square matrix M are symmetrical about a main diagonal, and a self-crossing discrimination matrix of the curve is constructed:
Inter=M+MT+2A (22)
wherein A is a matrix in which all of the elements of (n-1) × (n-1) are 1. Then the element with the value of Inter being 0 is the intersectionI.e. the position of the curve from the intersection point. Suppose a straight line segment PmPm+1And straight line segment PkPk+1Intersect, and m < m +1 < k +1 (selfing occurs in a local small region), then the equation corresponding to the two lines can be derived from the intersection point Pmk=(xmk,ymk) The coordinates of (a) are:
special cases are as follows: when x is
m+1=x
mAt a time there is
When x is
k+1=x
kAt a time there is
The set of curve points after selfing and replenishment of the self-intersections is:
step 3, generating a circular scanning track of the pattern outer area
The circular scanning track of the pattern outer region is obtained by equally offsetting the pattern outline curve C (t). When scanning from the outside to the inside of the pattern, the curve equation of the ith circular scanning track is as follows:
in addition, when c (t) is formed by splicing curve segments, the circular scanning track is also selfed, and since the selfed scanning track causes a part of the processing area to be irradiated with laser for multiple times, thereby deteriorating the processing quality, and even causing distortion of the scanning track profile, the circular scanning track needs to be selfed according to the processes of equations (15) to (23).
Step 4, generating the scanning track of the region in the pattern
For generating an intra-region sweep trajectory in a scientific computing software environment, the basic idea is to first define the position of the peripheral sweep trajectory from the trajectory generation region, and then generate a series of sets of straight lines L ═ L { L that cover the trajectory generation region at the desired scan line spacing1,L2,…,Lj,…,LrAnd finally, rejecting the part of the straight line outside the track generation area.
To determine L1And LrWhen the scanning direction k is selected according to actual needsLAfter tan θ (θ is the angle between the scanning direction and the positive direction of the x-axis), any point P in the passing point set P is determinedk=(xk,yk) And the slope is kLHas the linear equation of y-yk=kL(x-xk) The intercept of the horizontal axis is easily known as:
selecting P points that minimize and maximize the intercept of the horizontal axis (when there are a plurality of corresponding points, C is describedd(t) a slope of kLThe straight line segment of (1) is only required to be selected as a point satisfying the condition), and is marked as Pq1=(xq1,yq1) And Pq2=(xq2,yq2) Special cases when theta is 0 DEG, Pq1And Pq2Respectively taking Cd(t) the uppermost point and the lowermost point, and P when θ is 90 DEGq1And Pq2Respectively taking Cd(t) leftmost point and rightmost point. L is1And LrShould be respectively associated with Pq1And Pq2Keeping a certain distance to avoid the line scanning track length being 0 or the circular scanning track and the line scanning track being coincident, wherein the distance is taken as the line distance d required by the internal region line scanninglineThen, the number of sweeping tracks that the inner area can accommodate is:
and the fine-tuning back row sweeping track line spacing of the whole inner area with the uniformly distributed row sweeping tracks is as follows:
further, the set of straight lines L ═ L1,L2,…,Lj,…,LrThe jth line scanning track L in thejThe equation of the straight line of (1) is:
consider next deleting the portion of L that lies outside the area within the pattern. For linear scanning only two end points of the scanning path need be determined, i.e. LjAnd Cd(t) intersection point. To determine the intersection point, LjDispersed as uniform point set Qj={Q1Q,Q2Q,…,QuQ,…,QtQ},QuQ=(xuQ,yuQ) (discrete points ensure coverage of the inner region of the pattern and at most one L exists between two adjacent pointsjAnd Cd(t) intersection), the straight line segment set QQj={Q1QQ2Q,…,QuQQ(u+1)Q,…,Q(t-1)QQtQAny straight line segment Q inuQQ(u+1)QAll satisfy the equation of a straight line described by equation (29), so that LjAnd Cd(t) solving for the intersection points translates to QQjAnd judging the intersection of the straight line segment in the PP and solving the intersection point. Is easy to know QjAny point QuQ=(xuQ,yuQ) Straight line segment P to PPkPk+1And any point P in Pk=(xk,yk) To QQjMiddle arbitrary straight line segment QuQQ(u+1)QThe distance of (a) is:
in the above formula duQ→kAnd dk→uQThe absolute value sign of (1) is judged to be positive or negative and respectively recorded as sgnuQ→kAnd sgnk→uQWhich characterizes the relative position of the point to the straight line segment. The following matrix was constructed:
then straight line segment QuQQ(u+1)QAnd straight line segment PkPk+1The necessary conditions for sufficient intersection are as follows:
structure QQjAnd the PP intersection discrimination matrix is as follows:
wherein A is a matrix in which all of the elements of (t-1) × (n-1) are 1. Then Inter2The element with a median value of 0 indicates the number of the straight line segment where the intersection occurred, assuming Inter2When (u, k) is 0, a straight line segment Q is indicateduQQ(u+1)QAnd straight line segment PkPk+1Crossing, the intersection Q can be obtained from the equation of two straight linesuQ,k=(xuQ,k,yuQ,k) Namely, the coordinate of one knife position point of the line scanning track is as follows:
in which, when theta is equal to 90 degrees in special cases,
when x isk+1=xkWhen is, QuQ,k=(xm,yuQ+kL(xk-xuQ))。
Complete solution of LjAfter scanning the locus knife position on all the lines, Q is addedjThe inner points are replaced with the desired tool location points and sorted in the scan direction. In addition, in order to reduce the total idle stroke, the sequence of the tool positions needs to be reversed for the odd or even numbered tracks in the line set L.
The invention has the obvious effects and benefits that aiming at the problem that the single circular scanning/line scanning processing mode in the surface area laser etching process cannot give consideration to the processing quality and the processing efficiency, but the existing CAM software is lack of the problem that the processing pattern generates the laser scanning track in the automatic area division manner, the pattern is divided into an inner area and an outer area, and the scanning track of the corresponding area is analyzed and geometrically calculated, the invention provides the track generation method for processing the surface layer pattern by adopting the laser double scanning strategy, so that two scanning tracks with advantages, namely circular scanning and line scanning, are automatically generated in the pattern, and the tracks are not overlapped after the self-cross treatment, thereby avoiding the local overburning in the actual laser processing. The scanning speed can meet the dynamic response capability of a machine tool, and the generated processing track and the edge of the etching pattern are smooth. The requirement of consistency of the processing quality of the pattern edge is met, and flexible implementation conditions are provided for the adjustment requirements of some local cutter location points.
Detailed Description
The detailed description of the embodiments of the invention is provided with reference to the accompanying drawings.
In view of the advantages of the ring scanning strategy and the line scanning strategy when surface patterns are processed by laser, the existing CAM software is difficult to automatically generate different types of scanning tracks by regions and adjust local tool positions, and is not beneficial to surface laser processing and high precision and high efficiency. Aiming at the situation, in order to realize the automatic and flexible generation of the scanning track suitable for the laser processing of the surface layer pattern, the invention provides the track generation method for processing the surface layer pattern by adopting the laser double-scanning strategy, and the whole flow is shown as the attached figure 1.
By taking a pattern formed by splicing a first section, a second section and a third section of elliptical arcs of a contour curve as an example, the implementation process of the invention is explained in detail by MATLAB software. FIG. 2 is a profile of the pattern, wherein the x and y axes represent the abscissa and ordinate, respectively, in units of: and (4) rice. The parameter equation of each section of the splicing curve is as follows:
first, a unit normal vector of the pattern profile directed inward can be calculated from equations (1) and (2). The minimum curvature radius rho in the three-section curve section of the pattern profile can be calculated by the formulas (3) to (5) and (8)min=min{ρ(t)}|dir(t)=1=0.035m。
Next, the acceleration a of the machine tool is set to 9.8m/s2The error of the track chord height is 2.5 mu m, and the scanning speed is v0The maximum pattern outer region width under the constraint of the machine tool dynamic performance is calculated by the formula (14) as d when the maximum pattern outer region width is 1.7m/minN1.4476 mm. Setting a sweeping line spacing dcirOuter region width d matching the loop scan distance calculated by equation (16) of 50 μmN' -1.4 mm. Inner and outer boundary lines C generated by equation (16) using MATLAB softwared(t) referring to FIG. 3, the procedure described by the formulae (17) to (24) is applied to Cd(t) results after the selfing treatment are shown in FIG. 4. By means of FIG. 3Comparing the inner and outer dividing boundary lines of the pattern subjected to the selfing treatment with the inner and outer dividing boundary lines of the pattern subjected to the selfing treatment in the attached figure 4, it can be seen that the selfing of the inner and outer dividing boundary lines is better removed.
Then, the curve equation of each loop-scanning trajectory of the pattern outer region is calculated by the equation (25), and the MATLAB software is used to generate the loop-scanning trajectory of the pattern outer region without selfing treatment, which is shown in FIG. 5. The results of the generation of the scanning trajectory of the out-of-pattern region after the self-cross treatment according to the processes described in equations (17) to (24) are shown in fig. 6. As can be seen from the comparison between the figure 5 and the figure 6, the generation of the circular scanning track of the pattern outer area without selfing treatment has the advantages that the circular scanning track generated by the contour of the equidistant offset pattern is selfed and is seriously overlapped locally, and the tracks are not overlapped after selfing treatment, so that local overburning in actual laser processing can be avoided.
Finally, the inner zone line sweep distance d is setlineTaking theta as 0 degree in the scanning direction as 50 mu m, and calculating the line spacing d of the fine-adjusted line scanning track by the formula (28)line' -50.1 μm. Calculating the linear equation of each scanning track in the pattern by the formula (29), and generating a linear set L ═ L of the covered inner region by MATLAB software1,L2,…,Lj,…,LrThe result of the process is shown in fig. 7, and the result of the sweep trace in the pattern with the extra segments removed according to the process from equation (30) to equation (34) is shown in fig. 8. Comparing the initial generation of the line scanning track covered by the pattern in fig. 7 with the generation of the line scanning track in the pattern with the removal of the redundant segments in fig. 8, it can be seen that the laser line scanning processing track can be flexibly generated according to the required scanning direction and the scanning area by controlling the boundary of the generation area of the line scanning track and the slope of the straight line corresponding to the track.
By giving basic laser processing scanning track parameters and machine tool characteristic parameters, the method can realize automatic type judgment, internal and external area division and generation of corresponding area scanning tracks on processing patterns in an MATLAB environment. Especially, when some process parameters are obtained by analytical calculation, numerical simulation, iterative solution and other modes under the environment of scientific computing software, theoretical and technical support is provided for generating a scanning track meeting the requirements of dynamic response capability and edge processing quality consistency of a machine tool, the method lays a foundation for integration of laser processing process parameter planning and scanning track generation, and plays an important guiding role in planning and flexibly generating a laser scanning path in actual engineering processing.