A tool contact point generation algorithm of CAM software for ultra-precision turning of complex curved surface three-dimensional model

CN117518992BActive Publication Date: 2026-08-18HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311449091.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2026-08-18
Estimated Expiration
2043-11-02

AI Technical Summary

Technical Problem

比起直接生成法,截面生成法计算更加简单,不涉及到模型之间的布尔运算,足够密集的截平面就可以提取出精度较高的数据点坐标,但其本质上仍然利用了三角网格,这也就意味着截面生成法同样被三角网格模型中的三角面片的大小所限制

Benefits of technology

[0057]本发明利用了开源软件库OCC和IGES模型的数据储存方式,通过将三维模型划分精细三角网格而获得目标精度点的方法变为了建模过程中的拓扑关系求交算法,巧妙的规避了三维模型的常规处理方法,对模型表面进行数据点提取。相较于直接生成法和截面生成法,该方法针对可规划理论加工轨迹的车削加工表面,通过建立几何曲线对任意坐标点进行求交,整个过程仅利用到了IGES模型所储存的参数方程和拓扑求交算法,与三维模型的显示无直接关联。该生成算法思路巧妙,另辟蹊径,不受三维模型分割精度的影响,所求坐标精度取决于编程语言的计算精度,足以满足超精密车削加工的需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117518992B_ABST
    Figure CN117518992B_ABST
Patent Text Reader

Abstract

A kind of tool contact point generation algorithm of complex curved surface three-dimensional model ultra-precision turning CAM software belongs to the field of ultra-precision CAM software algorithm, the present application is an effective method for realizing the generation of ultra-precision machining surface tool contact point.The algorithm introduces Open CASCADE (OCC) as geometry kernel, through the principle analysis of geometry kernel and the research on existing tool contact point generation algorithm, innovatively proposes the tool contact point generation algorithm suitable for ultra-precision machining field, so that the coordinate precision of generated tool contact point reaches 0.1nm, ensuring the programming precision of ultra-precision machining.The present application uses IGES such three-dimensional model information exchange standard, uses OCC library for analysis, then converts it into Brep format, and generates tool contact point on this basis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ultra-precision CAM software algorithms and is applicable to the extraction of ultra-high precision sampling points of 3D models in CAM software. Specifically, it is applied to the sampling of processing points on the surface of 3D models in ultra-precision CAM software. Background Technology

[0002] In the 21st century, ultra-precision turning of microstructured surfaces is a key technology. Due to their superior optical and performance characteristics, microstructured surfaces are finding increasingly widespread applications in energy, optics, and laser processing. Microstructured surfaces encompass a wide range of types, and their descriptive forms vary. Scholars typically categorize them into formula-based descriptive surfaces, array-based descriptive surfaces, and surfaces formed by discrete points. For formula-based and array-based descriptive surfaces, mathematical modeling is usually used to generate the tool contact points on the surface to be machined. However, this method is not suitable for complex curved surfaces.

[0003] Currently, there are many software programs available that can generate tool contact points for general machining accuracy. However, for ultra-precision machining, generating machining coordinates with the highest accuracy at the micrometer level is clearly insufficient. At present, methods for generating ultra-precision tool contact points are divided into direct generation and cross-section generation. The direct generation method directly uses a triangular mesh model to generate tool contact points that do not interfere with the tool. Specifically, after determining the tool model, Boolean operations are used to calculate the coordinates of the tool contact points that do not interfere with the mesh model. This method generates accurate coordinates in two-dimensional parameter space, but it has significant accuracy errors for three-dimensional models. The cross-section generation method, as the name suggests, uses a cutting plane to capture the intersection of a plane and the triangular mesh model, using the intersection point as the tool contact point. Compared to the direct generation method, the cross-section generation method is simpler to calculate, does not involve Boolean operations between models, and a sufficiently dense cutting plane can extract high-precision data point coordinates. However, it still essentially utilizes a triangular mesh, which means that the cross-section generation method is also limited by the size of the triangular faces in the triangular mesh model.

