A free-form surface machining track generation method based on conformal mapping

By using conformal mapping and boundary-first unfolding algorithms, the three-dimensional triangular mesh surface is flattened into a two-dimensional rectangular parametric plane, which solves the problem of poor three-dimensional surface unfolding in the prior art. It generates a low-distortion machining trajectory, which is suitable for machining complex free-form surfaces and improves machining accuracy and efficiency.

CN119620681BActive Publication Date: 2026-04-21GUILIN UNIV OF ELECTRONIC TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUILIN UNIV OF ELECTRONIC TECH
Filing Date
2024-12-03
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing methods for machining trajectory planning using discrete parameterization cannot effectively unfold three-dimensional surfaces into planes when dealing with non-topological disk surfaces. Furthermore, the shape of the unfolded parametric plane is difficult to control, affecting the accuracy of the machining trajectory.

Method used

A parameterized algorithm based on conformal mapping is adopted to flatten the three-dimensional triangular mesh surface into a two-dimensional parametric plane, and then make it into a rectangle through a boundary-first unfolding algorithm. Then, the machining trajectory is planned within the design area, and the two-dimensional trajectory is inversely mapped to the three-dimensional surface to generate the final machining trajectory.

Benefits of technology

It enables the generation of low-distortion machining trajectories on complex freeform surfaces, improving the accuracy and efficiency of machining trajectories, and is applicable to freeform surface machining in aerospace, automotive, and shipbuilding industries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119620681B_ABST
    Figure CN119620681B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machining, in particular to a free curved surface machining track generation method based on conformal mapping, which first selects an input three-dimensional triangular mesh curved surface; then uses a boundary-first unfolding algorithm to unfold it into a two-dimensional parameter domain triangular mesh plane, so that the obtained two-dimensional parameter domain triangular mesh plane is rectangular, and the deformation generated by the mapping is minimal; the next step is to deform the shape of the two-dimensional parameter domain triangular mesh plane to the size of the design area; after a designer plans a two-dimensional machining track on the design area, i.e. the deformed two-dimensional parameter domain triangular mesh plane, the machining track is discretized into a plurality of machining track points, and the barycentric coordinates of the machining track points in the corresponding triangular elements of the two-dimensional parameter domain triangular mesh plane are calculated, and finally the machining track points are inversely mapped onto the input triangular mesh curved surface, so that the input three-dimensional machining track is obtained. The present application solves the shortcomings of the prior art and can adaptively generate a corresponding spatial machining track on a three-dimensional curved surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machining technology, and specifically to a method for generating machining trajectories for freeform surfaces based on conformal mapping. Background Technology

[0002] Machining freeform surfaces using CNC machining centers or robots is challenging in modern manufacturing. Freeform surfaces, due to their excellent continuity and shape representation capabilities, are widely used in aerospace, automotive, and shipbuilding industries. They typically lack regular geometric features, making them unsuitable for effective processing using traditional methods. The complex contours of freeform surfaces often contain subtle geometric features, such as small-radius bends, grooves, or intricate patterns. These features place higher demands on machining path planning. Taking bracelet surface engraving as an example, the patterns and textures are complex and diverse, requiring a high degree of adaptability and precision in the machining trajectory to ensure the consistency and aesthetics of the final product.

[0003] Trajectory planning techniques using discrete surface parameterization methods (such as conformal mapping) have recently gained popularity. Discrete surface parameterization constructs a mapping that transforms a freeform surface into a plane. The machining trajectory is planned on the plane, and then the planar trajectory is inversely mapped back onto the freeform surface to obtain the desired 3D machining trajectory. This allows for effective machining trajectory planning for complex contours on freeform surfaces.

[0004] However, current methods for machining trajectory planning using discrete parameterization lack effective solutions for non-topological disk surfaces, as they cannot correctly unfold the input triangular mesh surface into a plane. Furthermore, in pursuit of low mapping distortion, the shape of the unfolded parametric plane is often difficult to control, and the geometric deformation generated by discrete parameterization mapping significantly affects the accuracy of the planned machining trajectory. Summary of the Invention

[0005] The purpose of this invention is to provide a method for generating machining trajectories of freeform surfaces based on conformal mapping, which aims to solve the technical problem that existing methods for machining trajectory planning using discrete parameterization do not produce good results when unfolding three-dimensional surfaces into planes.

[0006] To achieve the above objectives, this invention provides a method for generating machining trajectories for freeform surfaces based on conformal mapping, comprising the following steps:

[0007] Step 1: Select the freeform surface as the input triangular mesh surface;

[0008] Step 2: Obtain the geometric information of the input triangular mesh surface;

[0009] Step 3: Flatten the input triangular mesh surface into a two-dimensional parametric plane using a parameterization algorithm based on conformal mapping;

[0010] Step 4: After selecting the vertices, flatten the plane again to obtain a two-dimensional rectangular parametric plane;

[0011] Step 5: Scale the 2D parametric plane to the specified design area;

[0012] Step 6: Plan the machining trajectory on the two-dimensional parameter plane;

[0013] Step 7: Inverse map the 2D machining trajectory to the input triangular mesh surface to obtain the final machining trajectory.

[0014] Optionally, the execution process of step 2 includes the following steps:

[0015] Step 2.1: Traverse all vertices of the input triangular mesh surface and save the information of its boundary vertices;

