Method for demonstrating machining process in animation mode and obtaining machined workpiece and undeformed cuttings

Through custom frame numerical decomposition and multi-threaded event-driven architecture, combined with Rhino software secondary development and OpenGL rendering, the contradiction between accuracy and efficiency in mechanical processing simulation is solved, and high-precision, efficient simulation and visualization of complex gear processing is achieved.

CN120374800AActive Publication Date: 2025-07-25SHANDONG UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510837359.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-07-25
Estimated Expiration
2045-06-23

AI Technical Summary

Technical Problem

The existing mechanical processing simulation methods are difficult to balance between accuracy and efficiency, and lack the visualization effect of the processing process.

Method used

Through custom frame numerical decomposition and processing process, combining multi-threaded event-driven architecture and secondary development of Rhino software, it realizes animated demonstration with controllable accuracy and obtains processed workpieces and undeformed chips, and uses OpenGL rendering and Python scripts to optimize data processing.

Benefits of technology

It realizes high-precision and high-efficiency simulation of complex gear processing, supports animation demonstration and optimizes computing efficiency, and provides a quantitative control mechanism for accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120374800A_ABST
    Figure CN120374800A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machining simulation, and discloses a method for demonstrating a machining process in an animation mode and obtaining a machined workpiece and undeformed cuttings, which comprises the following steps of: (1) carrying out customized frame number decomposition in the machining process, and generating a machining data set containing a scanning surface discrete coordinate and a tool nose point space-time position; (2) connecting an animation frame with an event to realize closed loop of data acquisition, transmission, calculation and animation rendering; and (3) carrying out secondary development on Rhino software to realize Boolean operation and precision guarantee, and outputting a processed workpiece model and an undeformed chip model. According to the method, the frame number of the machining process is decomposed, a user can customize the frame number of a certain process step according to needs, precision-controllable swept volume modeling is achieved through linear adjustment, the sampling density of a swept surface and Boolean operation precision can be improved by increasing the frame number, the calculation efficiency is optimized by reducing the frame number, and a quantitative regulation and control mechanism of precision and efficiency is formed; and a high-precision and high-efficiency solution is provided for complex gear machining simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for animating a machining process and obtaining a machined workpiece and undeformed chips, belonging to the field of machining simulation technology. Background Art

[0002] In the field of numerical control machining, machining simulation has become the core technology for verifying tool paths and predicting workpiece morphology. The existing simulation methods mainly focus on the construction of tool swept volumes and discrete Boolean operations. The implementation paths can be divided into two typical methods: The first method is to construct a tool swept volume. By sampling the tool swept surface and the motion trajectory at a fixed time step, after generating the tool swept volume, a Boolean operation is performed with the workpiece. Although this method can maintain approximate motion continuity, the fixed sampling step size easily leads to an imbalance between model accuracy and computational efficiency - a too large step size will lose the microscopic geometric features of the machined workpiece, and a too small step size will generate redundant computational amounts.

[0003] The second method is static discrete Boolean operation. The tool motion path is directly defined at fixed pose intervals, and independent Boolean operations are performed at each discrete point. For example, in the "Machining Simulation Method for Spiral Bevel Gears" disclosed in CN118821344A, STL models of the blank and the cutter head are constructed and topologically reconstructed, the relative positions of the two are adjusted to the machining starting point, the tool moves in a jump manner at a fixed time step, and a Boolean subtraction operation is performed at each static pose. This method converts the continuous cutting process into a static discrete Boolean operation process, with relatively low accuracy and a lack of visualization of the machining process. Summary of the Invention

[0004] Aiming at the deficiencies of the existing mechanical machining simulation technology, the present invention provides a method for animating the machining process with controllable accuracy and forming a quantitative regulation mechanism for accuracy and efficiency, and obtaining a machined workpiece and undeformed chips, so as to solve the problem of the contradiction between accuracy and efficiency when constructing a tool swept volume and the problem of visualization of the machining process at the same time.

[0005] The method for animating the machining process and obtaining a machined workpiece and undeformed chips of the present invention includes the following steps: (1) Customized frame-by-frame decomposition of the machining process: The machining process is decomposed frame by frame according to the accuracy requirements, divided into a dense frame area of cutting motion and a sparse frame area of non-cutting motion. Through the timing redrawing and coordinate acquisition functions of OpenGl, the position coordinates of the tool swept surface, the tool tip point, and the workpiece in each frame are recorded, and a machining data set including the discrete coordinates of the swept surface and the spatio-temporal positions of the tool tip points is generated.