[0004] The above analysis reveals that while domestic and international scholars have indeed made breakthroughs in the research of algorithms for generating tool contacts on complex curved surfaces, many of these breakthroughs are at the theoretical algorithm level, lacking practical verification through part machining and trajectory analysis. Furthermore, the research on these algorithms concludes that for ultra-precision machining, the size of the triangular facets divided by the triangular mesh model is the fundamental limitation on high-precision coordinate data. Poorly discretized triangular mesh models directly affect the machining accuracy of the target surface. While subdividing the facets can significantly improve the quality of the triangular mesh model, this subdivision implies greater computational load, rendering difficulty, and longer generation time. Therefore, achieving a tool contact coordinate accuracy of 0.1 nm requires algorithms that can avoid or reduce the impact of triangular facet accuracy on the results. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a high-precision tool contact generation algorithm to meet the needs of ultra-precision machining, representing an effective method for generating tool contacts on ultra-precision machined surfaces. The algorithm incorporates Open CASCADE (OCC) as its geometric kernel. Through principle analysis of the geometric kernel and research on existing tool contact generation algorithms, it innovatively proposes a tool contact generation algorithm suitable for the field of ultra-precision machining, achieving a coordinate accuracy of 0.1 nm for the generated tool contacts, thus ensuring the programming precision of ultra-precision machining. This invention utilizes 3D model information exchange standards such as IGES, parsing the data using the OCC library and converting it to Brep format, upon which tool contact generation is performed.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] An algorithm for generating tool contact points in ultra-precision turning CAM software for complex curved surface 3D models includes the following steps:

[0008] S1. Use the OCC library for C++ programming to build a basic three-dimensional visual space, which serves as the cornerstone for the calculation of the knife contact point algorithm;

[0009] S2. Import the 3D model of the surface to be processed, select the topology of the surface generated by the tool contact point, and obtain the surface parameter equation information;

[0010] S3. Using an algorithm, a theoretical tool machining trajectory is generated on a plane at a distance n from the model surface. Without considering compensation and interpolation, only the programming accuracy and machining trajectory are considered to obtain the planar coordinates E(x,y) of the theoretical machining trajectory. Its programming accuracy reaches 0.1nm.

[0011] S4. Using the planar coordinates E(x,y) of the theoretical processing trajectory generated in S3, establish a planar coordinate set H(x,y,0), where the number of planar coordinates is m;

[0012] S5. Establish a direction vector V = (0, 0, 1) whose axis overlaps with the surface to be machined;

[0013] S6. Establish a loop and set j = 1;

[0014] S7. Extract the point H from the set of plane coordinates j (x j , y j , 0);

[0015] S8. Using the graphic database in OCC, create a geometric curve C passing through the point H j and facing the vector V based on the point in S7 and the direction vector in S5 j ;

[0016] S9. At this time, the geometric curve C obtained in S8 j intersects with the model at several intersection points. Use the interface GeomAPI_IntCS to establish an intersection point set N(x, y, z);

[0017] S10. Obtain the z - coordinate of the intersection point N whose z - value is closest to the surface through loop comparison j ;

[0018] S11. Establish a cutter contact point coordinate set with the number of coordinates being m, the same as the number of plane coordinates in S4, and allocate a memory quantity of 3m to store the x and y coordinates of the plane coordinate points extracted in S7 and the corresponding z - coordinate calculated in S10;

[0019] S12. If j < m, j = j + 1, return to S7; otherwise, complete the generation of all cutter contact points and exit the loop;

[0020] S13. Store the cutter contact point array into a.txt file, end the algorithm, and complete the generation of ultra - precision turning cutter contact points.

[0021] Furthermore, the specific steps of step S3 are as follows:

[0022] S3.1 Obtain the turning surface radius R through the target surface parametric equation information obtained in S2;

[0023] S3.2 Set the turning processing parameters: the feed rate F in the X - direction x and the spindle speed ω, and set the number of sampling points per revolution N according to the requirements of ultra - precision machining to achieve an accuracy of 0.1 nm. The total number of machining points M can be obtained from the following formula:

[0024]

[0025] S3.3 The turning trajectory is established at equal angles, and the tool feed mode is set from the workpiece center to the boundary. A cycle is established, and let i = 1;

[0026] S3.4 Calculate the radius of the i-th point as

[0027] S3.5 The radian of the i-th point is

[0028] S3.6 Obtain the coordinates E(x i , y i ) of the i-th point in polar coordinate mode as E(R i cosθ i , R i sinθ i );

[0029] S3.7 If i < m, then i = i + 1, and return to S3.4; otherwise, complete the generation of the theoretical tool machining trajectory and exit the cycle.

[0030] An algorithm for generating cutter contact points of a super-precision turning CAM software for a complex surface three-dimensional model includes the following steps:

[0031] Step 1: Use the OCC library for C++ programming to build a basic three-dimensional visual space as the cornerstone for calculating the cutter contact point algorithm;

[0032] Step 2: Import the three-dimensional model of the surface to be machined, select the topological structure of the surface for generating cutter contact points, and obtain the surface parameter equation information;

[0033] Step 3: Use the OCC library to establish a triangulated model of the three-dimensional model;

[0034] Step 4: By adjusting the linear offset and angular deflection parameters of the triangulated model, reconstruct a triangular mesh model with a mesh size less than 50μm 2 , and a regular shape;

[0035] Step 5: Use the interface Poly_Triangle to extract the rectangular coordinate system coordinates (a, b, c) of the three vertices of each triangular patch, and use the interface TColgp_Array1OfPnt2d to obtain the corresponding parameter space coordinates (u, v);

[0036] Step 6: Generate an array of triangular vertex coordinates using the triangular vertex coordinates extracted in Step 5;

[0037] Step 7: Use the algorithm to generate the theoretical tool machining trajectory on the plane, without considering compensation and interpolation, only considering the programming accuracy and machining trajectory, and obtain the plane coordinates B(x, y) of the theoretical tool machining trajectory;

[0038] Step 8: Generate a plane coordinate array G(x, y, 0) using the plane coordinates B(x, y) of the theoretical tool path generated in Step 7, where the number of plane coordinates is p;

[0039] Step 9: Establish a loop and set k = 1;

[0040] Step 10: Select the point G k (x k , y k , 0);

[0041] Step 11: Retrieve the point G in the triangle vertex coordinate library k ;

[0042] Step 12: Confirm that the point G k is inside a certain triangle in the triangular mesh model, locate this triangle, and use the rectangular coordinate system coordinates and parameter space coordinates of this triangle obtained in Step 5 to establish a parametric equation F k (a, b, c) = (u, v);

[0043] Step 13: Map the coordinates (x k , y k ) of the point G k through F k to the two-dimensional parameter space to obtain the mapped coordinates J k of the point G k (u k , v<° k );

[0044] Step 14: Map the obtained coordinates J k (u k , v k ) through F k to the three-dimensional space to obtain the coordinates (a k , b k , c k ) of the point G k ', and the point G k ' is the k-th tool contact point on the complex surface, which is saved to a new array - the tool contact point array, where the total number of coordinates is also p;

[0045] Step 15: If k < p, k = k + 1, and return to Step 10; otherwise, complete the generation of all tool contact points and exit the loop;

[0046] Step 16: Store the tool contact point array into a.txt file, the algorithm ends, store the tool contact point array into a.txt file, the algorithm ends, and complete the generation of the ultra-precision turning tool contact points.

[0047] Furthermore, the specific steps of Step 7 are as follows:

[0048] Step 7.1: Obtain the turning surface radius R based on the target surface parameter equation information obtained in Step 2;

[0049] Step 7.2: Set the turning machining parameters: the feed rate F in the X direction x and the spindle speed ω, and set the number of sampling points N per revolution according to the requirements of ultra-precision machining to achieve an accuracy of 0.1 nm. The total number of machining points M can be obtained from the following formula:

[0050]

[0051] Step 7.3: Establish the turning trajectory at equal angles, set the tool path as from the workpiece center to the boundary, establish a loop, and let i = 1;

[0052] Step 7.4: Calculate the radius of the i-th point as

[0053] Step 7.5: The radian of the i-th point is

[0054] Step 7.6: Obtain the coordinates E(x i , y i ) of the i-th point in polar coordinates as E(R i cosθ i , R i sinθ i );

[0055] Step 7.7: If i < p, i = i + 1, and return to Step 7.4; otherwise, complete the generation of the theoretical tool machining trajectory and exit the loop.

[0056] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0057] The present invention utilizes the data storage method of the open-source software library OCC and the IGES model, and changes the method of obtaining target accuracy points by dividing the three-dimensional model into fine triangular meshes into the topological relationship intersection algorithm in the modeling process,巧妙 avoiding the conventional processing method of the three-dimensional model and extracting data points on the model surface. Compared with the direct generation method and the section generation method, for the turning machining surface with a predictable theoretical machining trajectory, this method performs intersection for any coordinate point by establishing geometric curves. The whole process only utilizes the parameter equation stored in the IGES model and the topological intersection algorithm, and has no direct association with the display of the three-dimensional model. The generation algorithm has a clever idea, breaks new ground, is not affected by the segmentation accuracy of the three-dimensional model, and the accuracy of the obtained coordinates depends on the calculation accuracy of the programming language, which is sufficient to meet the requirements of ultra-precision turning machining. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is the algorithm flow chart in the first specific embodiment;

