A projection-based numerical control machining simulation method and medium
By acquiring workpiece feature information based on the projection view and generating tool contact trajectory, the problems of low efficiency and insufficient accuracy of traditional CNC trajectory generation are solved, and efficient and high-precision CNC machining is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2023-05-05
- Publication Date
- 2026-04-14
AI Technical Summary
Traditional CNC trajectory generation methods are inefficient and costly, and existing projection technologies suffer from distance errors, resulting in insufficient machining accuracy.
By acquiring surface and depth cross-sectional feature information of the workpiece based on the projection view, the area to be processed is determined, the tool contact trajectory is generated, and the CNC machining trajectory is generated. The processing accuracy and efficiency are improved through simulation.
It achieves high-precision CNC machining, improves workpiece processing efficiency, and reduces processing costs.
Smart Images

Figure CN116500972B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of CNC machining technology, specifically relating to a projection-based CNC machining simulation method and medium. Background Technology
[0002] Traditional CNC trajectory generation mainly involves manually analyzing two-dimensional part drawings or three-dimensional part models, and then designing machining trajectories and G-codes based on these drawings or models. This method is inefficient and costly.
[0003] The patent "Method and Apparatus for Generating Machining Trajectory" (application number CN201711382957.7) applies projection technology to the projection of the tool onto the workpiece surface. Based on the three-dimensional model of the workpiece, the surface is discretized into triangular models, transforming the curved surface into a polyhedral discrete plane. The projection point with the smallest tool projection distance is determined as the tool contact point corresponding to the driving point. The tool projection point and projection distance are determined by calculating the distance from the tool contact point to the workpiece, thus generating the machining trajectory of the workpiece surface. Although this patent discretizes the workpiece surface into triangular models, an error between the distance from the discretized triangular model to the tool and the actual distance from the workpiece to the tool is still unavoidable. Summary of the Invention
[0004] To overcome the above-mentioned technical defects, the present invention provides a projection-based CNC machining simulation method to obtain a machining area with higher precision.
[0005] To address the above problems, the present invention discloses the following technical solution:
[0006] A projection-based CNC machining simulation method includes the following steps:
[0007] Import the 3D model of the workpiece to be processed;
[0008] Obtain the projected views of the 3D model, which include the front view, rear view, left view, right view, top view, and bottom view;
[0009] Obtain surface machining feature information and depth section machining feature information of the workpiece to be processed based on the projection view;
[0010] The area to be processed is determined based on surface processing characteristics and depth section processing characteristics.
[0011] Based on the depth section machining feature information and the area to be machined, the tool contact trajectory is generated;
[0012] The CNC machining trajectory is generated based on the tool contact point trajectory and then simulated.
[0013] Furthermore, the surface processing feature information includes surface ring information, and the depth section processing feature information includes section ring information.
[0014] Furthermore, the steps involve obtaining surface machining feature information and depth section machining feature information of the workpiece to be processed based on the projected view, including the following steps:
[0015] Extract surface ring information from the projected view;
[0016] Based on the projected view, the depth on the view is set, and the cross-sectional ring information is extracted.
[0017] Furthermore, the step of obtaining surface machining feature information and depth section machining feature information of the workpiece to be processed based on the projected view also includes the following steps:
[0018] Set the milling depth of the milling machine according to the machining accuracy.
[0019] Furthermore, based on surface processing feature information and depth section processing feature information, the process determines the area to be processed, including the following steps:
[0020] Based on surface processing feature information and depth section processing feature information, the processing mode is determined. The processing mode includes inner contour processing mode and outer contour processing mode.
[0021] For the outer contour processing mode, the area outside the outer contour is defined as the area to be processed;
[0022] For the inner contour processing mode, the cavity area is divided into the non-cavity area. The cavity area includes the boundary contour and the island contour.
[0023] The area enclosed between the boundary outline and the island outline is defined as the area to be processed.
[0024] Furthermore, based on the depth section machining feature information and the area to be machined, the step generates the tool contact trajectory, including the following steps:
[0025] Based on the cross-sectional ring information and the area to be processed, obtain the two-dimensional contour;
[0026] Insert a transition arc;
[0027] The two-dimensional contour is equidistant.
[0028] Further steps to obtain the two-dimensional contour include the following:
[0029] The cross-sectional ring information is arranged in a head-to-tail order to form a segmented directed curve;
[0030] Determine whether the segments of a directed curve are continuous.
[0031] If continuous, then the continuous directed curve is a two-dimensional profile.
[0032] Furthermore, the step of inserting a transition arc includes the following steps:
[0033] Determine whether two adjacent straight lines and / or arcs in a two-dimensional profile are tangent;
[0034] If they are not tangent, insert a transition arc at the intersection point.
[0035] Furthermore, the process of generating CNC machining trajectories based on tool contact point trajectories and performing simulations also includes the following steps:
[0036] Calculate the CNC machining time based on the CNC machining trajectory;
[0037] Calculate the processing cost of the workpiece to be processed based on the CNC machining time and the milling machine processing cost.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] This invention discloses a projection-based CNC machining simulation method. The method determines the machining area based on the projection view of a 3D model and generates a tool machining trajectory, which can obtain a machining area with higher precision. Furthermore, the machining trajectory is generated directly from the 3D model, eliminating the need to convert the 3D part into a 2D drawing before designing the trajectory machining, thus greatly improving the efficiency of workpiece machining.
[0040] The present invention also discloses a medium, which is a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed, implements the above-described CNC machining simulation method. Attached Figure Description
[0041] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, wherein:
[0042] Figure 1 This is a flowchart of the CNC machining simulation method described in Example 1;
[0043] Figure 2 This is a schematic diagram of the outer contour machining mode of the CNC machining simulation method described in Example 1;
[0044] Figure 3 This is a schematic diagram of the inner contour machining mode of the CNC machining simulation method described in Example 1;
[0045] Figure 4 This is a schematic diagram of a three-dimensional model of the workpiece to be processed during the specific implementation of the CNC machining simulation method described in Example 1;
[0046] Figure 5This refers to the surface ring information in the top view during the specific implementation of the CNC machining simulation method described in Example 1;
[0047] Figure 6 This refers to the cross-sectional ring information of a section with a depth of 20mm in the front direction of the rear view during the specific implementation of the CNC machining simulation method described in Example 1;
[0048] Figure 7 This is a schematic diagram of the milling simulation process during the specific implementation of the CNC machining simulation method described in Example 1;
[0049] Figure 8 This is a schematic diagram of the finished product of milling the simulated workpiece during the specific implementation of the CNC machining simulation method described in Example 1;
[0050] Marking descriptions: 1. Outer contour; 2. Boundary contour within the inner contour; 3. Tool path. Detailed Implementation
[0051] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0052] Example 1
[0053] like Figure 1 This embodiment discloses a projection-based CNC machining simulation method, including the following steps:
[0054] S1. Import the 3D model of the workpiece to be processed. The format of the 3D model includes, but is not limited to, STEP and IGES.
[0055] S2. Obtain the projected views of the 3D model, including the front view, rear view, left view, right view, top view, and bottom view.
[0056] S3. Obtain the surface machining feature information and depth section machining feature information of the workpiece to be processed based on the projection view. The surface machining feature information includes surface ring information, and the depth section machining feature information includes section ring information.
[0057] Specifically, step S3 includes the following steps:
[0058] The projected view is deduplicated by removing lines, and surface ring information is extracted from the projected view. Surface ring information includes trapezoids, rectangles, arcs, elliptical arcs, etc.
[0059] Based on the machining accuracy, the milling depth of each step of the milling machine is set. The milling depth is also the depth for extracting the cross section. The projection view of the cross section is deduplicated to extract the cross section loop information of the cross section at that depth.
[0060] S4. Determine the area to be processed based on the surface processing feature information and the depth section processing feature information.
[0061] Specifically, step S4 includes the following steps:
[0062] Based on surface machining feature information and depth section machining feature information, the inner contour machining mode and outer contour machining mode are determined, such as... Figure 2 and Figure 3 .
[0063] For the outer contour processing mode, the area outside the outer contour is defined as the area to be processed.
[0064] For the inner contour processing mode, there are cavity areas and non-cavity areas. The cavity area includes boundary contours and island contours.
[0065] The area enclosed between the boundary outline and the island outline is defined as the area to be processed.
[0066] If there are no island contours within the cavity area, then the area within the boundary contour is defined as the area to be processed.
[0067] S5. Generate the tool contact trajectory based on the depth section machining feature information and the area to be machined.
[0068] Specifically, step S5 includes the following steps:
[0069] S501. Obtain the two-dimensional contour based on the cross-sectional ring information and the area to be processed:
[0070] The cross-sectional ring information is arranged in a head-to-tail order to form a segmented directed curve.
[0071] To determine whether a directed curve is continuous between its segments, determine whether the end of the preceding directed curve segment is the same as the starting point of the following directed curve segment.
[0072] If it is continuous, then the continuous directed curve is a two-dimensional profile; if it is discontinuous, then the curve needs to be modified.
[0073] In the above embodiments, the directed curves arranged in the required order are stored in a trajectory linked list.
[0074] In the above embodiments, the two-dimensional contour is equipped with infeed lines and retraction lines to prevent overcutting, collisions, and flash during the machining process.
[0075] S502, Insert transition arc:
[0076] Determine whether two adjacent straight lines and / or arcs in a two-dimensional profile are tangent; if not, insert a transition arc at the intersection point to connect the discontinuous curves.
[0077] S503. Equalize the two-dimensional contour.
[0078] The equidistant two-dimensional contour is the machining range of the tool contact point. The processed two-dimensional contour is a combination of straight lines and arc segments connected end to end, and the intersection points of adjacent line segments are tangent. Therefore, the equidistant distance of the contour is equal to the equidistant distance of the straight lines and arcs. The combination of equidistant curve segments is also a two-dimensional contour that is connected and tangent to each other, and its number of curve segments is the same as before equidistant distance.
[0079] The above embodiments also include the following steps:
[0080] Select the machining path for the cutting tool.
[0081] When a workpiece requires rough machining, the line cutting method is used. The line cutting method includes unidirectional cutting and reciprocating cutting.
[0082] When a workpiece requires precision machining, the circumferential cutting method is used.
[0083] S6. Generate CNC machining trajectory based on tool contact point trajectory and perform milling simulation.
[0084] The above embodiments also include the following steps:
[0085] Based on the CNC machining trajectory, calculate the CNC machining time required to perform the CNC machining trajectory.
[0086] Calculate the processing cost of the workpiece based on the CNC machining time and the average processing cost per minute of the milling machine.
[0087] The following explanation is based on the specific implementation process:
[0088] Import the 3D model of the workpiece to be processed, such as Figure 4 This process involves obtaining the six projected views of the 3D model. The top view is then deduplicated to remove duplicate lines and obtain surface ring information, such as... Figure 5 Surface ring information includes straight lines, arcs, rectangles, and trapezoids. The milling depth for each step of the milling machine is set according to the machining accuracy. This milling depth is also the depth for extracting the cross-section. The rear view of the cross-section is deduplicated to obtain the cross-sectional ring information at that depth interface. The cross-sectional ring information is obtained in the front direction of the rear view, with milling depths in 0.1mm increments. The cross-sectional ring information for a 20mm deep cross-section is displayed, such as... Figure 6 The cross-sectional ring information includes straight lines and trapezoids. Based on surface machining feature information and depth cross-sectional machining feature information, the inner contour machining mode is determined. The area enclosed between the boundary contour and the island contour is defined as the area to be machined. Based on the depth cross-sectional machining feature information and the area to be machined, the tool contact point trajectory is generated. Based on the tool contact point trajectory, a CNC machining trajectory is generated. Milling simulation is performed by combining line cutting and ring cutting methods (the simulation machining process is as follows). Figure 7 To obtain a simulated workpiece, such as... Figure 8 .
[0089] This invention determines the area to be processed by projecting a view based on a 3D model and generates a tool machining trajectory, which can obtain a more precise processing area. Furthermore, the machining trajectory is generated directly from the 3D model, eliminating the need to convert the 3D part into a 2D drawing before designing the trajectory, thus greatly improving the efficiency of workpiece processing.
[0090] Example 2
[0091] This embodiment discloses a medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, it implements the CNC machining simulation method described in Embodiment 1.
[0092] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Therefore, any modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A projection-based numerical control machining simulation method, characterized in that, Includes the following steps: Import the 3D model of the workpiece to be processed; Obtain the projected views of the 3D model, which include the front view, rear view, left view, right view, top view, and bottom view; The surface machining feature information and depth section machining feature information of the workpiece to be processed are obtained based on the projection view. The depth section machining feature information includes section ring information. The process of obtaining the depth section machining feature information of the workpiece to be processed based on the projection view includes: setting the depth on the view based on the projection view and extracting the section ring information. The area to be processed is determined based on surface processing characteristics and depth section processing characteristics. Based on the depth section machining feature information and the area to be machined, the tool contact trajectory is generated, including the following steps: Based on the cross-sectional ring information and the area to be processed, obtain the two-dimensional contour; Insert a transition arc; Equidite the two-dimensional contour; The CNC machining trajectory is generated based on the tool contact point trajectory and then simulated.
2. The CNC machining simulation method according to claim 1, characterized in that, Surface processing feature information includes surface ring information.
3. The CNC machining simulation method according to claim 2, characterized in that, The steps for obtaining surface machining feature information and depth section machining feature information of the workpiece to be processed based on the projected view include the following steps: Based on the projected view, extract the surface ring information on the projected view.
4. The CNC machining simulation method according to claim 3, characterized in that, The steps for obtaining surface machining feature information and depth section machining feature information of the workpiece to be processed based on the projected view also include the following steps: Set the milling depth of the milling machine according to the machining accuracy.
5. The CNC machining simulation method according to claim 1, characterized in that, The steps involve determining the area to be processed based on surface processing feature information and depth section processing feature information, including the following steps: Based on surface processing feature information and depth section processing feature information, the processing mode is determined. The processing mode includes inner contour processing mode and outer contour processing mode. For the outer contour processing mode, the area outside the outer contour is defined as the area to be processed; For the inner contour processing mode, the cavity area is divided into the non-cavity area. The cavity area includes the boundary contour and the island contour. The area enclosed between the boundary outline and the island outline is defined as the area to be processed.
6. The CNC machining simulation method according to claim 1, characterized in that, The steps to obtain a two-dimensional contour include the following: The cross-sectional ring information is arranged in a head-to-tail order to form a segmented directed curve; Determine whether the segments of a directed curve are continuous. If continuous, then the continuous directed curve is a two-dimensional profile.
7. The CNC machining simulation method according to claim 1, characterized in that, The steps for inserting a transition arc include the following: Determine whether two adjacent straight lines and / or arcs in a two-dimensional profile are tangent; If they are not tangent, insert a transition arc at the intersection point.
8. The CNC machining simulation method according to claim 1, characterized in that, The process of generating CNC machining trajectories based on tool contact point trajectories and performing simulations also includes the following steps: Calculate the CNC machining time based on the CNC machining trajectory; Calculate the processing cost of the workpiece to be processed based on the CNC machining time and the milling machine processing cost.
9. A medium, characterized in that, It is a computer-readable storage medium on which a computer program is stored, which, when executed, implements the CNC machining simulation method as described in any one of claims 1-8.
Citation Information
Patent Citations
Processing track generation method and corresponding device
CN108363357A
Path generation method for back-milling-tool three dimensional numerical control (NC) machining tool of trimming deflashing cutting edge abdication
CN103092133A