[0016] Step 2.2: Calculate the curvature of all vertices of the input triangular mesh surface;

[0017] Step 2.3: Introduce the Cotan-Laplacian matrix to calculate the Cotan-Laplacian weight of each vertex of the triangular mesh surface;

[0018] Step 2.4: Divide the vertices into two categories, internal vertices and boundary vertices, based on their indices, and re-divide the Cotan-Laplacian matrix to obtain a block matrix;

[0019] Step 2.5: Construct vectors for the boundary vertices of the input triangular mesh surface to obtain the Euclidean distance between the boundary vertices.

[0020] Optionally, in step 3, the input triangular mesh surface is expanded into a two-dimensional parametric domain triangular mesh plane using a boundary-first expansion algorithm.

[0021] Optionally, in step 4, the flattened shape of the two-dimensional parameter domain triangular mesh plane is adjusted to a rectangle to obtain the bounding box parameters of the final result finalUV, and the deformation caused by the mapping is minimized.

[0022] Optionally, in step 5, the required coefficients are calculated based on the rectangular parameter plane and the design area, and the rectangular parameter plane is scaled to the design area.

[0023] Optionally, the execution process of step 6 specifically involves planning the two-dimensional machining trajectory on the design area, i.e., the deformed two-dimensional parameter domain triangular mesh plane.

[0024] Optionally, in step 7, each input trajectory curve is discretized into several sets of trajectory points, mapped onto a plane and processed, and finally inversely mapped onto a three-dimensional mesh surface to obtain the final three-dimensional processing trajectory.

[0025] This invention provides a method for generating machining trajectories for freeform surfaces based on conformal mapping. First, a three-dimensional triangular mesh surface is selected as the input. Then, a boundary-first unfolding algorithm is used to unfold it into a two-dimensional parametric domain triangular mesh plane, ensuring that the resulting two-dimensional parametric domain triangular mesh plane is rectangular and that the deformation caused by the mapping is minimized. The next step is to deform the shape of the two-dimensional parametric domain triangular mesh plane to the size of the design area. After the designer plans the two-dimensional machining trajectory on the design area, i.e., the deformed two-dimensional parametric domain triangular mesh plane, the machining trajectory is discretized into several machining trajectory points, and the centroid coordinates of the corresponding triangular fragments on the two-dimensional parametric domain triangular mesh plane are calculated. Finally, these points are inversely mapped onto the input triangular mesh surface, thereby obtaining the input three-dimensional machining trajectory. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a schematic flowchart of the steps of a freeform surface machining trajectory generation method based on conformal mapping according to the present invention.

[0028] Figure 2 This is a schematic diagram of inputting a three-dimensional triangular mesh surface in a specific embodiment of the present invention.

[0029] Figure 3 This is a schematic diagram of flattening the input three-dimensional triangular mesh surface into a two-dimensional parametric domain mesh plane in a specific embodiment of the present invention.

[0030] Figure 4 This is a schematic diagram of selecting vertices on the boundary of a two-dimensional parameter domain mesh plane in a specific embodiment of the present invention.

[0031] Figure 5 This is a schematic diagram of how, in a specific embodiment of the present invention, the input three-dimensional triangular mesh surface is unfolded into a two-dimensional rectangular parametric domain triangular mesh plane based on the selected vertices.

[0032] Figure 6 This is a schematic diagram of the design plane in a specific embodiment of the present invention.

[0033] Figure 7 This is a schematic diagram illustrating the transformation of a two-dimensional rectangular parameter domain triangular mesh plane into a design plane in a specific embodiment of the present invention.

[0034] Figure 8This is a schematic diagram of designing the machining trajectory within a two-dimensional rectangular parameter domain triangular mesh that is deformed to the size of the design plane in a specific embodiment of the present invention.

[0035] Figure 9 This is a schematic diagram illustrating the discretization of the processing curve in a specific embodiment of the present invention.

[0036] Figure 10 This is a schematic diagram illustrating the inverse mapping of discrete machining trajectory points in a two-dimensional rectangular parameter domain triangular mesh plane to an input three-dimensional triangular mesh surface in a specific embodiment of the present invention.

[0037] Figure 11 This is a comparison image of the input three-dimensional triangular mesh surface before and after the processing trajectory is generated in a specific embodiment of the present invention. Detailed Implementation

[0038] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0039] Please see Figure 1 This invention provides a method for generating machining trajectories for freeform surfaces based on conformal mapping, comprising the following steps:

[0040] Step 1: Select the freeform surface as the input triangular mesh surface;

[0041] Step 2: Obtain the geometric information of the input triangular mesh surface;

[0042] Step 3: Flatten the input triangular mesh surface into a two-dimensional parametric plane using a parameterization algorithm based on conformal mapping;

[0043] Step 4: After selecting the vertices, flatten the plane again to obtain a two-dimensional rectangular parametric plane;

[0044] Step 5: Scale the 2D parametric plane to the specified design area;

[0045] Step 6: Plan the machining trajectory on the two-dimensional parameter plane;

[0046] Step 7: Inverse map the 2D machining trajectory to the input triangular mesh surface to obtain the final machining trajectory.

[0047] The following description, in conjunction with the implementation steps and specific embodiments, provides further details (this invention is illustrated through the design of pattern processing trajectories; see details below). Figures 2 to 11 ):