[0059] Figure 2 A schematic diagram of the algorithm is provided.

[0060] Figure 3 A 3D model of a mesh created using UG;

[0061] Figure 4 Extract scatter plots from 3D models;

[0062] Figure 5 This is the main view of the 3D model of the accuracy test model;

[0063] Figure 6 This is a top view of the 3D model of the accuracy test model;

[0064] Figure 7 The surface of the test accuracy model proposed for the knife contact point generation accuracy algorithm;

[0065] Figure 8 This is a flowchart of the algorithm in the second specific implementation method. Detailed Implementation

[0066] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some embodiments of the invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention. Specific Implementation Method 1

[0068] An algorithm for generating tool contact points in ultra-precision turning CAM software for complex curved surface 3D models includes the following steps:

[0069] S1. Use the OCC library for C++ programming to build a basic three-dimensional visual space, which serves as the cornerstone for the calculation of the knife contact point algorithm;

[0070] S2. Import the 3D model of the surface to be processed, select the topology of the surface generated by the tool contact point, and obtain the surface parameter equation information;

[0071] S3. Using an algorithm, a theoretical tool machining trajectory is generated on a plane at a distance n from the model surface. Without considering compensation and interpolation, only the programming accuracy and machining trajectory are considered to obtain the planar coordinates E(x,y) of the theoretical machining trajectory. Its programming accuracy reaches 0.1nm.

[0072] S4. Using the planar coordinates E(x,y) of the theoretical processing trajectory generated in S3, establish a planar coordinate set H(x,y,0), where the number of planar coordinates is m;

[0073] S5. Establish a direction vector V = (0, 0, 1) whose axis overlaps with the surface to be machined;

[0074] S6. Establish a loop and set j = 1;

[0075] S7. Extract the point H in the plane coordinate set j (x j , y j , 0);

[0076] S8. Using the graphic database in OCC, based on the point in S7 and the direction vector in S5, create a geometric curve C passing through the point H j and facing the vector V j ;

[0077] S9. At this time, the geometric curve C obtained in S8 j intersects the model at several intersection points. Use the interface GeomAPI_IntCS to establish an intersection point set N(x, y, z);

[0078] S10. Obtain the z - coordinate of the intersection point N whose z - value is closest to the surface through loop comparison j ;

[0079] S11. Establish a tool contact point coordinate set with the number of coordinates being m, the same as the number of plane coordinates in S4, and allocate a memory quantity of 3m. Store the x and y coordinates of the plane coordinate points extracted in S7 and the corresponding z - coordinate calculated in S10 respectively;

[0080] S12. If j < m, set j = j + 1 and return to S7; otherwise, complete the generation of all tool contact points and exit the loop;

[0081] S13. Store the tool contact point array into a.txt file, the algorithm ends, and the generation of ultra - precision turning tool contact points is completed.

[0082] Furthermore, the specific steps of step S3 are as follows:

[0083] S3.1 Obtain the turning surface radius R through the target surface parametric equation information obtained in S2;

[0084] S3.2 Set the turning processing parameters: the feed rate F in the X - direction x and the spindle speed ω, and set the number of sampling points per revolution N according to the ultra - precision machining requirements to achieve an accuracy of 0.1 nm. The total number of machining points M can be obtained from the following formula:

[0085]

[0086] S3.3 The turning trajectory is established at equal angles, and the tool path mode is set from the workpiece center to the boundary. Establish a loop and set i = 1;

[0087] S3.4 Calculate the radius of the i-th point as

[0088] S3.5 The radian of the i-th point is

[0089] S3.6 Obtain the coordinates E(x i , y i ) of the i-th point in polar coordinate mode as E(R i cosθ i , R i sinθ i );

[0090] S3.7 If i < m, i = i + 1, return to S3.4; otherwise, complete the generation of the theoretical tool machining trajectory and exit the loop. Specific Embodiment 2

[0092] A tool contact point generation algorithm for a super-precision turning CAM software of a complex surface three-dimensional model includes the following steps:

[0093] Step 1: Use the OCC library for C++ programming to build a basic three-dimensional visual space as the cornerstone for the calculation of the tool contact point algorithm;

[0094] Step 2: Import the three-dimensional model of the surface to be machined, select the topological structure of the surface for generating tool contact points, and obtain the surface parameter equation information;

[0095] Step 3: Use the OCC library to establish a triangulated model of the three-dimensional model;

[0096] Step 4: By adjusting the linear offset and angular deflection parameters of the triangulated model, reconstruct a triangular mesh model with a mesh size less than 50μm 2 , and a regular shape;

[0097] Step 5: Use the interface Poly_Triangle to extract the rectangular coordinate system coordinates (a, b, c) of the three vertices of each triangular patch, and use the interface TColgp_Array1OfPnt2d to obtain the corresponding parameter space coordinates (u, v);

[0098] Step 6: Generate an array of triangular vertex coordinates using the triangular vertex coordinates extracted in Step 5;

[0099] Step 7: Use the algorithm to generate the theoretical tool machining trajectory on the plane, without considering compensation and interpolation, only considering the programming accuracy and machining trajectory, and obtain the plane coordinates B(x, y) of the theoretical tool machining trajectory;

[0100] Step 8: Generate a plane coordinate array G(x, y, 0) using the plane coordinates B(x, y) of the theoretical tool path generated in Step 7, where the number of plane coordinates is p;

[0101] Step 9: Establish a loop and set k = 1;

[0102] Step 10: Select the point G k (x k , y k , 0) in the plane coordinate library;

[0103] Step 11: Retrieve the point G k in the triangle vertex coordinate library;

[0104] Step 12: Confirm that the point G k is inside a certain triangle in the triangular mesh model, locate this triangle, and use the rectangular coordinate system coordinates and parameter space coordinates of this triangle obtained in Step 5 to establish a parametric equation F k (a, b, c) = (u, v);

[0105] Step 13: Map the coordinates (x k , y k ) of the point G k through F k to the two-dimensional parameter space to obtain the mapped coordinates J k of the point G k (u k , v k );

[0106] Step 14: Map the obtained coordinates J k (u k , v k ) through F k to the three-dimensional space to obtain the coordinates (a k , b k , c k ) of the point G k ', and the point G k ' is the k-th tool contact point on the complex surface, which is saved to a new array - the tool contact point array, where the total number of coordinates is also p;

[0107] Step 15: If k < p, k = k + 1, and return to Step 10; otherwise, complete the generation of all tool contact points and exit the loop;

[0108] Step 16: Store the tool contact point array into a.txt file, the algorithm ends, store the tool contact point array into a.txt file, the algorithm ends, and complete the generation of the ultra-precision turning tool contact points.

[0109] Furthermore, the specific steps of Step 7 are as follows:

[0110] Step 7-1: Obtain the turning surface radius R based on the target surface parametric equation information obtained in Step 2;

[0111] Step 7-2: Set the turning machining parameters: the feed rate F in the X direction x and the spindle speed ω, and set the number of sampling points N per revolution according to the requirements of ultra-precision machining to achieve an accuracy of 0.1 nm. The total number of machining points M can be obtained from the following formula:

[0112]

[0113] Step 7-3: Establish the turning trajectory at equal angles, set the tool path mode as from the workpiece center to the boundary, establish a loop, and let i = 1;

[0114] Step 7-4: Calculate the radius of the i-th point as

[0115] Step 7-5: The radian of the i-th point is

[0116] Step 7-6: Obtain the coordinates E(x i , y i ) of the i-th point in polar coordinates as E(R i cosθ i , R i sinθ i );

[0117] Step 7-7: If i < p, i = i + 1, and return to Step 7-4; otherwise, complete the generation of the theoretical tool machining trajectory and exit the loop.

[0118] The present invention utilizes the open-source software library OCC. By using the parametric equation mapping algorithm (Steps 12, 13, and 14), the Cartesian coordinate system is converted into a parametric equation coordinate system. Based on the triangulation of the model, without using the direct generation method and the section generation method, by retrieving within the triangle and calculating using the parametric equation, the three-dimensional coordinates of the target point are obtained, achieving the code accuracy for generating the ultra-precision turning tool contact points. This algorithm utilizes the mapping algorithm based on the model segmentation, is not affected by the accuracy of the triangulation segmentation, and the obtained coordinates are based on the triangulation algorithm of the OCC library, which is sufficient to meet the requirements of ultra-precision turning machining.