[0006] For the dense frame region of the cutting motion (such as the coordinated rotation of the tool and the workpiece, and the tool feed motion), high-frame density sampling is set at 5 - 30 frames / mm or 2 - 10 frames / degree. Among them, for the linear interpolation and circular interpolation of the tool, different frame number densities are also distinguished. For a cutterhead-type tool, a multi-tool-strip asynchronous recording mode is used, and the recording events of each group of tool strips are triggered with a step of Δ = 360° / the number of tool strips, and the recording duration is Δ + 10°, to achieve non-uniform sampling of the cutting trajectory and data volume compression.

[0007] For the sparse frame region of the non-cutting motion (such as tool setting, tool retraction, and idle stroke motion), low-frame density sampling is set at 1 - 5 frames / mm.

[0008] (2) Connecting animation frames with events (multi-threaded event-driven and dynamic binding): Based on the multi-threaded event-driven architecture, the machining process is decomposed into five types of key events including motion events, data recording events, forward transmission events, calculation events, and reverse transmission events, which are triggered in a series-parallel loop. Each frame is connected to one or more events (whose execution has three characteristics: parallelism, cyclicity, and conditional triggering), to achieve a closed loop of data acquisition, transmission, calculation, and animation rendering. Among them: Motion event: Drive the linear interpolation (G01), clockwise circular interpolation (G02), and counterclockwise circular interpolation (G03) motions of the tool and the workpiece, and update the three-dimensional pose in real time through the OpenGL coordinate transformation matrix; control the animation playback speed by adjusting the frame rate.

[0009] Data recording event: Record three types of data, namely the relative position coordinates of the swept surface, the spatio-temporal point set of the tool tip point during cutting, and the spatio-temporal point set of the tool tip point during complete machining. All data are written into independent lists, namely the swept surface list, the tool tip point list during cutting, and the tool tip point list during complete machining; among them: For the swept surface list, the line segments constituting the swept surface are converted into a discrete point set, and the discrete point set coordinates of the tool swept surface are obtained frame by frame. Through the inverse workpiece motion matrix, the discrete point set coordinates of the tool swept surface are converted into the relative position discrete point set coordinates in the workpiece stationary coordinate system, forming a spatio-temporally related swept surface list; For the tool tip point list during cutting, when in the dense frame (during cutting), obtain the position coordinates of the tool tip point in the current frame, convert the coordinates into the relative position coordinates in the workpiece stationary coordinate system, record the spatio-temporal point set of the tool tip point during the entire cutting process, generate the material removal trajectory line through non-uniform rational B-spline interpolation, and jointly construct the swept volume modeling with the swept surface list; For the tool tip point list during complete machining, record the spatio-temporal point set of the tool tip point during the entire machining, which is used to generate and visualize the tool trajectory line.

[0010] Forward transmission event: Implement data writing and transmission. Write the list of swept surfaces to a CSV format file (for easy reconstruction of swept surfaces), and write the list of tool tip points during cutting to an OBJ format file (for convenient generation of trajectory lines). Transmit the two files to the Rhino temporary buffer.

[0011] Calculation event: Perform swept volume reconstruction and mesh Boolean splitting operations, synchronously output the machined workpiece model and the undeformed chip model, and then perform multi-level geometric repair work.

[0012] Reverse transmission event: Transmit the STL model generated by Rhino back to the user interface, and perform PBR (physically based rendering) material mapping and dynamic lighting rendering through the OpenGL engine.

[0013] (3)Secondary development of Rhino software to achieve Boolean operations and accuracy guarantee: Realize the silent operation of Rhino in the background through the Python script bridge, and perform swept volume reconstruction, mesh Boolean operation splitting and multi-level geometric repair, and synchronously output the machined workpiece model and the undeformed chip model; the script covers the software startup stage, swept volume reconstruction stage, Boolean operation stage and post-processing stage.