[0048] The specific execution steps are as follows:

[0049] The execution process of step 1 includes the following steps:

[0050] The conformal mapping in this invention refers to a mapping in complex function theory that maintains the angles unchanged. The distance and area at corresponding points of two figures before and after the mapping may change, but the angles remain the same. Conformal mapping can transform complex geometries into simpler forms, facilitating analysis and calculation.

[0051] A freeform surface is a three-dimensional surface with a complex shape that cannot be described by simple geometric shapes such as planes, cylinders, or spheres. Its shape is flexible and complex, not bound by simple mathematical equations. It is typically used to represent irregular, smooth, continuous object surfaces, and is suitable for designs requiring smooth transitions.

[0052] In this embodiment, the three-dimensional triangular mesh surface for generating the machining trajectory is first imported into the CAD / CAM software, such as... Figure 2 The input triangular mesh surface is shown; it is used to generate a three-dimensional machining trajectory on the input mesh based on the two-dimensional machining trajectory.

[0053] The execution process of step 2 includes the following steps:

[0054] Step 2.1: Traverse all vertices of the input triangular mesh surface and save the information of its boundary vertices.

[0055] Step 2.2: Calculate the curvature of all vertices of the input triangular mesh surface. For internal vertices, calculate their Gaussian curvature Ω. i For each boundary vertex, calculate its geodesic curvature k. i Specifically, it can be calculated using the following formula:

[0056]

[0057] The summation symbol on the right side of the equation represents traversing all adjacent triangles of vertex i and accumulating the angle corresponding to vertex i in each adjacent triangle.

[0058] The Gaussian curvature is a measure in differential geometry used to describe the intrinsic curvature of a surface at a point. It reflects the degree of curvature of the surface in various directions.

[0059] The geodesic curvature is a measure in differential geometry that describes the degree of curvature of a curve relative to a surface. It represents the curvature of the curve at that point along the tangential direction (tangent to the surface). It reflects the extent to which the curve deviates from the "straightest" path (i.e., the geodesic) on the surface.

[0060] Step 2.3: Calculate the Cotan-Laplacian weight of each vertex of the triangular mesh surface. A discrete triangular mesh surface with N vertices can be represented as an N×N matrix. Specifically, it can be calculated using the following formula:

[0061]

[0062] Let the edge formed by vertex i and its adjacent vertex j be dege. ij Then α j and β j They represent the shared edge dege respectively ij In the two triangles, the opposite side edge ij The angle between the two vertices.

[0063] The Cotan-Laplacian matrix is ​​a discrete Laplacian operator used in discrete differential geometry to process triangular mesh data, whose element A ij This refers to the cotangent weight of vertex i produced by its adjacent vertex j with respect to vertex i. Its element A ii This represents the negative sum of the cotangent weights of all adjacent vertices of vertex i.

[0064] Step 2.4: Based on the vertex indices, divide them into two categories: internal vertices and boundary vertices. Re-divide the Cotan-Laplacian matrix accordingly, from left to right and from top to bottom, into blocks A. II A IB A BI A BB Four submatrices. The resulting block matrix is ​​as follows:

[0065]

[0066] The Cotan-Laplacian matrix is ​​re-blocked into A II A IB A BI A BB , refers to A II The cotangent weights A and B correspond to the internal vertices. IB The cotangent weight A corresponding to the boundary vertex and its internal vertices. BI The cotangent weights A and B, corresponding to the internal vertices' cotangent weights to the boundary vertices, are... BB The cotangent weights generated by the boundary vertices relative to the boundary vertices.

[0067] Step 2.5: For the bN boundary vertices of the input triangular mesh surface, construct a bN×1 vector l, whose i-th element l i This represents the Euclidean distance from the i-th boundary vertex to the (i+1)-th boundary vertex.

[0068] The Euclidean distance is the square root of the sum of the squares of the differences between the coordinate components of two vectors.

[0069] The execution process of step 3 includes the following steps:

[0070] Step 3.1: Create a vector g of size bN×1, where each element is 0. It is the set of all boundary vertex elements in the conformal scaling factor u.

[0071] The conformal scaling factor u is a parameter used to measure the scaling scale of the conformal mapping, representing the scaling scale of each vertex before and after the mapping. It can be calculated using the following formula:

[0072]

[0073] Step 3.2: Based on the Gaussian curvature and geodesic curvature of the vertices of the input triangular mesh surface and the vector g described in Step 3.1, construct the discrete Newman number h for solving the boundary vertices during the mapping process. This can be calculated using the following formula:

[0074]

[0075] The matrix on the left is the Cotan-Laplacian matrix after block partitioning in step 2.4. φ I It is an iN×1 vector, where each element represents the Gaussian curvature φ of the interior vertices. B It is a bN×1 zero vector, where each element represents the Gaussian curvature of the boundary vertex, a B This is the conformal scaling factor g of the boundary vertices obtained in step 3.1.

[0076] Step 3.3: For A II Perform Cholesky decomposition.

[0077] Cholesky decomposition is a method for decomposing symmetric positive definite matrices. It decomposes a symmetric positive definite matrix into the product of a lower triangular matrix and its transpose.

[0078] Step 3.4: Solve for the first row of the Cotan-Laplacian matrix from Step 3.2 to obtain a. I Specifically, the following formula can be used for calculation:

[0079] A II a I =φ I -A IB g

[0080] Step 3.5: Based on a obtained in Step 3.4I Solving for the second row of the Cotan-Laplacian matrix in step 3.2 yields h, which can be calculated using the following formula:

[0081] h = φ B -(A BI a I +A BB g)

[0082] Step 3.6: Based on h obtained in Step 3.5, and the geodesic curvature k of the boundary vertices of the input 3D triangular mesh surface, the geodesic curvature of the boundary vertices of the target 2D parametric plane can be obtained. The following formula can be used to calculate:

[0083]

[0084] Step 3.7: Based on the vector g constructed in Step 3.1 and the solution obtained in Step 3.6 The main process phase of executing the boundary-first expansion algorithm.

[0085] Step 3.8: Based on the boundary scaling factor g of the target two-dimensional parametric domain mesh plane and the boundary length l of the input triangular mesh surface, calculate the boundary length of the target two-dimensional parametric plane using a bN×1 vector l. * This indicates that each element The following formula can be used to calculate it.

[0086]

[0087] Step 3.9: Calculated based on Step 3.6 And the l calculated in step 3.8 * The vertex coordinates of the optimal boundary are calculated iteratively.

[0088] Step 3.10: Construct a zero vector L of size bN×1, and iterate through it sequentially. For each element of L, sum each element and fill L accordingly, where each element of L j Specifically, it can be calculated using the following formula:

[0089]

[0090] Step 3.11: Construct a bN×2 zero matrix This is used to represent the tangent vector direction of the target two-dimensional parameter boundary vertex. Based on K obtained in step 3.10, each element in L is traversed to calculate... but The i-th row element The following formula can be used to calculate:

[0091]

[0092] Step 3.12: Based on the distance between two adjacent boundary vertices of the input triangular mesh surface calculated in Step 2.5, it can be represented by a bN×1 vector l. Calculate the dual edge del of the boundary vertices of the input triangular mesh surface, where del is a bN×1 vector. Specifically, its i-th element del... i The following formula can be used to calculate:

[0093]

[0094] The dual edge refers to the weighted segment length formed by the Euclidean distances between a vertex on the boundary and its two adjacent vertices.

[0095] Step 3.13: Based on the target two-dimensional parameter boundary length l obtained in Step 3.8 * Step 3.11 obtains the tangent vector direction of the target two-dimensional parameter boundary vertex. The dual edge del of the boundary vertex obtained in step 3.12 is used to calculate the final optimized length of the boundary vertex of the target two-dimensional parameter domain. The following formula can be used to calculate:

[0096]

[0097] Where N is a bN×bN diagonal matrix, and each element of its diagonal is N ii Let represent the reciprocal of the dual edge of the i-th boundary vertex, i.e.:

[0098]

[0099] Step 3.14: Calculate the length of the boundary vertex of the target two-dimensional parameter domain based on the result of step 3.13. The tangent vector direction of the target two-dimensional parameter boundary vertex calculated in step 3.11. The final optimized target two-dimensional parameter domain boundary vertex coordinates can be calculated. It is a bN×2 matrix, where the p-th row stores the uv coordinates of the p-th boundary vertex, and the p-th element... The following formula can be used to calculate:

[0100]

[0101] Step 3.15: Calculate the final optimized boundary vertex coordinates based on Step 3.14. We will calculate the u and v coordinates of the internal vertices separately.

[0102] Step 3.16: Using the Cotan-Laplacian matrix constructed in Step 2.4, construct a linear equation to solve for the u-values ​​of the vertex uv coordinates within the target's two-dimensional parameter domain, using a I It means, and a B The u-value is the coordinate of the vertex uv of the target two-dimensional parameter domain boundary, obtained from step 3.14, and is a bN×1 vector. This system of linear equations can be calculated using the following formula:

[0103]

[0104] Step 3.17: For A II Perform Cholesky decomposition, solving the first row of the linear equations in step 3.16 to obtain a. I That is, the u value of the vertex uv coordinates inside the target's two-dimensional parameter domain.

[0105] Step 3.18: Calculate the u-value a of the vertex uv coordinates within the target's two-dimensional parameter domain using the value obtained in Step 3.17. I Traverse all boundary vertices and construct a vector h of size bN×1. b For three consecutive boundary vertices i, j, k, for h b The j-th element The following formula can be used to calculate:

[0106]

[0107] Step 3.19: Construct an iN×1 zero vector h i Using the vector h obtained in step 3.18 b Vertical splicing h i and h b This yields an N×1 vector h. b .

[0108] Vertical concatenation refers to joining two vectors of the same or different lengths end-to-end while keeping the original element order unchanged, to obtain a new vector.

[0109] Step 3.20: Using the Cotan-Laplacian matrix obtained in Step 2.4, perform Cholesky decomposition on it and solve the following linear equation to obtain b. I and b B That is, the v value of the uv coordinates of the vertices inside and the boundary vertices in the target's two-dimensional parameter domain:

[0110]

[0111] Step 3.21: Construct an N×2 matrix reorderedUV, traverse all internal vertices, and fill the uv values ​​of the internal vertices of the two-dimensional parametric plane calculated in Step 3.17 and Step 3.20 into the rows corresponding to the indices in reorderedUV; traverse all boundary vertices, and fill the uv values ​​of the boundary vertices of the two-dimensional parametric plane calculated in Step 3.15 into the rows corresponding to the indices in reorderedUV.

