Numerical control programming method and readable storage medium for complex curved spherical flow channels

CN122569157APending Publication Date: 2026-08-14HANSONG NANJING TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610949781.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

由于流道表面曲率变化剧烈且空间走向复杂,通用的CAM算法极易在流道的弯曲内侧产生欠切(或过切)或在非加工区域产生空切

Benefits of technology

本发明通过提取二维流道中心线并在辅助面上投影生成刀路,将原本复杂的3D流道加工问题转化为受控的流线切削问题,从根本上避免了空切现象;通过剔除进退刀与抬刀路径,获得纯净的切削参考线,使刀路在流道表面均匀分布,显著提升了加工表面质量;同时,整个编程流程逻辑清晰、步骤固定,便于模板化与自动化实现,大幅降低了对编程人员经验的依赖,提高了编程效率与工艺稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569157A_ABST
    Figure CN122569157A_ABST
Patent Text Reader

Abstract

This invention discloses a CNC programming method and readable storage medium for complex curved spherical flow channels, executed by a CNC programming system. The method includes: acquiring a three-dimensional model of the flow channel to be machined; analyzing and extracting a two-dimensional flow channel centerline from the three-dimensional model based on the Z-axis direction of the machining coordinate system; constructing a first auxiliary surface and a second auxiliary surface; configuring corresponding ball end mill parameters in response to the cross-sectional dimensions of the flow channel; projecting the two-dimensional flow channel centerline along the Z-axis direction onto the first and second auxiliary surfaces to generate a first initial toolpath and a second initial toolpath; extracting the cutting movement segments to generate a first reference line and a second reference line; setting the upper and lower boundaries of the streamlined cutting machining; and a final machining toolpath that reciprocates from top to bottom. This application provides a CNC programming method and system that can simplify the machining of complex 3D flow channels into streamlined cutting based on reference lines, thereby effectively avoiding empty cutting and improving programming efficiency and machining quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of CNC machining and mold manufacturing technology. Specifically, it relates to a CNC programming method and system for complex curved spherical flow channels in plastic molds, which is particularly suitable for high-precision machining of flow channels with three-dimensional spatial bending and twisting characteristics, such as beverage bottle blow molding and medical catheter molds. Background Technology

[0002] In modern precision plastic mold manufacturing, complex 3D curved spherical runners are often designed inside the mold to achieve uniform cooling or material delivery. For example, in injection or blow molding molds for beverage bottle preforms, the geometric accuracy of the runners directly determines the molding cycle, surface finish, and uniformity of fluid distribution of the plastic part.

[0003] However, existing technologies face significant bottlenecks when handling such flow channel machining. Traditional CNC programming typically involves directly machining curved surfaces or regions based on 3D models. Due to the dramatic changes in surface curvature and complex spatial orientation of the flow channel, general CAM algorithms are prone to undercutting (or overcutting) on ​​the curved inner side of the flow channel or producing empty cuts in non-machining areas. Furthermore, to mitigate these risks, programmers often need to spend considerable time manually intervening, adjusting the toolpath and tool entry / exit points, resulting in low programming efficiency and extreme reliance on personal experience. Even so, the generated toolpaths often leave uneven tool marks and tool joint marks on the flow channel sidewalls and bottom, forcing factories to invest significant manpower in subsequent manual polishing, which not only increases costs but also makes it difficult to guarantee batch quality stability. Therefore, there is an urgent need for a programming solution that can reduce the complexity of 3D spatial machining problems to a lower dimension, thereby automatically generating toolpaths with no empty cuts and high uniformity. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a CNC programming method and system that can simplify the machining of complex 3D flow channels into streamline cutting based on reference lines, thereby effectively avoiding empty cutting and improving programming efficiency and machining quality, in view of the above-mentioned deficiencies in the prior art.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: A CNC programming method for complex curved spherical flow channels, executed by a CNC programming system, the method comprising: Obtain a three-dimensional model of the flow channel to be processed, wherein the cross-section of the flow channel to be processed is a semi-circle with a preset diameter; Based on the Z-axis direction of the machining coordinate system, a two-dimensional flow channel centerline is analyzed and extracted from the three-dimensional model; Based on the highest and lowest contour lines of the three-dimensional model in the Z-axis direction, a first auxiliary surface and a second auxiliary surface are constructed respectively, and both the first auxiliary surface and the second auxiliary surface are perpendicular to the Z-axis. In response to the cross-sectional dimensions of the flow channel, the corresponding ball end mill parameters are configured; The center line of the two-dimensional flow channel is projected along the Z-axis onto the first auxiliary surface and the second auxiliary surface respectively to generate a first initial tool path and a second initial tool path; Data cleaning is performed on the first and second initial tool paths to extract the cutting movement segments, generate the first and second reference lines, and remove the tool entry, retraction, and lifting paths. The first reference line and the second reference line are respectively set as the upper and lower boundaries of the streamline cutting process; Generate the final machining toolpath that reciprocates from top to bottom between the upper and lower boundaries, and output the CNC machining program.