[0014] In the software startup stage, use the subprocess module of Python to create a Rhino process, configure the startup information of the STARTUPINFO class, set it to the hidden window mode, and prohibit interface rendering to reduce resource consumption; in the Python script, call the Rhino API through the rhinoscriptsyntax library, convert the native instructions of the macro editor into string format, and embed them in the rs.Command() function for execution (the code is more concise, easy to understand and executes quickly).

[0015] In the swept volume reconstruction stage, use the single-rail sweep function of Rhino, uniquely pair the swept surface numbering system with the trajectory line to avoid abnormal connection of the ends of multiple trajectory lines. Based on the ratio of the number of swept surfaces to the number of trajectory points, use the non-uniform rational B-spline (NURBS) algorithm to fit the ratio number of trajectory points into a high-precision curve. When setting the single-rail sweep parameters, select the tool axis as the direction, and the re-approximation section tolerance is selected as 0.01mm.

[0016] In the Boolean operation stage, use the closed and mesh conversion function of Rhino to convert the swept volume into a mesh model with a preset density, and execute the mesh Boolean splitting operation function to obtain the machined workpiece and undeformed chip models at the same time.

[0017] In the post - processing stage, the mesh repair function of Rhino is used to repair in sequence according to multi - level precision, merge fragmented surfaces with a size ≤ 0.005 mm, screen defective bodies and stitch them to an error ≤ 0.002 mm.

[0018] Through the secondary development of Rhino software, the embedding of OpenGL engine, and the design of PYQT interface, the present invention constructs a composite user interface integrating tool library management, process parameter configuration, and kinematic visualization, supports custom frame number division, import of tool and workpiece models, adjustment of process parameters, execution of Boolean operations, rendering of model materials, and control of animation speed, and realizes the rapid transmission of data between the user interface and Rhino software. The user interface can display the updated workpiece geometric features, tool paths, and corresponding chip solid models knife - by - knife.

[0019] The present invention decomposes the numerical control machining process into frames. Users can customize the number of frames for a certain machining step as needed and achieve swept - volume modeling with controllable precision through linear adjustment. Increasing the number of frames can improve the sampling density of the swept surface and the precision of Boolean operations; decreasing the number of frames can optimize the calculation efficiency, forming a quantization control mechanism for precision and efficiency. The animation speed is controlled by the frame rate: it supports the adjustment of the dynamic playback rate from 1 to 20 frames per second. The low - speed mode (≤ 5 frames per second) is used for checking process details, and the high - speed mode (≥ 10 frames per second) is used for demonstrating the overall process.

[0020] Through the close combination of animation frames and process parameters, the present invention provides a high - precision and high - efficiency solution for complex gear machining simulation. Brief Description of the Drawings

[0021] Figure 1 is the process flow chart of the method of the present invention.

[0022] Figure 2 is the software form interface diagram of the method of the present invention.

[0023] Figure 3 is a schematic diagram of a hypoid gear before machining.

[0024] Figure 4 is a schematic diagram of machining position setting.

[0025] Figure 5 is a schematic diagram of process parameter setting.

[0026] Figure 6 is the left - view of the relative position of the workpiece and the cutter head after tool setting.

[0027] Figure 7 is the top - view of the relative position of the workpiece and the cutter head after tool setting.

[0028] Figure 8 is a schematic diagram of frame - based decomposition.

[0029] Figure 9 is a frame number - event flow chart.

[0030] Figure 10 is a partial data set.

[0031] Figure 11 is a schematic diagram of a processed hypoid gear.

[0032] Figure 12 is a schematic diagram of a tool path.

[0033] Figure 13 is a schematic diagram of an undeformed chip.

[0034] Figure 14 is a schematic diagram of an actual processed hypoid gear. Specific implementation manners

[0035] Figure 1 The implementation process of the method for animating the machining process of the present invention and obtaining the machined workpiece and the undeformed chip is given. Specifically, it includes the following steps.

[0036] 1. Customized frame number decomposition of the machining process.

[0037] The machining process on an actual numerical control machine is decomposed frame by frame according to the accuracy requirements of the machined workpiece. The position coordinates of the tool swept surface, the tool tip point, and the workpiece are accurately recorded for each frame, and a machining process data set is constructed frame by frame, thereby generating a more accurate and reliable swept body.