[0112] Step 3.22: Expand the N×2 matrix reorderedUV obtained in step 3.21 into an N×3 matrix, with all zeros in the third column.

[0113] Step 3.23: Calculate the bounding box of the coordinate points stored in the N×3 matrix reorderedUV obtained in Step 3.22, and calculate the coordinates of the lower left corner of the bounding box. min and the coordinates of the top right corner box max and the center coordinates of the bounding box. center .

[0114] The bounding box refers to the smallest aligned rectangle (in two dimensions) or cube (in three dimensions) that encloses an object, geometric figure, or shape.

[0115] Step 3.24: Translate the set of coordinate points represented by the N×3 matrix reorderedUV obtained in Step 3.22 so that its average center is located at the origin of the coordinate axes. Specifically, this can be calculated using the following formula:

[0116]

[0117] Where C is the centroid coordinate of the reorderedUV.

[0118] Step 3.25: Obtain the major axis of the current 2D parametric plane. Use box... max Subtract box min This yields a three-dimensional vector box. judge If box judge The y-element is less than or equal to the box. judge If the x-element is selected, then the major axis of the current 2D parameter domain plane is determined to be on the x-axis, and no further processing is performed; otherwise, the 2D parameter domain plane is rotated 90 degrees counterclockwise around the z-axis. The rotatedUV is calculated by constructing a rotation matrix.

[0119]

[0120] Step 3.26: The box obtained through step 3.23 min box maxThe scaling factors of rotatedUV in the x, y, and z directions can be calculated and represented by the three-dimensional vector scaleTerm:

[0121]

[0122] Using the rotatedUV calculated in step 3.25, a scaling matrix is ​​constructed to scale it to obtain the final result finalUV, which can be expressed by the following formula:

[0123]

[0124] Step 3.27: Display the finalUV as a two-dimensional parametric domain mesh plane on the screen based on the surface connectivity of the input triangular mesh surface.

[0125] The surface connectivity mentioned in step 3.27 refers to the relationship between the indices of all triangular elements on the triangular mesh surface and the indices of their corresponding three vertices.

[0126] In this embodiment, based on the input three-dimensional triangular mesh surface, it is unfolded into a two-dimensional parametric domain triangular mesh plane with minimal angular deformation, such as... Figure 3 The flattened schematic diagram is shown; it is used to further generate a two-dimensional rectangular parameter domain triangular mesh plane.

[0127] The execution process of step 4 includes the following steps:

[0128] Step 4.1: The flattened shape will be a polygon close to a rectangle. Select four corner points from the boundary vertices of the 2D parametric domain mesh plane and save the indices v of these four corner points. c1 v c2 v c3 v c4 .

[0129] In this embodiment, based on the flattened polygon that approximates a rectangle, the user manually selects the four vertices closest to the corners of the rectangle, such as... Figure 4 The selected vertices are shown in the diagram. They are used to transform the polygon into a rectangle with minimal mapping deformation.

[0130] Step 4.2: Traverse all bN boundary vertices and create a bN×1 vector. The corresponding vertex v c1 v c2 v c3 v c4 The value at the index position is 0.5π, and the values ​​at other positions are 0. This value is stored as the outer angle of the objective parameter field for subsequent execution of the boundary-first expansion algorithm.

[0131] Step 4.3: Determine the exterior angle of the boundary of the target two-dimensional parameter domain mesh plane calculated in Step 4.1. And in step 2.2, by inputting the geodesic curvature k of the boundary vertices of the 3D triangular mesh surface, we obtain the gradient h of the boundary during the mapping process, i.e.: Based on h, a linear equation for solving the conformal scaling factor g of the boundary vertices during the mapping process can be constructed and calculated using the following formula:

[0132]

[0133] The matrix on the left is the Cotan-Laplacian matrix after block partitioning in step 2.4. φ I It is an iN×1 vector, where each element represents the Gaussian curvature φ of the interior vertices. B It is a bN×1 zero vector, where each element represents the Gaussian curvature of the boundary vertex, a B Let g be the conformal scaling factor of the boundary vertices of the target parameter domain mesh plane.

[0134] Step 4.4: To improve the solution speed, Cholesky decomposition is performed on the large sparse matrix on the left side of the equation system in Step 4.3, and then the linear equation system is solved to obtain a. I and a B Given a vector a of size bN×1, extract a B Store it as g. Offset each term in g by a constant to prevent the resulting parameters from being too large or too small. Calculate the average value of g. Subtract each element in g We obtain the final g we need.

[0135] Step 4.5: Based on the vector g calculated in Step 4.4 and the solution obtained in Step 4.2... The main process phase of executing the boundary-first expansion algorithm.

[0136] Step 4.6: Based on the boundary scaling factor g of the target two-dimensional parametric domain mesh plane and the boundary length l of the input triangular mesh surface, calculate the boundary length of the target two-dimensional parametric plane using a bN×1 vector l. * This indicates that each element The following formula can be used to calculate it.

[0137]

[0138] Step 4.7: Calculated based on Step 4.2 And the l calculated in step 4.6 * The vertex coordinates of the optimal boundary are calculated iteratively.