[0006] Furthermore, the data cleaning of the first initial toolpath and the second initial toolpath specifically includes: Traverse the G-codes or tool position data points in the initial toolpath; Based on changes in feed rate or Z-axis height, non-cutting movement commands can be identified and separated. The preserved cutting movement trajectory is converted into a geometric vector curve, and a reference line is generated.

[0007] Furthermore, the ball-end cutting tool parameters include the tool diameter and the tip radius; wherein, the tool diameter is equal to the diameter of the flow channel cross-section, and the tip radius is equal to the radius of the flow channel cross-section.

[0008] Furthermore, when generating the final machining toolpath, a constant residual height algorithm or a constant layer depth of cut algorithm is used to set the cutting step distance, and the value of the cutting step distance is in the range of 0.05mm to 0.2mm.

[0009] To achieve the above process, this application also provides a CNC programming system for complex curved spherical flow channels, comprising: The model acquisition module is used to acquire a three-dimensional model of the flow channel to be processed, wherein the cross-section of the flow channel to be processed is a semi-circle with a preset diameter; The feature extraction module is used to analyze and extract a two-dimensional flow channel centerline from the three-dimensional model based on the Z-axis direction of the machining coordinate system; The auxiliary surface construction module is used to construct a first auxiliary surface and a second auxiliary surface based on the highest and lowest contour lines of the three-dimensional model in the Z-axis direction, respectively. The tool configuration module is used to configure the corresponding ball end tool parameters in response to the cross-sectional dimensions of the flow channel; The projection module is used to project the center line of the two-dimensional flow channel along the Z-axis onto the first auxiliary surface and the second auxiliary surface respectively, thereby generating a first initial tool path and a second initial tool path; The reference line generation module is used to perform data cleaning on the first initial tool path and the second initial tool path, extract the cutting movement segment, and generate the first reference line and the second reference line. The toolpath calculation module is used to set the first reference line and the second reference line as the upper and lower boundaries of the streamline cutting process, respectively, and generate the final machining toolpath that reciprocates between the two. The output module is used to output CNC machining programs.

[0010] Furthermore, the reference line generation module is specifically used to call the kernel interface of the CAM software to filter the tool position file in order to eliminate non-cutting movement trajectories.