[0038] For cutting motions (such as the combined motion of the spindle rotation and the feed motion of the tool in milling), a dense number of frames (5 - 30 frames / mm or 2 - 10 frames / degree) should be divided to accurately describe the machining trajectory, and further distinction is required according to the interpolation type - a relatively low - density frame number allocation is used for linear interpolation motion, while a higher - density frame number is required for circular interpolation motion with higher geometric complexity; conversely, for non - cutting motions (such as tool setting, tool retraction, idle stroke motion, etc.), the system resource consumption can be optimized by dividing sparse frames to achieve a balance between accuracy and efficiency.

[0039] 2. Connection of animation frames with events.

[0040] Construct five types of serial - parallel trigger events (motion, data recording, forward / backward transmission, calculation), integrate the PyQt interface, OpenGL engine, and Rhino secondary development module, and implement a closed - loop process of real - time update of the tool path, swept body modeling, mesh Boolean operation segmentation, and model material rendering.

[0041] Based on a multi-threaded event-driven architecture, the present invention decomposes the CNC machining process into five key events that can be triggered serially, parallelly, and cyclically. Each frame can be connected to one or more events at the same time, and its execution has three major characteristics: parallelism, cyclicity, and conditional triggering. The specific events are as follows: The first event is a motion event, which drives the linear interpolation (G01), clockwise circular interpolation (G02), and counterclockwise circular interpolation (G03) of the tool and the workpiece. Through kinematic matrix transformation, the swept surface and tool tip position information are updated in real time when the tool performs translation / rotation operations. All motion events are dynamically presented in real time in OpenGL through three-dimensional coordinate transformation functions. Since they are connected to the animation frame, the animation playback speed can be controlled by adjusting the frame rate.

[0042] The second event is a data recording event. The present invention establishes three data collection lists: (1) Sweep surface list: The line segments constituting the sweep surface are converted into discrete point sets, and the coordinates of the discrete point sets of the tool sweep surface are obtained frame by frame. The discrete point set coordinates of the tool sweep surface are converted into the relative position discrete point set coordinates in the workpiece stationary coordinate system through the inverse workpiece motion matrix to form a time-space related sweep surface list; (2) Tool tip point list during cutting: When in a dense frame (cutting), obtain the position coordinates of the tool tip point in the current frame, convert the coordinates into relative position coordinates in the workpiece stationary coordinate system, record the time-space point set of the tool tip point during the entire cutting process, generate the material removal trajectory line through non-uniform rational B-spline interpolation, and jointly construct the swept volume modeling with the swept surface list; (3) Tool tip point list during complete machining: This is a list of the time-space points of the tool tip during the entire machining process, which is used to generate and visualize the tool trajectory.

[0043] The third event is a forward data transmission event, which writes the data recorded in the second event into an obj file (tool tip point list) and a csv file (sweep surface list); and exports the workpiece model as an STL format file. After saving, it is sent to Rhino through a script function. All three files can be recognized, read, and processed by Rhino. At this point, the one-way transmission from the user interface to Rhino has been completed.

[0044] The fourth event is the calculation event, which is executed every time the tool completes a process step. The macro editor instructs Rhino to use the received data to generate a swept volume, perform a mesh Boolean segmentation operation on the workpiece, and obtain the model of the machined workpiece and the undeformed chip, and then perform multi-level geometric repair on the model.

[0045] The fifth event is the reverse data transmission event, which saves the model processed by Rhino in stl format and passes it back to the user interface. The model is rendered with materials and lighting and then displayed in OpenGL. At this point, a cycle process ends.

[0046] 3. Secondary development of Rhino software.

[0047] To obtain the workpiece model after processing and the undeformed cutting model, two operations, Boolean difference and Boolean intersection, are required between the workpiece and the tool sweep body, which is time-consuming. Rhino's mesh Boolean operation segmentation function can realize Boolean difference and Boolean intersection operations at the same time. Therefore, we chose to carry out secondary development of Rhino to improve Boolean efficiency.

[0048] The secondary development of Rhino relies on its macro editor and RhinoPython compiler. This paper chooses to embed the instructions of the macro editor into the Python code. By combining Python with the macro instructions, the background realizes the generation of NURBS trajectories and swept volumes (Z-axis orientation, cross-section tolerance 0.01mm) and mesh Boolean operation optimization, and adopts a multi-level geometry repair mechanism (including merging fragment surfaces, screening defective bodies and stitching repair) to ensure that the model error is ≤0.002mm. The specific implementation is divided into four stages.