[0139] Step 4.8: Construct a zero vector L of size bN×1 and iterate through it sequentially. For each element of L, sum each element and fill L accordingly, where each element of L j Specifically, it can be calculated using the following formula:

[0140]

[0141] Step 4.9: Construct a bN×2 zero matrix This is used to represent the tangent vector direction of the target two-dimensional parameter boundary vertex. Based on L obtained in step 4.8, each element in L is traversed to calculate... but The i-th row element The following formula can be used to calculate:

[0142]

[0143] Step 4.10: The distance between two adjacent boundary vertices of the input triangular mesh surface calculated in Step 2.5 can be represented by a bN×1 vector l. Calculate the dual edge del of the boundary vertices of the input triangular mesh surface, where del is a bN×1 vector. Specifically, its i-th element del... i The following formula can be used to calculate:

[0144]

[0145] Step 4.11: Based on the target two-dimensional parameter boundary length l obtained in step 3.8 * The tangent vector direction of the target two-dimensional parameter boundary vertex obtained in step 4.9 Step 4.10 yields the dual edge del of the boundary vertex, which is then used to calculate the final optimized length of the boundary vertex of the target two-dimensional parameter domain. The following formula can be used to calculate:

[0146]

[0147] Where N is a bN×bN diagonal matrix, and each element of its diagonal is N ii Let represent the reciprocal of the dual edge of the i-th boundary vertex, i.e.:

[0148]

[0149] Step 4.12: Calculate the length of the boundary vertex of the target two-dimensional parameter domain based on the result of step 4.11. The tangent vector direction of the target two-dimensional parameter boundary vertex calculated in step 4.9. The final optimized target two-dimensional parameter domain boundary vertex coordinates can be calculated. It is a bN×2 matrix, where the p-th row stores the uv coordinates of the p-th boundary vertex, and the p-th element... The following formula can be used to calculate:

[0150]

[0151] Step 4.13: Calculate the final optimized boundary vertex coordinates based on Step 4.12. We will calculate the u and v coordinates of the internal vertices separately.

[0152] Step 4.14: Using the Cotan-Laplacian matrix constructed in Step 2.4, construct a linear equation to solve for the u-values ​​of the vertex uv coordinates within the target's two-dimensional parameter domain, using a I It means, and a B The u-value is the coordinate of the vertex uv of the target two-dimensional parameter domain boundary, obtained from step 4.12, and is a bN×1 vector. This system of linear equations can be calculated using the following formula:

[0153]

[0154] Step 4.15: For A II Perform Cholesky decomposition, solving the first row of the linear equations in step 4.14 to obtain a. I That is, the u value of the vertex uv coordinates inside the target's two-dimensional parameter domain.

[0155] Step 4.16: Using the Cotan-Laplacian matrix constructed in Step 2.4, construct a linear equation to solve for the v value of the vertex uv coordinates within the target's two-dimensional parameter domain, using b I It means that b B The v value is the coordinate of the vertex uv of the target two-dimensional parameter domain boundary, obtained from step 4.12, and is a bN×1 vector. This system of linear equations can be calculated using the following formula:

[0156]

[0157] Step 4.17: For A II Perform Cholesky decomposition, solving the first row of the linear equations from step 4.16 to obtain b. I , which is the v value of the vertex uv coordinates inside the target's two-dimensional parameter domain.

[0158] Step 4.18: Construct an N×2 matrix reorderedUV, traverse all internal vertices, and fill the uv values ​​of the internal vertices of the two-dimensional parametric plane calculated in Steps 4.15 and 4.17 into the rows corresponding to the indices in reorderedUV; traverse all boundary vertices, and fill the uv values ​​of the boundary vertices of the two-dimensional parametric plane calculated in Step 4.12 into the rows corresponding to the indices in reorderedUV.

[0159] Step 4.19: Expand the N×2 matrix reorderedUV obtained in step 4.18 into an N×3 matrix, with all zeros in the third column.

[0160] Step 4.20: Calculate the bounding box of the coordinate points stored in the N×3 matrix reorderedUV obtained in Step 4.19, and calculate the coordinates of the lower left corner of the bounding box. min and the coordinates of the top right corner box max and the center coordinates of the bounding box. center .

[0161] Step 4.21: Translate the set of coordinate points represented by the N×3 matrix reorderedUV obtained in Step 4.19 so that its average center is located at the origin of the coordinate axes. Specifically, this can be calculated using the following formula:

[0162]

[0163] Where C is the centroid coordinate of the reorderedUV.

[0164] Step 4.22: Obtain the major axis of the current 2D parametric plane. Use box... max Subtract box min This yields a three-dimensional vector box. judge If box judge The y-element is less than or equal to the box. judge If the x-element is selected, then the major axis of the current 2D parameter domain plane is determined to be on the x-axis, and no further processing is performed; otherwise, the 2D parameter domain plane is rotated 90 degrees counterclockwise around the z-axis. The rotatedUV is calculated by constructing a rotation matrix.

[0165]

[0166] Step 4.23: The box obtained from step 4.20 min box max The scaling factors of rotatedUV in the x, y, and z directions can be calculated and represented by the three-dimensional vector scaleTerm:

[0167]

[0168] The rotatedUV calculated in step 4.22 is scaled using a scaling matrix to obtain the final UV, which can be expressed by the following formula:

[0169]

[0170] Step 4.24: Display the finalUV as a two-dimensional parametric domain mesh plane on the screen using the surface connectivity of the input triangular mesh surface.

[0171] The surface connectivity mentioned in step 4.24 refers to the relationship between the indices of all triangular elements on the triangular mesh surface and the indices of their corresponding three vertices.

[0172] In this embodiment, a two-dimensional rectangular parameter domain triangular mesh plane is obtained based on four corner points selected on the two-dimensional parameter domain triangular mesh plane, as shown below. Figure 5 The flattened shape is shown as a rectangle; it is used to further transform the plane into the shape of the design area.

[0173] The execution process of step 5 includes the following steps:

[0174] Step 5.1: Calculate the coordinates of the lower left corner of the bounding box of the design area. Top right corner coordinates center coordinates The bounding box of the two-dimensional parametric domain mesh plane calculated in step 4.20 min box max box center Calculate the translation coefficients T in the x and y directions of all coordinates finalUV of the two-dimensional parametric domain mesh plane obtained in step 4.23. u T v It can be calculated using the following formula:

[0175]

[0176] Step 5.2: Calculate the scaling factors S in the x and y directions of the finalUV scaled to the design area. u S v It can be calculated using the following formula:

[0177]

[0178] Step 5.3: Construct a homogeneous transformation to scale finalUV to the size of the design rectangular region, obtaining a two-dimensional parametric domain mesh planar coordinate point set shapeMatchedUV that matches the shape of the design region. This can be calculated using the following system of linear equations:

[0179]

[0180] Specifically, the homogeneous transformation is a transformation method that unifies ordinary spatial transformations (such as translation, rotation, and scaling) into matrix multiplication.

[0181] In this embodiment, the design and processing area is first imported into the CAD / CAM software, such as... Figure 6 The input design processing area is shown; it is used for the deformation of the two-dimensional parametric domain triangular mesh plane. Then, based on the obtained two-dimensional rectangular parametric domain triangular mesh plane, it is deformed into a rectangular plane of the design area size, as shown... Figure 7 The planar deformation is shown; it is used to plan a two-dimensional machining trajectory on a two-dimensional rectangular parameter domain triangular mesh plane of the design area size.

[0182] In step 6, the user plans the trajectory within the designed machining area in the CAD / CAM software, such as... Figure 8 The trajectory planning is shown; it is used to discretize the two-dimensional machining trajectory.

[0183] The execution process of step 7 includes the following steps:

[0184] Step 7.1: Discretize each curve. Input the discrete parameter t, traverse all continuous trajectory curves, and divide the current curve into t parts according to the parameter t, to obtain t+1 discrete trajectory points.

[0185] Step 7.2: Traverse the first... i The j-th discrete trajectory point on a discrete curve Find the triangular element to which it belongs on the two-dimensional parametric domain mesh plane.

[0186] Step 7.3: Based on the triangular element obtained in Step 7.2 calculate The coordinates of the three vertices are a(x1, y1, z1), b(x2, y2, z2), and c(x3, y3, z3).

[0187] Step 7.4: Calculated based on Step 7.3 Calculate the coordinates of the three vertices. Area abc It can be calculated using the following formula:

[0188]

[0189] Step 7.5: Using the formula in Step 7.4, calculate the discrete trajectory points obtained in Step 7.2. The triangular element obtained in step 7.3 The area of ​​the triangle formed by the three vertices a(x1, y1, z1), b(x2, y2, z2), and c(x3, y3, z3) is the area of ​​the triangle. pbc Area pca .

[0190] Step 7.6: Based on the Area obtained in Steps 7.4 and 7.5 abc Area pbc Area pca This yields three parameters: t1, t2, and t3. These can be calculated using the following formula:

[0191]

[0192] Step 7.7: Based on the formula in Step 7.6, the discrete trajectory points obtained in Step 7.2 are obtained. The triangular piece element obtained in step 7.3 The coordinates of the centroid within the area are (t1, t2, t3).

[0193] Optionally, the centroid coordinates refer to a coordinate system defined based on the vertices of a polygon or polyhedron, which is often used to represent the position of any point inside or on the surface of a geometric shape. The position is determined by representing the weight of the point relative to the vertices of the shape.

[0194] Step 7.8: Traverse all triangular elements of the input 3D triangular mesh surface and find the element obtained in Step 7.2. The triangular element corresponding to the index

[0195] Step 7.9: Based on the triangular element obtained in Step 7.8 Obtain the coordinates of its three vertices A(X1, Y1, Z1), B(X2, Y2, Z2), and C(X3, Y3, Z3).

[0196] Step 7.9: Based on the centroid coordinates (t1, t2, t3) obtained in Step 7.7, calculate the discrete trajectory points obtained in Step 7.2. Corresponding coordinates on the input 3D triangular mesh surface The specific calculation can be performed using the following formula:

[0197]

[0198] Step 7.10: Traverse every discrete trajectory point in all trajectory curves, iteratively executing steps 7.2 to 7.9, until all trajectory points on the two-dimensional parameter domain grid plane are obtained. Corresponding trajectory points on the 3D input mesh surface