[0119] Figure 1 It is the algorithm flow chart in the first specific implementation manner. First, establish the corresponding triangular mesh model for the imported model. Secondly, establish the theoretical machining trajectory on the plane. Establish a geometric curve through the direction vector and each point of the theoretical machining trajectory and intersect it with the model to obtain the three-dimensional coordinates of the intersection point, which are the coordinates of the turning tool contact points;

[0120] Figure 2The diagram below illustrates steps S7-S11 in the first specific implementation method. Taking the theoretical machining point (2.02300000, 0.60100000, 0.00000000) as an example, a geometric curve is created along the positive vector V of the Z-axis and intersects with the model. The coordinates of the intersection point are (2.02300000, 0.60100000, 13.39798028).

[0121] Figure 3 This is a 3D model of a 500nm wavelength mesh surface created using UG. The sinusoidal mesh model is a common surface feature in ultra-precision turning, so this model is used as an experimental model for the ultra-precision tool contact generation algorithm.

[0122] Figure 4 To use specific implementation methods one and two Figure 3 A scatter plot of ultra-precision knife contacts generated by the imported sinusoidal mesh model is used to verify the feasibility of specific implementation methods one and two.

[0123] Figure 5 , Figure 6 The figures show the front and top views of the three-dimensional models of the accuracy test models for specific implementation methods one and two. Ultra-precision turning features are usually micron-level structures, so it is necessary to test and verify the accuracy of specific implementation methods one and two. The models in the figures have grooves of 500μm, 100μm, 50μm, 10μm, 5μm and 1μm respectively.

[0124] Figure 7 The ultra-precision tool contact scatter plot generated using specific implementation methods one and two is used to verify that specific implementation methods one and two meet the feature recognition accuracy requirements of ultra-precision turning.

[0125] Figure 8 The algorithm flowchart in the second specific implementation method is as follows: First, a corresponding triangular mesh model is established for the imported model. Then, a theoretical machining trajectory is established on the plane. By retrieving the mesh where each point of the theoretical machining trajectory is located, the parameter coordinates of the point are obtained by mapping it. The three-dimensional coordinates of the point are calculated by the parametric equation, which are the coordinates of the turning tool contact point.

[0126] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A tool contact point generation algorithm for ultra-precision turning CAM software of complex curved surface 3D models, characterized in that, Include S1. Use the OCC library for C++ programming to build a basic three-dimensional visual space as the cornerstone for the calculation of the tool contact point algorithm; S2. Import the three-dimensional model of the surface to be machined, select the topological structure of the surface generated by the tool contact points, and obtain the surface parametric equation information; S3. Use the algorithm to generate the theoretical tool machining trajectory of the plane at a distance n extremely far from the model surface. Without considering compensation and interpolation, only considering programming accuracy and machining trajectory, obtain the plane coordinates E(x, y) of the theoretical machining trajectory, and its programming accuracy reaches 0.1 nm; Step S3 specifically includes S3.1 Obtain the turning surface radius R through the target surface parametric equation information obtained in S2; S3.2 Set turning parameters: X-axis feed rate F x Given the spindle speed ω, and setting the number of sampling points N per revolution according to ultra-precision machining requirements to achieve an accuracy of 0.1nm, the total number of machining points M can be obtained from the following formula: S3.3 The turning trajectory is established at equal angles, the feed mode is set from the workpiece center to the boundary, establish a loop, and set i = 1; S3.4 Calculate the radius of the i-th point. ; S3.5 The radian measure of the i-th point is ; S3.6 Obtain the coordinates of the i-th point in polar coordinates. ; S3.7 If i < m, i = i + 1, return to S3.4; otherwise, complete the generation of the theoretical tool machining trajectory and exit the loop; S4. Use the plane coordinates E(x, y) of the theoretical machining trajectory generated in S3 to establish a plane coordinate set H(x, y, 0), where the number of plane coordinates is m; S5. Establish a direction vector V = (0, 0, 1), whose axis overlaps with the surface to be machined; S6. Establish a loop and set j = 1; S7. Extract point H from the plane coordinate set. j (x j , y j , 0); S8. Using the graphics database in OCC, based on the points in S7 and the direction vectors in S5, create a map through point H. j And the geometric curve C oriented towards vector V j ; S9. The geometric curve C obtained at this time S8 j The model intersects at several intersection points, and the intersection point set N(x, y, z) is established using the interface GeomAPI_IntCS; S10. Obtain the intersection point N with the closest z-value to the surface through cyclic comparison. j The z-coordinate; S11. Establish a tool contact point coordinate set with the number of coordinates being m, the same as the number of plane coordinates in S4, and the allocated memory quantity being 3m, which respectively store the x and y coordinates of the plane coordinate points extracted in S7 and the corresponding z coordinates calculated in S10; S12. If j < m, j = j + 1, return to S7; Otherwise, complete the generation of all tool contact points and exit the loop; S13. Store the tool contact point array into a.txt file, the algorithm ends, and the generation of ultra-precision turning tool contact points is completed.