[0049] During the software startup phase, Python's subprocess module is used to create a Rhino process, the startup information of the STARTUPINFO class is configured, the hidden window mode is set, and interface rendering is disabled to reduce resource usage; in the Python script, the Rhino API is called through the rhinoscriptsyntax library, the native instructions of the macro editor are converted into string format, and embedded in the rs.Command() function for execution. The single-step calculation takes ≤15 seconds.

[0050] In the reconstruction stage of the swept volume, Rhino is used to realize the precise sweeping function. The principle of "surface-line correspondence" must be strictly followed, and the swept surface numbering system is used to uniquely match the trajectory line to avoid abnormal connection between the beginning and the end of multiple trajectory lines. Based on the ratio of the number of swept surfaces to the number of trajectory points, the non-uniform rational B-spline (NURBS) algorithm is used to fit the ratio of the number of trajectory points into a high-precision curve. When setting the single-track sweep parameters, the tool axis is selected as the direction to re-approximate the section tolerance (select 0.01mm).

[0051] In the Boolean operation stage, the closed and mesh conversion functions of Rhino are used to convert the swept volume into a mesh model with a preset density, and the mesh Boolean operation segmentation function is performed to obtain the model of the workpiece and the undeformed chip after processing; the macro instructions are as follows: (1) Execute "rhinoscriptsyntax.Command('_Cap')" to close the solid object; (2) Execute "rhinoscriptsyntax.Command('_-Mesh P,100 Enter')" to convert the solid into a mesh model with a mesh density of 100; (3) Execute "rhinoscriptsyntax.MeshBooleanSplit(result, object2[i],delete_input=True)" to perform mesh boolean split operations on the workpiece and the swept body in sequence according to the numbers, and the machined workpiece model and the undeformed cutting model can be obtained simultaneously.

[0052] In the post-processing stage, for the geometric defect problems of boolean operations, multi-level precision repair is performed: (1) Execute "rhinoscriptsyntax.Command('_MergeAllFaces Enter')" to merge fragmented surfaces with a tolerance ≤ 0.005mm; (2) Execute "rhinoscriptsyntax.Command('_SelBadObjects Enter')" to screen defective bodies. If defective bodies are screened out, execute "rhinoscriptsyntax.Command('_Repair Enter')" for repair, and the final solid stitching error ≤ 0.002mm; (3) Execute "rhinoscriptsyntax.Command('_-Export \"result.stl\" Enter')" to output the machined model.

[0053] This solution reduces the Rhino memory occupancy from an average of 750Mb to 500Mb, and the single-step calculation time from an average of 20 seconds to 15 seconds, with a performance improvement of about 30%.

[0054] The following is an embodiment taking the machining of hypoid gears as an example.

[0055] 1. Open the user operation interface. To better display the animation and facilitate user operation, a user operation interface is created, as Figure 2 shown. The area division of the interface refers to the following table: Table 1 Function Partition Table Region Name Position Detailed Function Operation Step Box Upper Left Corner of the Interface Record User Operation Steps Processing Control Bar Vertical Bar on the Left Side of the Interface 1. Tool and Workpiece Import, 2. Parameter Setting, 3. Tool Setting, 4. Processing Start / Stop, 5. Tool Path and Chip Viewing Parameter Display Bar Horizontal Bar on the Upper Side of the Interface 1. Preset Parameter Loading, 2. Parameter Display Comprehensive Control Bar Vertical Bar on the Right Side of the Interface 1. Frame Rate Control, 2. Field of View Control, 3. Lighting Control, 4. Material Rendering Visualization Window Central Region of the Interface 1. Display Model and Animation, 2. Model Interaction

[0056] 2. Import the workpiece and tool models. If there are pre-set models, they can also be selected from the tool and workpiece libraries. The models will be displayed on the visualization window, asFigure 3 as shown

[0057] 3. Select the machining method and simulate the machining of hypoid gears on a Klingelnberg C50 gear milling machine. The C50 gear milling machine is a six-axis CNC machine tool (A, B, C, X, Y, Z axes). The A axis is the cutter head rotation axis, the B axis is the workpiece rotation axis, the C axis controls the workpiece tilt, and the X, Y, and Z axes control three mutually perpendicular linear motions.