[0199] In this embodiment, based on the discretized two-dimensional machining trajectory points, the discretized three-dimensional machining trajectory points are inversely mapped to the input triangular mesh surface, such as... Figure 10 The inverse mapping result, Figure 11 The algorithm comparison is shown in the figure. As can be seen from the figure, for machining complex freeform surfaces, the machining trajectory generated by the method of this invention has less deformation and higher machining efficiency.

[0200] In this embodiment of the invention, applying steps 1 to 7 to the input three-dimensional triangular mesh surface can successfully generate a low-distortion three-dimensional machining trajectory, such as... Figure 10 and Figure 11 As shown; when machining curved surfaces, mapping methods, including but not limited to those involving substituting the surface equations, can be used to map the generated two-dimensional trajectory to three-dimensional space, thereby obtaining the desired machining trajectory for the curved surface region, such as... Figure 10 and Figure 11 As shown in the figure, for machining complex and deformable free-form surfaces, the method of the present invention generates a three-dimensional machining trajectory with less deformation and higher operability, thereby achieving higher machining efficiency.

[0201] In summary, compared with the prior art, the advantages and effects of the present invention are as follows:

[0202] This invention is applicable to the machining trajectory planning problem for complex freeform surfaces. The method can reduce the dimensionality of complex freeform surface toolpath planning to a plane, reducing the complex and tedious spatial intersection problems, and the generated toolpath trajectory has small deformation. It can adaptively generate the corresponding three-dimensional machining trajectory on the input triangular mesh surface based on the two-dimensional machining trajectory planned on the two-dimensional parameter domain triangular mesh plane, and can fit the surface well.

[0203] The above description discloses only one preferred embodiment of the present invention, and should not be construed as limiting the scope of the present invention. Those skilled in the art will understand that all or part of the processes of the above embodiments can be implemented, and equivalent changes made in accordance with the claims of the present invention are still within the scope of the invention.

Claims

1. A method for generating a free-form surface machining trajectory based on conformal mapping, characterized in that, Includes the following steps: Step 1: Select the freeform surface as the input triangular mesh surface; Step 2: Obtain the geometric information of the input triangular mesh surface; The execution process of step 2 includes the following steps: Step 2.1: Traverse all vertices of the input triangular mesh surface and save the information of its boundary vertices; Step 2.2: Calculate the curvature of all vertices of the input triangular mesh surface; Step 2.3: Introduce the Cotan-Laplacian matrix to calculate the Cotan-Laplacian weight of each vertex of the triangular mesh surface; Step 2.4: Divide the vertices into two categories, internal vertices and boundary vertices, based on their indices, and re-divide the Cotan-Laplacian matrix to obtain a block matrix; Step 2.5: Construct vectors for the boundary vertices of the input triangular mesh surface to obtain the Euclidean distance between the boundary vertices; Step 3: Flatten the input triangular mesh surface into a two-dimensional parametric plane using a parameterization algorithm based on conformal mapping; In step 3, the boundary-first unfolding algorithm is used to unfold the input triangular mesh surface into a two-dimensional parametric domain triangular mesh plane; Step 4: In step 4, the flattened shape of the two-dimensional parameter domain triangular mesh plane is adjusted to a rectangle to obtain the bounding box parameters of the final result finalUV, and the deformation caused by the mapping is minimized; The execution process of step 4 includes the following steps: Step 4.1: Select four corner points from the boundary vertices of the two-dimensional parametric domain mesh plane and save the indices of these four corner points. , , , ; Step 4.2: Traverse all triangle mesh surfaces Create a boundary vertex. vector , Corresponding vertex , , , The value at index position is The values ​​at the remaining positions are 0, which are stored as the outer corners of the target parameter domain for subsequent execution of the boundary-first expansion algorithm; Step 5: Scale the 2D parametric plane to the specified design area; In step 5, the required coefficients are calculated based on the rectangular parameter plane and the design area, and the rectangular parameter plane is scaled to the design area; The execution process of step 5 includes the following steps: Step 5.1: Calculate the bottom-left corner coordinates of the bounding box of the design area , top-right corner coordinates , center coordinates ; The bounding box of the two-dimensional parametric domain mesh plane calculated in step 4 , , The calculated coordinates of all coordinates of the two-dimensional parametric domain grid plane Translation coefficients in the x and y directions , The calculation formula is as follows: Step 5.2: Calculation Scaling factor in x direction and y direction scaled to the design area , The specific calculation formula is as follows: Step 5.3: Construct a homogeneous transformation, which is Scaling to the size of the design rectangular region, get the two-dimensional parameter domain grid plane coordinate point set consistent with the shape of the design region , Specifically calculated by linear equations as follows: ; Step 6: Plan the machining trajectory on the two-dimensional parameter plane; Step 7: Inversely map the 2D machining trajectory to the input triangular mesh surface to obtain the final machining trajectory; In step 7, each input trajectory curve is discretized into several sets of trajectory points, mapped onto a plane and processed, and finally inversely mapped onto a three-dimensional mesh surface to obtain the final three-dimensional processing trajectory.

2. The method for generating freeform surface machining trajectories based on conformal mapping as described in claim 1, characterized in that, The execution process of step 6 specifically involves planning the two-dimensional machining trajectory on the design area, i.e., the deformed two-dimensional parameter domain triangular mesh plane.

Citation Information

Patent Citations

  • Curved surface regional girdling processing track generation method

    CN114660991A