Disclosure of Invention
The invention aims to provide a data conversion method between a shoe tree digital model and a processing cutter aiming at the defects of the prior art, the method simplifies complex mathematical calculation by utilizing a discretization and minimum distance method, greatly improves the calculation speed by utilizing a lookup table, solves the problem of calculating a cutter path in a numerical control last carving from discrete points on the curved surface of the shoe tree from the angle based on the discrete points on the curved surface, ensures the processing precision of the shoe tree and improves the production efficiency.
In order to accomplish the above object, the present invention provides a method of processing a footwear last, the method including the steps of:
step A: scanning the surface of the female shoe last to obtain surface data of the female shoe last;
and B: performing operation according to the scanned surface data, and converting the surface data into control parameters for controlling the movement track of the cutter point of the last carving machine milling cutter;
and C: and C, controlling the motion track of the milling cutter along the cutter point according to the control parameters in the step B, and processing the blank shoe last to obtain the same shoe last as the female shoe last.
The operation of step B includes:
discretizing the cutter head envelope surface in three coordinate systems and calculating the motion track of the cutter point; wherein,
the coordinate origin of the first coordinate system is positioned on the shoe tree, the space where the shoe tree is positioned is described by rectangular coordinates (x, y, Z), and the Z axis is consistent with the length direction of the shoe tree;
the origin of the second coordinate system is positioned on the shoe tree, the space where the shoe tree is positioned is described by cylindrical coordinates (r, alpha, Z), the origin of the second coordinate system is the same as the origin of the first coordinate system, and the Z axis of the second coordinate system is superposed with the Z axis of the first coordinate system;
the origin of coordinates of the third coordinate system is fixed on the milling cutter head and is the central point of the milling cutter head, the space where the milling cutter head is located is described by rectangular coordinates (x, y, Z), and the axis of the milling cutter head and the Z axis of the first coordinate system form an inclination angle theta;
when the inclination angle theta of the cutter head is equal to 0, the Z axis of the third coordinate system is in the same direction as the Z axis of the first coordinate system, and the X axis of the third coordinate system points to the Z axis of the first coordinate system and is vertical to the Z axis;
when the inclination angle theta of the cutter head is not equal to 0, the coordinate system is unchanged and still is XYZ, and only the whole cutter head rotates by the angle theta by taking the Y axis as the axis;
the method for calculating the motion trail of the knife location point specifically comprises the following steps:
setting the initial position of the center of the cutter head, wherein the specific steps comprise that the center O of the cutter head is positioned in a second coordinate system0Move to the next reference track point (r)O0,i,αO0,i,zO0,i) Coordinates of which and coordinates of the last trace point (r)O0,i-1,αO0,i-1,zO0,i-1) The relationship of (1) is:
<math> <mrow> <msub> <mi>z</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>z</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> <mo>-</mo> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>Δz</mi> <mn>0</mn> </msub> <mo>;</mo> </mrow> </math>
<math> <mrow> <msub> <mi>α</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>α</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> <mo>-</mo> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>Δα</mi> <mn>0</mn> </msub> <mo>;</mo> </mrow> </math>
wherein, Δ z0And Δ α0The increment of the cutter head in the longitudinal direction z and the angle alpha direction when the cutter head performs spiral motion in a second coordinate system;
in the second coordinate system, obtaining the projection area D of the cutter head on the blank lastLDiscrete points of last inside, projected area DLIs the set of shoe tree discrete points that can be processed by the cutter at the current position;
coordinate transformation to project the region DLThe coordinates of the inner points are changed from the coordinates of the first coordinate system into the coordinates of the third coordinate system;
in a third coordinate system, calculating the horizontal distance d from each projection point to the envelope surface of the cutter headx,1The horizontal distance is the minimum distance from the projection point to the envelope surface of the cutter head along the X axis of the third coordinate system, and the minimum distance d is calculated from the horizontal distancesminDetermining a processing point in the projection area;
in a second coordinate system, calculating the central coordinate of the cutter head when the shoe tree is processed:
rnc,l=R0-dmin;
αnc,i=αo,i;
znc,i=zo,i;
wherein r isnc,i=R0-dminI.e. the feed distance of the milling cutter during the last-cutting.
When the horizontal distance is calculated in the third coordinate system, for a point (x, y, z) on the shoe tree, the point does not need to be compared with each point in the lookup table, but the corresponding index can be quickly calculated through y and z, and the discrete point of the cutter head envelope surface closest to the y and z coordinates of the point is found. If the corresponding point does not exist, the fact that no corresponding point exists and no projection intersection point exists on the envelope surface of the cutter head is shown; if the coordinate value of the found point corresponding to the envelope surface is 999, the intersection point does not exist, the solution is an imaginary number solution, the imaginary solution is set to be 999 for processing convenience, and after the nearest cutter head discrete point corresponding to the point is found, the distance of the cutter head envelope surface is calculated by adopting an interpolation method;
in conclusion, the invention solves the problem of calculating the cutter path in the numerical control last carving by the discrete points of the curved surface of the shoe tree from the angle based on the discrete points of the curved surface. The invention simplifies complex mathematical calculation by using discretization and minimum distance method, and greatly improves the calculation speed by using the lookup table.
The technical solution of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Detailed Description
As shown in fig. 1, a schematic view of a discretized last surface. As can be seen from fig. 1, the shoe last surface 1 is a complex free-form surface closed body consisting of irregular curves and curves, the outer shape of which cannot be formed by elementary curves. The shoe tree contour obtained by three-dimensional scanning is composed of a series of discrete points, which meet certain precision requirements.
Generally, when processing the shoe tree, a numerical control shoe tree carving machine is adopted. Fig. 2 and 3 are schematic diagrams of a cross-sectional view of the milling cutter and a cutter head connection structure, respectively. As shown in fig. 2, the milling cutter 2 is designed in a bowl shape with a cut of about 30mm in diameter. As shown in fig. 3, 3 identical milling cutters 2 are fixed to a milling cutter head 3. One milling cutter 2 is placed at intervals of 120 deg.. During processing, the milling cutter head 3 rotates at a high speed of 7000-. Because of the high rotational speed, a part of the object to be machined is cut off as long as this part intersects the annular envelope surface.
The main machine of the numerical control last carving machine adopts a two-coordinate linkage processing mode when working, as shown in figure 5. The blank shoe last 1' to be processed is fixed on the C axis along the longitudinal direction and rotates around the C axis under the driving of the C axis stepping motor. Meanwhile, the numerical control shoe last carving machine drives the Z-axis sliding workbench to move left and right along the Z direction through the synchronous gear, the toothed belt and the screw rod. Through an X-axis stepping motor and a screw rod, an X-axis sliding workbench positioned on the Z-axis sliding workbench can translate back and forth along the X direction. And a high-speed explosion-proof motor fixed on the X-axis sliding workbench drives the milling cutter head to rotate at a high speed through a flat belt. Therefore, with the help of the two sliding working tables of the X axis and the Z axis, the cutter bowl rotating at high speed can freely move on the X-Z plane, the outer contour of each section of the blank shoe last can be processed according to the measured shoe last contour data by controlling the distance between the center of the milling cutter head 3 and the center of the C axis, and the needed shoe last can be obtained by cutting off redundant materials.
Due to the high-speed rotation of the milling cutter head, the whole cutter can be regarded as an envelope surface which is actually a circular envelope surface formed by rotating a circle (a milling cutter edge), and the machined material can be cut only by contacting the envelope surface. As shown in FIG. 4, a spatial coordinate system O is established0XYZ. Wherein, the circle with radius a rotates a circle around the Y' axis to form an envelope surface, and the circle center O1And the center O of the cutter head0Is b. In actual machining, the cutter head has an inclination angle theta, namely, the whole cutter head rotates anticlockwise by an angle theta around the Y' axis. The surface equation of the envelope surface is
<math> <mrow> <msup> <mrow> <mo>(</mo> <mo>±</mo> <msqrt> <msup> <mrow> <mo>(</mo> <mi>x</mi> <mi>cos</mi> <mi>θ</mi> <mo>-</mo> <mi>z</mi> <mi>sin</mi> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>+</mo> <msup> <mi>y</mi> <mn>2</mn> </msup> </msqrt> <mo>-</mo> <mi>b</mi> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>+</mo> <msup> <mrow> <mo>(</mo> <mi>x</mi> <mi>sin</mi> <mi>θ</mi> <mo>+</mo> <mi>z</mi> <mi>cos</mi> <mi>θ</mi> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>=</mo> <msup> <mi>a</mi> <mn>2</mn> </msup> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mrow> <mo>(</mo> <mo>*</mo> <mo>)</mo> </mrow> </mrow> </math>
The numerical control last carving machine controls the position of the center of a milling cutter head, the position of the surface profile of the last is obtained by three-dimensional scanning, and the relationship between the two data is not a simple addition and subtraction relationship. Generally, the envelope surface of the milling cutter has only one contact point with the surface of the shoe last in the actual processing, namely, two surfaces are tangent.
Is easy to know from geometrical knowledgeIn order to determine the center position (tool location point) of the cutter head corresponding to a certain point (radius r in the second coordinate system) on the surface of the processing shoe tree, the diameter of the milling cutter notch can be added in the normal direction of the point, so as to obtain the center O of the milling cutter bowl mouth1The position of (a). Due to the center O of the milling cutter head0Point and O1The relative positions of the dots are not changed, so that it is easy to get from the point O1The position of the milling cutter head is calculated to obtain the center O of the milling cutter head0The position of the point. Since the last surface is an irregular curved surface, the normal of which varies almost everywhere, the contact point of the envelope surface of the milling cutter with the last surface also varies. When the method is used for calculating the cutter location point, the normal direction of each point on the surface of the shoe tree needs to be calculated, and the calculation amount is very large.
The invention adopts the minimum distance method to avoid normal calculation, thereby simplifying the calculation of the knife location point. In actual machining, when the last is in a certain position, there is only one contact point between the envelope surface of the cutterhead and the currently corresponding last surface, that is, the point that is first contacted when the rotating milling cutter moves along the X-axis towards the last. This point of contact has the characteristic of a minimum distance, i.e. when the cutterhead and the last surface are at a distance D (this distance only needs to ensure that the cutterhead and the last are not in contact), this point has the shortest distance (denoted D) projected onto the envelope surface in the direction of the X-axis feed, in the region where the envelope surface of the milling cutter is likely to touch the last surface (called the projected region)min). If the cutter head is fed along the X axis to the shoe tree, the distance is dminThis can be processed. The last can be carved by finding the knife position of all possible points on the surface of the last.
The next problem is to calculate the distance between a certain point on the shoe tree and the envelope surface of the cutter head. For each last point, y1=ys,i,j,z1=zs,i,jEquation is converted to about x1A one-dimensional quadratic equation of (a):
where A, B, C, D and E are coefficients generated when the equation (×) is transformed into the equation (×).
The distance x can be obtained by directly solving the equation by adopting an algebraic method1. But at a slow speed, tens of hours are required to complete the calculation of the entire last knife location. The main bottlenecks are the large amount of repetitive computations: each time a tool location is calculated, all last points in the projection area need to be compared (assuming N is present)iPoint) from the envelope of the cutter, i.e., the solution NiA secondary equation; when calculating the next tool location, it is still necessary to compare all the last points in the projection area (assuming that there is N)i+1Point) distance from the envelope of the cutter, and then, N is solvedi+1An equation. Solving the one-dimensional quadratic equation itself is complicated, and too many times increases the total computation time.
The invention adopts a lookup table and a discretization method, and improves the calculation time to 3 to 5 minutes. Skillfully establishing a coordinate system and discretizing so that only a linear equation needs to be solved; and the introduction of the lookup table almost does not need to solve the equation, thereby greatly improving the calculation speed.
To calculate the tool location, two preparations are first made.
First, 3 coordinate systems are established, as shown in figure 7,
1) first coordinate system XYZ: and a rectangular coordinate system fixed on the shoe tree, wherein the origin of the coordinate is O.
2) Second coordinate system R α Z: and a cylindrical coordinate system fixed on the shoe tree, wherein the origin of the coordinate is O.
3) A third coordinate system XYZ is provided,a rectangular coordinate system fixed on a milling cutter head: the origin of coordinates is the center O of the cutter head0When the inclination angle theta of the cutter head is equal to 0, the Z axis of the third coordinate system is in the same direction as the Z axis of the first coordinate system, and the X axis of the third coordinate system always points to the Z axis of the first coordinate system and is perpendicular to the Z axis. When θ is not 0, the coordinate system is not changed, but the entire cutter head is rotated by an angle θ about the Y axis. Since the third coordinate system is fixed on the milling cutter head, the equation of the envelope surface of the milling cutter head is invariable in the coordinate system.
Second, the cutter head envelope is discretized. The degree of discrete density is determined by the processing requirements. And storing the coordinates of all the discrete points in the third coordinate system into a file lookup table. Each row of the look-up table represents (x, y, z) coordinates of a point in the third coordinate system. Since the spacing between the y and z coordinates in the lookup table is fixed, the y and z coordinates in the lookup table actually represent the index of the point.
We can then begin to calculate the tool location.
The track of the cutter head consists of cutter points and is a spiral line. The calculation of the location of the entire last corresponds to a major cycle in the program, the milling tool being machined from the end of the last to the head of the last.
The following work is required for calculating each knife location:
1. an initial "reference position" of the center of the cutterhead is set. In a second coordinate system, the center O of the cutter head0Move to the next reference track point (r)O0,i,αO0,i,zO0,i) The coordinates of which are the coordinates of the last reference trace point (r)O0,i-1,αO0,i-1,zO0,i-1) The relationship of (1) is:
<math> <mrow> <msub> <mi>z</mi> <mrow> <msub> <mi>O</mi> <mrow> <mn>0</mn> <mo>,</mo> </mrow> </msub> <mi>i</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>z</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> <mo>-</mo> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>Δz</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi>α</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>α</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> <mo>-</mo> <mn>1</mn> </mrow> </msub> <mo>+</mo> <msub> <mi>Δα</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi>r</mi> <mrow> <msub> <mi>O</mi> <mn>0</mn> </msub> <mo>,</mo> <mi>i</mi> </mrow> </msub> <mo>=</mo> <msub> <mi>R</mi> <mn>0</mn> </msub> <mo>,</mo> </mrow> </math>
wherein Δ z0And Δ α0The increment in the longitudinal direction z and the angle alpha direction when the cutter head performs spiral motion in a second coordinate system. The reference position means that the value is not the center O of the cutter head when the shoe tree is processed0The radius of the track of (a). Given the "reference position", the third coordinate system can be determined, and the last point can be represented in this coordinate system, thereby calculating the minimum distance. But the minimum distance is independent of the set value of the "reference position".
2. In the second coordinate system, selecting the projection area D of the envelope surface A of the milling cutter on the shoe tree 1LDiscrete points on the last inside, as shown in fig. 6.
3. Coordinate transformation to project the region DLThe coordinates of the inner point are changed from the coordinates of the first coordinate system to the coordinates of the third coordinate system.
4. In a third coordinate system, calculating the horizontal distance d from each projection point to the envelope surface of the cutter headx,1The minimum distance d is obtained by comparisonmin
1) Calculating a projection region DLEach point having a horizontal distance to the envelope surface
In the third coordinate system, for a point (x, y, z) on the shoe tree, the point does not need to be compared with each point in the lookup table, but the corresponding index can be rapidly calculated through y and z, and the discrete point of the cutterhead envelope surface closest to the y, z coordinate of the point is found. If the corresponding point does not exist, the fact that no corresponding point exists and no projection intersection point exists on the envelope surface of the cutter head is shown; if the coordinate value of the found corresponding point of the envelope surface is 999, the solution is an imaginary solution which shows that there is no intersection point, and the imaginary solution is set to be 999 for convenience of processing. And after the nearest cutterhead discrete point corresponding to the point is found, calculating the distance of the cutterhead envelope surface by adopting an interpolation method.
2) Calculating the minimum distance d among the distancesminThereby determining a machining point in the projection area.
5. In the second coordinate system, the central coordinates of the cutter head when processing the shoe tree are calculated
rnc,j=R0-dmin,αnc,i=α0,i,znc,i=zo,i;
Wherein r isnc,i=R0-dminI.e. the cutting distance x of the milling cutter during the last-cutting.
The process of converting the scanned data into the control parameters for controlling the movement locus of the last carving machine milling cutter after the operation is performed is shown in fig. 9.
In summary, the overall process steps of processing the shoe tree according to the present invention are shown in fig. 8, and include:
step 101: scanning the surface of the female last to obtain surface data of the female last, wherein the surface data is used as a basic mathematical model for operation in the subsequent steps;
step 102: performing operation according to the surface data obtained by scanning in the step 101, and converting the surface data into control parameters for controlling the movement track of the cutter point of the milling cutter of the last carving machine;
step 103: and controlling the milling cutter to process the blank shoe last along the cutter location point according to the control parameters in the step 102 to obtain the same shoe last as the female shoe last.
Finally, it should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present invention and not for limiting, although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all that should be covered by the claims of the present invention.