[0058] The basic parameters of the cutter head and the blank have been determined as shown in the following table: Table 2 Basic Parameters of the Cutter Head

[0059] Table 3 Basic Parameters of the Gear Blank

[0060] According to the principle of machining hypoid gears by the generation method and the basic parameters of the cutter head and the workpiece, the machine tool adjustment parameters required for machining hypoid gears on a Klingelnberg C50 gear milling machine can be determined, including the cutter position S, the cutter position angle q, the vertical gear position Em, the horizontal gear position correction amount Xp, the bed position Xb, and the blank installation angle δm.

[0061] The calculation formula for the cutter position S is as follows: ; In the formula, R m is the midpoint cone distance of the gear, r is the nominal radius of the cutter head, β m is the midpoint helix angle of the gear, and it is calculated that S = 99.571 mm.

[0062] The calculation formula for the cutter position angle q is as follows: ; It is calculated that q = 50.775°.

[0063] Based on the cutter position S and the cutter position angle q, the horizontal gear position Xp0 (Z axis) and the radial cutter position Sr (Y axis) can be obtained: ; .

[0064] When machining hypoid gears, the axis of the generating gear intersects with the axis of the gear to be machined, so the vertical gear position Em = 0; the designed intersection point coincides with the cutting calculation intersection point, so the horizontal gear position correction amount XP1 = 0.

[0065] The bed position Xb is equal to the dedendum height of the gear to be machined, so the bed position Xb = -10.635 mm; the blank installation angle δ mis equal to the pitch angle of the gear being processed, so the wheel blank installation angle δ m =74.750°.

[0066] The machine parameters are organized into the following table: Table 4 Machine tool parameters

[0067] Set the machining parameters and complete the tool setting. Figure 4 and Figure 5 As shown in the figure, users can input machine tool parameters or set parameters by themselves to observe the processing effects of different parameters. The relative position of the workpiece and the cutter head after tool setting is as follows: Figure 6 As shown, the relative position and the top view are as follows Figure 7 shown.

[0068] 4. Set the frame number for the motion, based on the relative motion characteristics of the tool and the workpiece, such as Figure 8 As shown, the processing process is decomposed into frames (you can enter the frame number and drag the slider to change the frame number linearly).

[0069] (1) Coordinated rotation phase (motion events and data recording events in parallel): Taking 5 frames / degree as an example, the tool and the workpiece rotate synchronously around the spindle (frame interval 1-1930). Each frame is connected to the motion event and the recording event. The cutter disc has 17 groups of blades. Every time the cutter disc rotates 21 degrees, a group of blades is ready to start cutting. If all the tool tip points are recorded, the amount of calculation will increase. Therefore, the multi-blade asynchronous recording mode is used to record the tool tip point list during cutting. The data recording rule is: each group of tools is deferred triggered with a step size of Δ=21 degrees (105 frames), and the tool tip point position of the tool tip point over a process of 30 degrees (150 frames) is recorded. The recording interval of the i-th group is [1+Δ×(i-1), 30+Δ×(i-1)]. For example, the recording interval of the first group of blades is 1-30 degrees (1-150 frames), and the recording interval of the second group of blades is 22-51 degrees (106-255 frames), and so on. The recording interval of the seventeenth group of blades is 337-386 degrees (1681-1930 frames). When all the records are completed, the recording will be repeated in a cycle.

[0070] (2) Transmission and calculation phase (transmission events and calculation events are serial): After the motion and recording events are completed, the transmission and calculation events are automatically assigned to the next three frames, that is, the 1931st frame is connected to the forward transmission event, the 1932nd frame is connected to the calculation event, and the 1933rd frame is connected to the reverse transmission event. The next frame will not be executed until the current frame is executed, so the task can be completed by connecting the transmission event and calculation event to only one frame.

[0071] (3) Axial feed motion stage (optional, motion event and data recording event are parallel): The tool feeds along the axis (frame interval 1934 - 1953), and each frame connects the motion event and the recording event.