[0011] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0012] The advantages of this invention over the prior art are: This invention transforms the complex 3D flow channel machining problem into a controlled streamline cutting problem by extracting the center line of the two-dimensional flow channel and projecting it onto an auxiliary surface to generate the toolpath, fundamentally avoiding the phenomenon of empty cutting. By eliminating the tool entry, retraction, and lifting paths, a pure cutting reference line is obtained, making the toolpath evenly distributed on the flow channel surface and significantly improving the surface quality of the machined material. At the same time, the entire programming process has a clear logic and fixed steps, which facilitates template-based and automated implementation, greatly reducing the dependence on the programmer's experience and improving programming efficiency and process stability. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0014] Figure 1 This is a flowchart illustrating the overall process of CNC programming for complex curved spherical flow channels provided in Embodiment 1 of the present invention. Figure 2A This is a schematic diagram of a three-dimensional model of the flow channel to be processed in Embodiment 1 of the present invention; Figure 2B for Figure 2A A schematic diagram of the two-dimensional flow channel centerline extracted from it; Figure 2C , Figure 2D for Figure 2A A schematic diagram of the auxiliary surface created and the initial toolpath generated by the projection; Figure 2E This is a schematic diagram of the two sets of reference lines obtained after conversion and cleanup from the initial toolpath; Figure 2F This is a schematic diagram of the final streamlined cutting toolpath generated based on the reference line; Figure 3 This is a structural block diagram of the CNC programming system for a complex curved spherical flow channel in Embodiment 2 of the present invention. Detailed Implementation

[0015] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and accompanying drawings. The content mentioned in the embodiments is not intended to limit the present invention.

[0016] Example 1: CNC Programming Method This embodiment provides a CNC programming method for complex curved spherical flow channels. This method can be implemented based on mainstream CAM software platforms such as UGNX and PowerMILL, through manual operation steps or secondary development of macro commands.

[0017] like Figure 1 As shown, the specific process of the method is as follows: Step S1: Obtain the 3D model. Obtain a three-dimensional model of the complex 3D curved spherical flow channel on the plastic mold to be processed. The cross-section of the flow channel to be processed is a semicircle with a preset diameter; for example... Figure 2A As shown, the model contains a spherical flow channel with a cross-section of a semicircle with a diameter of 8 mm, which has a complex undulating surface and spatial curvature.

[0018] Step S2: Extract the 2D flow channel centerline.

[0019] Establish a machining coordinate system (G54), locking the Z-axis as the projection direction. Utilize the curve extraction function of the CAM software to extract the centerline from the 3D flow channel solid. For example... Figure 2B As shown, the two-dimensional center line L1 is the projection of the flow channel onto the XY plane, and it will become the core trajectory for driving the tool movement.

[0020] Step S3: Create auxiliary surfaces. Based on the highest and lowest contour lines of the 3D model in the Z-axis direction, construct a first auxiliary surface and a second auxiliary surface, both of which are perpendicular to the Z-axis of the machining coordinate system.

[0021] like Figure 2C As shown, the height distribution of the flow channel model along the Z-axis is analyzed to determine its highest point P_max and lowest point P_min. A first auxiliary surface A1 is created through point P_max, and a second auxiliary surface A2 is created through point P_min. Both auxiliary surfaces are strictly perpendicular to the Z-axis. These two surfaces define the top and bottom limits of the flow channel machining.

[0022] Step S4: Create the tool. Configure the corresponding ball end mill parameters in response to the cross-sectional dimensions of the flow channel.

[0023] Based on the flow channel cross-sectional diameter (8mm) confirmed in step S1, define a ball end mill in the tool magazine. In this embodiment, a ball end mill (D8R4) with a diameter D=8mm and a tip radius R=4mm is selected to ensure geometric fit between the tool side and the inner wall of the flow channel.

[0024] Step S5: Project to generate initial toolpaths. Project the centerline of the two-dimensional flow channel along the Z-axis onto the first auxiliary surface and the second auxiliary surface respectively to generate the first initial toolpath and the second initial toolpath; Activate the projection processing strategy of CAM software, such as Figure 2D As shown, using the two-dimensional centerline L1 extracted in step S2 as the driving curve, projection calculations are performed along the negative Z-axis onto auxiliary surfaces A1 and A2 respectively to generate the first initial toolpath P1 and the second initial toolpath P2. The generated path at this time contains a complete machining cycle, including all commands such as safe height tool lowering, cutting movement, tool retraction, and rapid tool lifting.