2. A tool contact point generation algorithm for ultra-precision turning CAM software of complex curved surface 3D models, characterized in that, Include S1 Use the OCC library for C++ programming to build a basic three-dimensional visual space as the cornerstone for the calculation of the tool contact point algorithm; S2 Import the three-dimensional model of the surface to be machined, select the topological structure of the surface generated by the tool contact points, and obtain the surface parametric equation information; S3 Use the OCC library to establish a triangulation model of the three-dimensional model; S4 reconstructs meshes smaller than 50μm by adjusting the linear offset and angular deflection parameters of the triangulation model. 2 A triangular mesh model with a regular shape; S5 Use the interface Poly_Triangle to extract the rectangular coordinate system coordinates (a, b, c) of the three vertices of each triangular patch, and use the interface TColgp_Array1OfPnt2d to obtain the corresponding parametric space coordinates (u, v); S6 Use the triangular vertex coordinates extracted in S5 to generate a triangular vertex coordinate array; S7 Use the algorithm to generate the theoretical tool machining trajectory on the plane. Without considering compensation and interpolation, only considering programming accuracy and machining trajectory, obtain the plane coordinates B(x, y) of the theoretical tool machining trajectory; S7 specifically includes S7.1 Obtain the turning surface radius R through the target surface parametric equation information obtained in S2; S7.2 Set turning parameters: X-axis feed rate F x Given the spindle speed ω, and setting the number of sampling points N per revolution according to ultra-precision machining requirements to achieve an accuracy of 0.1nm, the total number of machining points M can be obtained from the following formula: S7.3 The turning trajectory is established at equal angles, the feed mode is set from the workpiece center to the boundary, establish a loop, and set i = 1; S7.4 Calculate the radius of the i-th point as ; The radian measure of point i in S7.5 is ; S7.6 Obtain the coordinates of the i-th point using polar coordinates. ; S7.7 If i < p, i = i + 1, return to S7 four; otherwise, complete the generation of the theoretical tool machining trajectory and exit the loop; S8 generates a plane coordinate array G(x, y, 0) using the plane coordinates B(x, y) of the theoretical tool machining trajectory generated by S7, where the number of plane coordinates is p; S9 establishes a loop and sets k = 1; S10 Select point G from the plane coordinate library k (x k , y k ,0); S11 retrieves point G from the triangle vertex coordinate database. k ; S12 Confirmation Point G k Within a triangle in the triangular mesh model, locate the triangle and, using the Cartesian coordinates and parameter space coordinates of the triangle obtained from S5, establish the parametric equations. ; S13 will point G k coordinates (x) k , y k ) via F k Mapping to a two-dimensional parameter space, we obtain G k Point mapping coordinates J k (u k , v k ); S14 will obtain the coordinates J k (u k , v k ) via F k Mapping to three-dimensional space, we obtain point G. k The coordinates of 'a' k , b k , c k ), point G k This refers to the k-th tool contact point on the complex curved surface, which is saved to a new array—the tool contact point array—where the total number of coordinates is also p. S15 If k < p, k = k + 1, and return to S10; otherwise, complete the generation of all tool contact points and exit the loop; S16 Store the tool contact point array into a.txt file, the algorithm ends, store the tool contact point array into a.txt file, the algorithm ends, and complete the generation of ultra-precision turning tool contact points.

Citation Information

Patent Citations

  • Method for optimizing free-curved-surface NC processing cutter track under non-uniform tolerance

    CN107037779A

  • Variable-step-distance micro-milling repair cutter path generating method for damage points on surface of optical crystal

    US20220152873A1