[0072] 5. When machining starts, the system initializes the frame number counter (initial value = 0), and triggers preset events frame by frame through a multi-threaded event dispatcher. The process is as Figure 9 shown. The motion event drives the translational / rotational motion of the tool and the workpiece, and realizes smooth animation presentation through dynamic frame rate regulation (1 - 20 frames per second); the data recording event synchronously collects the discrete points of the tool swept surface and the spatio-temporal point sets of the tool tip points to form a data set for cutting trajectory and swept volume modeling. Some data sets are as Figure 10 shown; the data transmission event exports the swept surface list as a.csv format and saves the tool tip point list as an.obj format to the temporary cache directory in real time for background call by Rhino; the calculation event triggers the RhinoPython script to automatically execute swept surface reconstruction, trajectory point NURBS fitting, swept volume generation, and mesh Boolean splitting operations.

[0073] After each single machining step is completed, the counter automatically resets to zero, and the interface progress bar dynamically updates the percentage based on the cumulative frame number until the progress reaches 100% when all machining steps are completed. The finally generated hypoid gear geometric features (see Figure 11 ), multi-tool bar composite tool path (see Figure 12 ), and the undeformed chip morphology of the third tool cutting (see Figure 13 ).

[0074] 6. After the machining simulation is completed, verify and post-process the results: (1) The user interface based on the OpenGL engine supports multi-view interactive observation. The user can observe the workpiece surface topography, tool path, and undeformed chip morphology through the vision adjustment module (translation, rotation, zoom) of the comprehensive control bar to achieve a preliminary evaluation of the process quality. Compare the hypoid gear model after machining simulation by the method of the present invention (see Figure 11 ) with the hypoid gear after actual machining (see Figure 14 ), and it is found that the tooth profile contours of the two are highly consistent, verifying the effectiveness of the method of the present invention.

[0075] (2) The hypoid gear model generated by simulation is output in STL format and can be directly imported into CAE software such as COMSOL and Abaqus to provide a data basis for subsequent simulations such as thermodynamic analysis and static simulation.

[0076] (3) By initializing and resetting the process parameters, the influence laws of parameter adjustment on the tool motion trajectory, workpiece machining quality, and undeformed chip morphology can be verified, providing an effective verification method for process parameter optimization.

Claims

1. A method for animating a machining process and obtaining a machined workpiece and undeformed chips, characterized in that, Including the following steps: (1) Custom frame-by-frame decomposition of the machining process: The machining process is decomposed frame by frame according to the accuracy requirements, divided into a dense frame area of cutting motion and a sparse frame area of non-cutting motion. Through the timing redrawing and coordinate acquisition functions of OpenGl, the position coordinates of the tool swept surface, the tool tip point, and the workpiece are recorded for each frame, generating a machining dataset containing the discrete coordinates of the swept surface and the spatio-temporal positions of the tool tip point; (2) Connecting animation frames with events: Based on a multi-threaded event-driven architecture, the CNC machining process is decomposed into five types of key events including motion events, data recording events, forward transmission events, calculation events, and reverse transmission events, which are triggered in a series-parallel loop. Each frame is connected to one or more events to achieve a closed-loop of data acquisition, transmission, calculation, and animation rendering; (3) Secondary development of Rhino software to achieve Boolean operations and accuracy guarantee: Through Python script bridging, Rhino runs silently in the background and performs swept body reconstruction, mesh Boolean operation segmentation, and multi-level geometry repair, and synchronously outputs the machined workpiece model and the undeformed chip model; The script covers the software startup stage, swept body reconstruction stage, Boolean operation stage, and post-processing stage.

2. The method for processing an animation demonstration and obtaining a machined workpiece and undeformed chips according to claim 1, characterized in that, In the step (1), the dense frame area of cutting motion is set with a sampling density of 5-30 frames / mm or 2-10 frames / degree. For cutter head type tools, a multi-cutter bar asynchronous recording mode is adopted, and the recording events of each group of cutter bars are triggered with a step of Δ = 360 / number of cutter bars, and the recording duration is Δ + 10°; The sparse frame area of non-cutting motion is set with a sampling density of 1-5 frames / mm.