[0025] Step S6: Convert and clean the reference lines. Perform data cleaning on the first and second initial toolpaths, extract the cutting movement segments, generate the first and second reference lines, and remove the tool feed, retraction, and lifting paths; traverse the G-codes or tool position data points in the initial toolpaths; identify and separate non-cutting movement commands based on feed rate changes or Z-axis height changes; convert the retained cutting movement trajectories into geometric vector curves to generate reference lines.

[0026] This is a crucial step in achieving the technical effect of this invention. Using the editing interface of the CAM software, data cleaning is performed on the first initial toolpath P1 and the second initial toolpath P2. Specifically, this involves filtering out movement segments in the G-code where the feed rate is not zero (i.e., actual cutting), and ignoring all G00 (rapid traverse) and tool lift commands. The filtered cutting trajectory is then converted into a pure geometric curve, resulting in reference lines R1 (corresponding to surface A1) and R2 (corresponding to surface A2). For example... Figure 2E As shown, R1 and R2 at this time are two clean contour lines located at the edge of the flow channel, without any process instructions.

[0027] Step S7: Set the first reference line and the second reference line as the upper and lower boundaries of the streamline cutting process, respectively, and set the streamline cutting boundary.

[0028] Create a new Flowline Machining strategy. Set R1 obtained in step S6 as the first boundary (upper limit) and R2 as the second boundary (lower limit).

[0029] Step S8: Generate the final machining toolpath that reciprocates from top to bottom between the first reference line and the second reference line, and output the CNC machining program.

[0030] In the streamlined machining strategy, the cutting direction is set to top-down, i.e., cutting from R1 (higher Z-value) to R2 (lower Z-value); the cutting mode is set to reciprocating to improve machining efficiency. The cutting step distance is set to 0.1mm (constant residual height). The calculated toolpath is as follows... Figure 2F As shown, the toolpath exhibits a perfectly streamlined and uniform distribution on the complex 3D curved surface, with no redundant movement.

[0031] Example 2: CNC Programming System like Figure 3 As shown, this embodiment provides a CNC programming system for complex curved spherical flow channels. This system adopts a modular architecture and can be integrated into CAM software as a functional plug-in. The system includes: Model acquisition module: used to read and parse the CAD 3D model data of the mold to be processed and identify the geometric features of the flow channel.

[0032] Feature extraction module: used to automatically calculate the machining coordinate system and extract the two-dimensional flow channel centerline from the three-dimensional model along the Z-axis.

[0033] Auxiliary plane construction module: used to automatically identify the highest and lowest contour lines of the flow channel in the Z-axis direction, and construct two auxiliary planes perpendicular to the Z-axis accordingly.

[0034] Tool creation module: Used to store tool library parameters and automatically match or create corresponding ball end tool models based on the flow channel cross-sectional dimensions.

[0035] First toolpath generation module: Used to execute projection algorithm, project the two-dimensional centerline onto the auxiliary surface, and generate an initial toolpath containing complete process instructions.

[0036] Reference line conversion module: As the core processing unit, it is used to parse the G-code or tool position data of the initial toolpath, filter out non-cutting movement segments, and output clean geometric reference lines.

[0037] The second toolpath generation module is used to call the streamlined machining algorithm of the CAM kernel to generate the final finishing toolpath with two reference lines as boundaries.

[0038] Output module: Used to post-process the generated toolpath into NC code that can be recognized by a specific CNC machine tool.

[0039] Example 3: Computer-readable storage medium This embodiment provides a computer-readable storage medium, such as ROM / RAM, hard disk, optical disk, etc., on which a computer program is stored. When the program is executed by a processor (such as a CPU or MCU), it can implement steps S1 to S8 as described in Embodiment 1, thereby completing the automated control of the CNC programming process.

[0040] Through the above embodiments, this invention successfully solves the industry pain points of difficult programming, poor quality, and low efficiency in the processing of complex curved surface flow channels, and has extremely high industrial application value.

[0041] This invention has many specific applications. The above description is only a preferred embodiment of this invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of this invention, and these improvements should also be considered within the scope of protection of this invention.

Claims

1. A numerical control programming method for a complex curved spherical flow channel, characterized in that, The method, executed by a CNC programming system, includes: Obtain a three-dimensional model of the flow channel to be processed, wherein the cross-section of the flow channel to be processed is a semi-circle with a preset diameter; Based on the Z-axis direction of the machining coordinate system, a two-dimensional flow channel centerline is analyzed and extracted from the three-dimensional model; Based on the highest and lowest contour lines of the three-dimensional model in the Z-axis direction, a first auxiliary surface and a second auxiliary surface are constructed respectively, and both the first auxiliary surface and the second auxiliary surface are perpendicular to the Z-axis. In response to the cross-sectional dimensions of the flow channel, the corresponding ball end mill parameters are configured; The center line of the two-dimensional flow channel is projected along the Z-axis onto the first auxiliary surface and the second auxiliary surface respectively to generate the first initial tool path and the second initial tool path; Data cleaning is performed on the first and second initial tool paths to extract the cutting movement segments, generate the first and second reference lines, and remove the tool entry, retraction, and lifting paths. The first reference line and the second reference line are respectively set as the upper and lower boundaries of the streamline cutting process; Generate the final machining toolpath that reciprocates from top to bottom between the upper and lower boundaries, and output the CNC machining program.

2. The method according to claim 1, characterized in that, The data cleaning of the first and second initial toolpaths specifically includes: Traverse the G-codes or tool position data points in the initial toolpath; Based on changes in feed rate or Z-axis height, non-cutting movement commands can be identified and separated. The preserved cutting movement trajectory is converted into a geometric vector curve, and a reference line is generated.

3. The method according to claim 1, characterized in that, The ball-end cutting tool parameters include the tool diameter and the tip radius; wherein, the tool diameter is equal to the diameter of the flow channel cross-section, and the tip radius is equal to the radius of the flow channel cross-section.

4. The method according to claim 1, characterized in that, When generating the final machining toolpath, a constant residual height algorithm or a constant layer depth of cut algorithm is used to set the cutting step distance, and the value of the cutting step distance is in the range of 0.05mm to 0.2mm.

5. A numerical control programming system for a complex curved spherical flow channel, characterized in that, include: The model acquisition module is used to acquire a three-dimensional model of the flow channel to be processed, wherein the cross-section of the flow channel to be processed is a semi-circle with a preset diameter; The feature extraction module is used to analyze and extract a two-dimensional flow channel centerline from the three-dimensional model based on the Z-axis direction of the machining coordinate system; The auxiliary surface construction module is used to construct a first auxiliary surface and a second auxiliary surface based on the highest and lowest contour lines of the three-dimensional model in the Z-axis direction, respectively. The tool configuration module is used to configure the corresponding ball end tool parameters in response to the cross-sectional dimensions of the flow channel; The projection module is used to project the center line of the two-dimensional flow channel along the Z-axis onto the first auxiliary surface and the second auxiliary surface respectively, thereby generating a first initial tool path and a second initial tool path; The reference line generation module is used to perform data cleaning on the first initial tool path and the second initial tool path, extract the cutting movement segment, and generate the first reference line and the second reference line. The toolpath calculation module is used to set the first reference line and the second reference line as the upper and lower boundaries of the streamline cutting process, respectively, and generate the final machining toolpath that reciprocates between the two. The output module is used to output CNC machining programs.

6. The system according to claim 5, characterized in that, The reference line generation module is specifically used to call the kernel interface of the CAM software to filter the tool position file in order to eliminate non-cutting movement trajectories.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 4.