3. The method for processing an animation demonstration and obtaining a machined workpiece and undeformed chips according to claim 1, characterized in that, In the step (2): Motion event: Driving the linear interpolation, clockwise circular interpolation, and counterclockwise circular interpolation motions of the tool and the workpiece, and updating the three-dimensional pose in real time through the OpenGL coordinate transformation matrix; By adjusting the frame rate, the control of the animation playback speed is achieved; Data recording event: Recording three types of data including the relative position coordinates of the swept surface, the spatio-temporal point set of the tool tip point during cutting, and the spatio-temporal point set of the tool tip point during complete machining. All data are written into independent lists, namely the swept surface list, the tool tip point list during cutting, and the tool tip point list during complete machining; Forward transmission event: Realizing data writing and transmission, writing the swept surface list into a csv format file, writing the tool tip point list during cutting into an obj format file, and transmitting the two files to the Rhino temporary buffer; Calculation event: Executing swept body reconstruction and mesh Boolean segmentation operations, synchronously outputting the machined workpiece model and the undeformed chip model, and then performing multi-level geometry repair work; Reverse transmission event: Transmitting the STL model generated by Rhino back to the user interface, and implementing PBR material mapping and dynamic lighting rendering through the OpenGL engine.

4. The method for animating a machining process according to claim 3 and obtaining a machined workpiece and undeformed chips, characterized in that, For the swept surface list, the line segments constituting the swept surface are converted into a discrete point set, and the discrete point set coordinates of the tool swept surface are obtained frame by frame. Through the inverse workpiece motion matrix, the discrete point set coordinates of the tool swept surface are converted into the relative position discrete point set coordinates in the workpiece stationary coordinate system, forming a spatio-temporal related swept surface list.

5. The method for animating a machining process according to claim 3 and obtaining a machined workpiece and undeformed chips, characterized in that, When in the dense frame of the cutting tool tip point list, obtain the position coordinates of the tool tip point in the current frame, convert the coordinates to the relative position coordinates in the workpiece stationary coordinate system, record the spatio-temporal point set of the tool tip point during the entire cutting process, generate the material removal trajectory line through non-uniform rational B-spline interpolation, and jointly construct the swept volume modeling with the swept surface list.

6. The method for animating a machining process according to claim 3 and obtaining a machined workpiece and undeformed chips, characterized in that, For the tool tip point list during the complete machining, record the spatio-temporal point set of the tool tip point during the entire machining, which is used to generate and visualize the tool trajectory line.

7. The method for animating a machining process according to claim 1 and obtaining a machined workpiece and undeformed chips, characterized in that, In the software startup phase of step (3), use the subprocess module of Python to create a Rhino process, configure the startup information of the STARTUPINFO class, set it to the hidden window mode, and prohibit interface rendering to reduce resource consumption; in the Python script, call the Rhino API through the rhinoscriptsyntax library, convert the native instructions of the macro editor into string format, and embed them in the rs.Command() function for execution.

8. The method for animating a machining process according to claim 1 and obtaining a machined workpiece and undeformed chips, characterized in that, In the swept volume reconstruction phase of step (3), use the single-rail sweep function of Rhino, perform unique pairing with the trajectory line through the swept surface numbering system to avoid abnormal connection of the multi-trajectory line ends. Based on the ratio of the number of swept surfaces to the number of trajectory points, use the non-uniform rational B-spline algorithm to fit the ratio number of trajectory points into a high-precision curve. When setting the single-rail sweep parameters, select the tool axis as the direction, and the re-approximation section tolerance is selected as 0.01mm.

9. The method for animating a machining process according to claim 1 and obtaining a machined workpiece and undeformed chips, characterized in that, In the Boolean operation phase of step (3), use the closed and mesh conversion function of Rhino to convert the swept volume into a mesh model with a preset density, and execute the mesh Boolean split operation function to obtain the machined workpiece and the undeformed chip model at the same time.

10. The method for animating a machining process according to claim 1 and obtaining a machined workpiece and undeformed chips, characterized in that, In the post-processing phase of step (3), use the mesh repair function of Rhino to repair in multiple levels of precision in sequence, merge fragmented surfaces with a size less than or equal to 0.005mm, screen defective bodies and stitch them to an error less than or equal to 0.002mm.

Citation Information

Patent Citations

  • Machining simulation method of spiral bevel gear

    CN118821344A

  • Cylindrical gear hobbing non-deformation chip modeling method based on three-dimensional CAD software

    CN113064383A

  • Visualization method for displaying cutting machining process of cutter in webpage environment

    CN116662694A

  • Numerical simulation method for dust motion distribution in machine tool by considering cutting process characteristics

    CN119167826A

  • Numerical control machine tool maintenance display method, device and equipment and storage medium

    CN120106824A