A tool-work contact area extraction method based on triangle mesh boolean operation
Patent Information
- Application Number
- CN202611009895.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-10-13
AI Technical Summary
更致命的是,若要从中提取连续的三维CWE边界,必须依赖等值面提取算法(如Marching Cubes),这会不可避免地平滑掉切削产生的真实锐边与尖角,导致CWE接触边界失真、模糊,无法满足物理仿真对精细微观几何的输入要求
[0034]本发明提出的一种基于三角网格布尔运算的刀-工接触区域提取方法,从底层的切削扫掠体构型、网格求交算法构架、拓扑检索机制以及微元降维计算四个维度进行了系统性的重构与创新。该方法不仅有效克服了B-Rep实体建模易崩溃、体素离散法存在阶梯效应及边界失真的缺陷,提升了仿真运算的时效性与极复杂工况下的拓扑鲁棒性,同时连接了宏观CWE连续边界高锐度提取与底层物理微元IUCT参数精确求解,为航空航天及高端模具等领域复杂结构件的工艺规划、颤振抑制与刀具寿命优化提供了稳定可靠的基础支撑数据。
Smart Images

Figure CN122904584A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of CNC machining simulation technology, specifically relating to a method for extracting the tool-worker contact area based on triangular mesh Boolean operations. Background Technology
[0002] Multi-axis CNC milling technology is a core method for manufacturing core components of high-end equipment. During machining, physical phenomena such as spindle overload, tool wear, and chatter are prone to occur. Therefore, physical simulation (such as predicting cutting forces, spindle torque, and chatter stability) becomes crucial for process optimization. The prerequisite for establishing a high-fidelity physical prediction model is the accurate acquisition of the underlying geometric parameters of the tool-workpiece interaction at each instantaneous tool position point, namely the cutter-workpiece engagement (CWE) and the instantaneous undeformed chip thickness (IUCT). CWE defines the actual three-dimensional engagement range between the cutting edge and the workpiece, while IUCT determines the actual physical thickness of the material removed from each micro-element.
[0003] Currently, existing technologies face the following main technical bottlenecks in low-level geometric modeling and CWE extraction:
[0004] (1) Solid modeling method based on precise boundary representation (B-Rep). This method usually uses NURBS surfaces to accurately represent geometry. In high-frequency material removal simulation of multi-axis machining, Boolean operations require solving extremely complex high-order nonlinear equations in space. As the number of operation steps accumulates, frequent patch trimming will produce serious nonlinear floating-point accumulation errors, which can easily lead to topological fragmentation of the workpiece model, algorithm collapse, and inability to stably extract continuous CWE boundaries.
[0005] (2) Spatial discretization methods based on Z-map or voxel method. These methods discretize space uniformly and have extremely fast Boolean operation speed. However, their geometric accuracy is limited by the mesh resolution and has an inherent "staircase effect". More critically, in order to extract continuous 3D CWE boundaries, it is necessary to rely on isosurface extraction algorithms (such as Marching Cubes), which inevitably smooths out the real sharp edges and corners generated by cutting, resulting in distortion and blurring of CWE contact boundaries, which cannot meet the input requirements of physical simulation for fine micro-geometry.
[0006] (3) Traditional triangular mesh Boolean operation method. The triangular mesh model reduces the nonlinear surface to planar triangular patches, overcoming the nonlinear non-convergence problem of the solid method. However, under multi-axis milling conditions, it still faces problems such as complex swept bodies being prone to self-intersection, coplanar singular degeneration (such as bottom edge contact) leading to intersection failure, and the extremely time-consuming classification and sorting of intersection lines. In addition, existing mesh methods often lack a system mechanism for directly mapping physical elements.
[0007] In summary, developing an algorithm that possesses high topological robustness, avoids staircase effects and feature loss, and can efficiently and directly extract micro-element-level CWE and IUCT parameters is an urgent engineering challenge to be solved in the field of CNC machining virtual manufacturing. Summary of the Invention
[0008] To address the shortcomings and defects of existing technologies, this invention provides a method for extracting the tool-worker contact area based on triangular mesh Boolean operations.
[0009] This invention presents a tool-worker contact region extraction method based on triangular mesh Boolean operations. Through algorithmic innovations in key aspects such as tool sweep body construction, mesh Boolean operation architecture, coplanar degradation processing, topological attribute retrieval, and parameterized mapping of the cutting edge generatrix, it overcomes the problems of topological collapse in traditional B-Rep solid methods and the step effect in voxel methods. This method achieves high-precision and robust extraction of macroscopic three-dimensional continuous CWE boundaries and microscopic IUCT chip thickness under complex multi-axis machining conditions. Specifically, it includes the following steps:
[0010] Step 1: Construct a non-self-intersecting single-step swept body mesh model compatible with various integral end mills.
[0011] Step 1.1: Based on the input CNC machining trajectory tool position sequence, which includes a set of three-dimensional coordinate points and the corresponding tool axis vector set, extract the tool feed kinematic parameters between two adjacent tool position points; combining differential geometry and tool envelope theory, based on the envelope boundary condition that the dot product of the instantaneous velocity vector v of a surface feature point and the surface normal vector n at that point is zero, i.e. The tool is layered along the tool axis, and the critical contour points within each layer that satisfy the envelope feature are solved.
[0012] Step 1.2: To eliminate local mesh distortion caused by discrete interlayer spacing and rotational twisting under five-axis drastic attitude change conditions, a distance-weighted linear interpolation mechanism is introduced. Spatial correspondences are solved between critical contour points within adjacent height layers, and high-precision coordinate linear interpolation is performed to calculate interlayer critical contour points. All critical contour points are sorted in a uniform counter-clockwise or clockwise direction and stitched together using Delaunay triangulation or specific triangle topology connection rules to generate a high-quality preliminary swept surface triangular mesh. The tool mesh model is divided into two parts along the curve connecting the critical contour points and stitched together with the generated preliminary swept surface triangular mesh to obtain a complete single-step swept body mesh model. .
[0013] Step 1.3: To address the self-intrusion and folding phenomena that easily occur on the swept surface during five-axis large swing angle machining, a sweep body self-intersection discrimination criterion based on the dynamic evolution of the velocity vector angle is established; the spatial angle between the velocity vector and the tool axis vector at the center of each layer of the tool is calculated in real time; when the angle crosses the threshold or a directional change occurs, local self-intersection is determined to have occurred; a discrete substitution processing mechanism is initiated, and a series of interpolated tool models at the tool positions are used to replace the swept body in subsequent calculations.
[0014] Step 2: Material removal and dynamic updating of the workpiece model based on improved triangular mesh Boolean operations.
[0015] Load the workpiece mesh model from the initial or previous machining step using a half-edge data structure. and the single-step swept volume mesh model generated in step 1 Perform Boolean subtraction operation .
[0016] Step 2.1: Intersection Calculation and Topology Broadcasting: Establish a hierarchical spatial bounding box based on an AABB tree, and perform coarse-level collision filtering on the workpiece mesh and the swept body mesh; for potential intersecting faces with overlapping bounding boxes, perform precise edge-triangle intersection calculation; in this process, a topology broadcasting mechanism is introduced: when it is determined that a half-edge E intersects with a triangular face f and the intersection point coordinates V are obtained, the intersection point coordinates and the intersection status identifier (such as penetration / exit) are immediately dynamically attached to and stored in the data structure unit of the half-edge E as exclusive attributes; when the intersection algorithm subsequently traverses to the adjacent triangular face that shares the same vertex with the half-edge E, it directly reads the cached intersection information in its attribute table, skipping the repeated solution of the line-surface geometry test equation.
[0017] Step 2.2: Coplanar Singular Degradation Processing: Detect the existence of coplanar degradation where the normal vectors of the swept body surface and the workpiece surface are parallel and the spatial distance approaches zero; if so, extract the set of triangular surfaces that produce coplanar fit, and project them onto a local two-dimensional plane using an orthogonal projection matrix; within the two-dimensional projection domain, use the improved Sutherland-Hodgman polygon clipping algorithm to solve for the accurate overlapping polygon region; subsequently, backproject the intersection points and their boundaries generated by clipping back into three-dimensional space, and assign specific Boolean attribute labels of "remove" or "retain" to the coplanar region.
[0018] Step 2.3: Construction of Undirected Intersecting Graph and Extraction of Intersection Cycles: Instantiate all spatial intersection point objects obtained in Steps 2.1 and 2.2 as nodes of the graph, and instantiate intersecting line segments that exist in the same triangular facet and connect two intersection points as undirected edges of the graph. Dynamically construct an undirected intersecting graph in system memory; using a graph theory-based depth-first search pathfinding algorithm, traverse the intersecting graph starting from any node with a degree greater than 1. When the traversal path returns to the starting node, a closed intersection cycle is directly extracted until all valid nodes in the graph have been visited.
[0019] Step 2.4: Local Constraint Mesh Generation and Patch Unit Stitching: Using the extracted closed intersection loop as the internal hard geometric constraint boundary, the constrained Delaunay triangulation algorithm is called to re-mesh only the local large triangular facets truncated by the intersection line. Subsequently, using non-intersecting edges as topological connectivity links, the updated facet set is divided into several independent mesh patch units using the region growing method. Based on the ray casting method, it is determined whether each patch unit is located inside or outside the swept volume in space. According to the Boolean subtraction rule, the material facets located inside are removed, and the external patch units are retained. Finally, the mesh units are stitched together to generate a new workpiece mesh model after material removal. .
[0020] Step 3: Direct extraction of 3D high-sharpness CWE boundary based on mesh half-edge attribute retrieval.
[0021] This step is executed immediately after the Boolean operation is completed. It directly extracts the contact boundary by retrieving the topological history attributes, avoiding secondary surface reconstruction.
[0022] Step 3.1: In the Boolean subtraction operation piece cell retention and splicing stage of Step 2, maintain the original source tracking tags of all triangular facets; extract the sweep body termination face mesh corresponding to the current machining moment, that is, the static solid surface mesh of the tool itself at the end of the motion.
[0023] Step 3.2: Traverse the updated new workpiece mesh model By matching source tags, verifying normal vector consistency, and determining the center distance threshold of facets, all overlapping triangular faces that belong to both the tool sweep body termination surface and are completely attached to the updated workpiece surface are selected. These triangular faces are then aggregated and defined as the tool-workpiece transient contact surface set. .
[0024] Step 3.3: Utilize the adjacency record property of the top half-edge in the half-edge data structure to traverse the set of faces. The set contains all internal half-edges; if and only if a certain half-edge is not included in the set. Any other triangular face within the triangle is shared in the reverse direction, meaning the pointer to the opposite half of that half is null, or the face to which its opposite half belongs does not belong to it. When this happens, the system marks it as an absolute boundary half.
[0025] Step 3.4: All extracted absolute boundary half edges are chained together according to the topological connection order of the first and last vertices to directly output a three-dimensional continuous CWE macro boundary wireframe model with high geometric sharpness. For multiple separated contact areas caused by discontinuous cutting, the algorithm automatically separates and outputs multiple independent CWE connected branches by tracing non-intersecting closed chains.
[0026] Step 4: Cutting edge micro-element division based on tool generatrix parameterization and IUCT numerical solution.
[0027] Step 4.1: Tool Generatrix Equal Division Parametric Modeling: To unify the mechanical discrete model of flat-bottom, ball-end, and circular arc end mills, the generatrix length S of the tool's rotating surface is introduced as a single dimension reduction parameter; the effective cutting edges of the entire tool (including bottom edge, corner edge, and peripheral edge) are equally divided along the three-dimensional generatrix trajectory into N cutting edge micro-elements to ensure that the actual cutting width of the micro-elements in the region of abrupt change in geometric curvature for all types of tools remains absolutely consistent.
[0028] Step 4.2: CWE Dimensionality Reduction Mapping and Multi-Segment Meshing Interval Calculation: Construct a two-dimensional cylindrical coordinate system consisting of the tool rotation angle φ and the generatrix length S; using the coordinate transformation matrix, accurately flatten and project the three-dimensional CWE boundary frame output in Step 3 into this two-dimensional cylindrical coordinate system to form a two-dimensional CWE closed polygon region; for any j-th micro-element on the cutting edge, calculate its current spatial coordinates corresponding to ( ); Use point and polygon containment test algorithms (such as ray intersection method) to determine the point ( Whether it is located inside the 2D CWE polygon; for effective meshing micro-elements located inside, by solving the geometric intersection point between the horizontal axis corresponding to the height of the micro-element and the 2D CWE boundary polygon, the multi-segment incision angle of the micro-element at the current turning angle can be accurately extracted. and the cutting angle .
[0029] Step 4.3: IUCT Kinematic Modeling and Approximate Solution: For each cutting micro-element in an effective meshing state, extract the instantaneous feed velocity vector corresponding to the current tool position command. Based on the local cutting plane normal vector of the infinitesimal element in three-dimensional space Project the velocity vector onto the normal direction to obtain the instantaneous feed velocity component in the normal direction. Combined with the time difference step size of adjacent cutting teeth passing through this spatial position Based on the principle of instantaneous velocity normal projection, using the formula The instantaneous undeformed chip thickness (IUCT) of the micro-element is quickly calculated. The system then encapsulates and outputs the micro-element number, meshing state, entry and exit angles, and IUCT value, providing accurate underlying parameter boundaries for subsequent milling physical simulation.
[0030] Furthermore, in step 1, the specific calculation method for the interlayer critical contour points is as follows: Let the corresponding intralayer critical contour points within two adjacent height slices be respectively... and The algorithm first calculates the vertical distance between the geometric planes containing the two layers, and the local normal curvature variation trend of the two slices at the corresponding points; based on this trend, it constructs a distance-inverse proportional weighting factor; subsequently, on the ray that keeps the tool rotation angle φ phase synchronized, the weighting factor is used to... and Linear numerical interpolation is performed between the three-dimensional coordinate matrices. This method can forcibly eliminate the generation of large-angle mesh distortion, patch intersection, and non-manifold degradation points induced by high-frequency tool deflection or yaw motion during meshing.
[0031] Furthermore, the storage structure and pathfinding extraction mechanism of the undirected intersecting graph in step 2 are as follows: The system dynamically allocates and maintains a cross-linked list or adjacency list data structure in memory; whenever a valid spatial line-plane intersection is detected, it is assigned a globally unique integer index ID and registered as a vertex of the graph; when the grid intersection algorithm determines the intersecting line segment formed by two intersection points within the same large triangular facet, the index IDs of these two intersection points are used as the start and end points, and an undirected edge is inserted into the adjacency list; when starting the intersection cycle extraction, the algorithm first performs degree cleaning of the graph, removing non-closed dead ends with a degree of 1 caused by floating-point errors in numerical calculations; then, with any unvisited valid vertex as the root node, a depth-first traversal is started; during the traversal, the path is pushed onto the stack, and when the latest visited adjacent node is equal to the bottom node of the stack, it is determined that a closed intersection cycle has been successfully captured, all nodes in the cycle are popped and marked as visited, and so on, until all nodes in the graph have been traversed.
[0032] Furthermore, the parameterized equations for the tool generatrix length S are adaptively switched according to the specific shape of the tool used. Specifically: when a flat-end mill is detected, the system makes the generatrix S conform to the radial linear polar coordinate equation in the bottom cutting edge segment and the axial linear parametric equation in the peripheral cutting edge segment; when a ball end mill is detected, the generatrix S is uniformly described as a three-dimensional spatial circular arc parametric equation with a radius of curvature strictly equal to the ball end radius R; when a circular arc end mill (bullnose cutter) is detected, the generatrix S is expressed as a local circular arc equation with a radius equal to the designed circular arc radius r in the tool tip corner region, and first-order geometrical continuity constraint boundary conditions are applied to the bottom cutting edge straight segment and the peripheral cutting edge straight segment. By establishing this unified parameterized mapping underlying framework, the two-dimensional dimensionality reduction mapping algorithm and the three-dimensional geometric shape of the tool are decoupled, ensuring that the same parameter extraction system can perform indiscriminate micro-element calculations on various complex-shaped milling tools used in aerospace manufacturing.
[0033] The beneficial technical effects of this invention compared to the prior art are as follows:
[0034] This invention proposes a tool-worker contact region extraction method based on triangular mesh Boolean operations. It systematically reconstructs and innovates from four dimensions: the underlying cutting sweep body configuration, the mesh intersection algorithm framework, the topology retrieval mechanism, and the micro-element dimensionality reduction calculation. This method not only effectively overcomes the shortcomings of B-Rep solid modeling (prone to collapse) and voxel discretization (involving step effects and boundary distortion), improving the timeliness of simulation calculations and topological robustness under extremely complex conditions, but also connects the high-sharpness extraction of macroscopic CWE continuous boundaries with the accurate solution of underlying physical micro-element IUCT parameters. This provides stable and reliable foundational support data for process planning, chatter suppression, and tool life optimization of complex structural components in aerospace and high-end mold industries. Attached Figure Description
[0035] Figure 1 This is the overall main flowchart of the tool-worker contact area extraction method based on triangular mesh Boolean operations of the present invention.
[0036] Figure 2 A schematic diagram of the tool sweep body construction.
[0037] Figure 3 This is a diagram showing the intersection of edges and faces.
[0038] Figure 4 This is a schematic diagram of an intersection graph.
[0039] Figure 5 Extract a schematic diagram for CWE.
[0040] Figure 6 This is a schematic diagram of the micro-element partitioning.
[0041] Figure 7 This is a schematic diagram for solving the IUCT problem. Detailed Implementation
[0042] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0043] The present invention provides a method for extracting the tool-worker contact region based on triangular mesh Boolean operations, as follows: Figure 1 As shown, this method primarily operates within the pre-processing geometry module of a Computer-Aided Manufacturing (CAM) system or a CNC machining physical simulation system. The method comprises four core steps: constructing a non-self-intersecting single-step swept body mesh model compatible with various integral end mills; material removal and dynamic workpiece model updating based on improved triangular mesh Boolean operations; direct extraction of 3D high-sharpness CWE boundaries based on mesh half-edge attribute retrieval; and cutting edge micro-element meshing and IUCT numerical solution based on tool generatrix parameterization. Specific implementation details are as follows:
[0044] Step 1: Construct a non-self-intersecting single-step swept body mesh model compatible with various integral end mills.
[0045] In multi-axis CNC milling, the tool is at two adjacent discrete tool positions ( and The relative motion between the two elements sweeps out a three-dimensional volume, i.e., the single-step tool sweep volume. Accurately constructing its boundary mesh is a prerequisite for performing Boolean operations.
[0046] Combination Figure 2 It can be seen that the specific process of step 1 includes:
[0047] Step 1.1: Tool Discretization and Intra-Layer Critical Point Solving: The integral end mill to be simulated (regardless of whether it is a flat end mill, ball end mill, or circular end mill) is discretized into m height layers by horizontally slicing at equal or variable intervals along the central rotation axis of the tool. At the k-th height layer, based on rigid body kinematics, the instantaneous translational and rotational feed velocity vector v of the slice center in the current interpolation cycle is extracted. According to the geometric envelope theorem, the envelope critical point of the tool's rotating surface must satisfy the condition that the tangential velocity is orthogonal to the surface normal vector. Let the unit normal vector of a discrete point on the tool surface be n, then traverse the contour of this layer and solve for the equation... The point is the critical contour point within the layer. If none of the vertices within the layer satisfy the condition, then in Interpolate the critical contour points within the layer from the vertices with opposite signs. .
[0048] Step 1.2: Interlayer Critical Contour Point Distance Weight Interpolation: In multi-axis linkage, especially under large swing angle conditions, the critical contour points between adjacent layers may experience significant circumferential angular offsets. If the k-th layer's distance weight is directly used for interlayer weight interpolation... With the (k+1)th layer Connecting surfaces using triangular facets can lead to severe topological distortion. Therefore, this embodiment introduces an interpolation mechanism:
[0049] Let the upper and lower endpoints of the longitudinal edge of the critical profile point between interlayers to be interpolated be respectively and The dot products of the corresponding velocity vector and normal vector are respectively and The algorithm uses the dot product of the endpoints as weights and linearly interpolates the critical contour points between layers based on the endpoint coordinates. Interpolation coefficients... The interpolation point is This method generates a dense point cloud, and then stitches the surface together using a mesh generation algorithm (such as the Delaunay triangulation algorithm) in a counter-clockwise order to form a preliminary swept surface triangular mesh. The tool mesh model is then divided into two parts along the curve connecting the critical contour points, and stitched together with the generated preliminary swept surface triangular mesh to obtain a complete single-step swept volume mesh model. .
[0050] Step 1.3: Sweep Body Self-Intersection Detection and Repair: At sharp local turns on the five-axis, the sweep trajectory of the tool tail may encroach on the leading-edge trajectory, forming a self-intersection. In this embodiment, the algorithm monitors the spatial angle θ between the velocity vector v at each slice center and the tool axis vector A in real time. A first-order derivative threshold is set; when two points on the tool axis show a sign reversal of θ or exceed a set singular limit, the sweep body segment is determined to have self-intersected. The system will abandon the construction of the sweep body and instead use a discrete tool rotation body to replace the sweep body.
[0051] Step 2: Material removal and dynamic updating of the workpiece model based on improved triangular mesh Boolean operations.
[0052] The legitimate tool sweep body generated in step 1 As a material reduction body, the current state of the workpiece mesh As the workpiece being processed, a Boolean subtraction operation is performed to update the workpiece surface.
[0053] Combination Figure 3 and Figure 4 The detailed implementation process of this step is as follows:
[0054] Step 2.1: Coarse-level collision detection and half-edge topology initialization: For and Construct an AABB bounding box tree. Through bounding box intersection testing, quickly eliminate faces that are too far apart in space and have no chance of interfering, extracting candidate intersecting face pairs. Load all involved mesh models into a half-edge data structure. In this structure, each physical edge is split into two "half-edges" with opposite directions. Each half-edge structure contains a start point pointer, an end point pointer, and a pointer to the face it belongs to, plus two additional dynamic attribute fields: bool is_intersected (whether an intersection occurred) and Vector3intersection_pt (the 3D coordinates of the intersection point).
[0055] Step 2.2: Precise intersection test based on topology broadcasting: For candidate intersecting facet pairs, the direction predicate tests whether an edge of the workpiece facet penetrates the facet of the swept body. When it is calculated that an edge E1 penetrates facet f... a And generate intersection point V in space in When this happens, the system immediately records the information in the attributes of edge E1 (is_intersected = true, intersection_pt = V). in At this point, due to the topology broadcasting mechanism, when the algorithm iterates to the point of intersecting adjacent faces sharing the same geometric edge with E1, the system first checks the is_intersected flag of the corresponding half-edge. If it is true, then intersection_pt is directly extracted as the intersection point, forcibly skipping the complex determinant calculation and geometric position determination. This mechanism avoids the extremely time-consuming recalculation of intersection points at the mesh boundary.
[0056] Step 2.3: Coplanar Degeneracy 2D Dimensional Reduction Projection Processing: When the flat bottom edge or side edge of the sweeping body moves close to the workpiece surface, it will produce surface normal vectors that are parallel and the distance is close to the floating point tolerance (e.g., The coplanar degradation phenomenon (mm) occurs. For such cases, traditional micro-perturbation methods easily damage the precision of the cutting surface. This embodiment further employs a two-dimensional projection clipping strategy:
[0057] Extract all coplanar triangular face pairs (f w f s The absolute values of the components of the face normal vectors are compared, and the coordinate axis corresponding to the largest component (e.g., the largest Z-axis) is found. These triangular faces are then discarded according to their Z-coordinates and orthogonally projected onto the XY 2D plane along the Z-axis. In the 2D plane, the Sutherland-Hodgman polygon clipping algorithm is called to calculate the precise intersection and overlap region of the two triangles (usually a polygon). The 2D vertices of the overlapping polygon are then restored to their original Z-axis coordinates and inversely projected onto 3D space. The generated intersection points and lines are then incorporated into the intersection dataset.
[0058] Step 2.4: Construction of undirected intersection graph and extraction of intersection loops:
[0059] Traditional algorithms piece together intersection loops by traversing scattered intersection segments, which is extremely inefficient. This embodiment dynamically maintains an adjacency list in memory to construct an undirected intersection graph. The specific operations are as follows:
[0060] Take all the spatially independent intersection points obtained in steps 2.2 and 2.3 as vertices V of the graph. G When two intersection points within the same triangular facet are identified by the intersection algorithm as valid intersecting line segments, these two intersection points are linked in the adjacency list via an undirected edge E. G Interconnected.
[0061] After the graph is constructed, the first step is to perform a "graph cleaning" operation: traverse the degree of all vertices and remove vertices with a degree of 1 (i.e., dangling non-closed error points) along with their connected edges. Then, start the depth-first search algorithm:
[0062] (a) Initialize an empty stack and find an unvisited node with a degree of 2 and push it onto the stack.
[0063] (b) Starting from the current top node of the stack, visit its unvisited adjacent nodes and push them onto the stack.
[0064] (c) When an adjacent node that is not the parent node of the current node is encountered in the stack, it means that a closed loop has been found. Pop elements from the stack in sequence until the current node is found. This sequence of popped nodes forms an exact closed loop.
[0065] (d) Mark all nodes in the ring as visited, and repeat this process until there are no unvisited nodes in the graph.
[0066] Step 2.5: Constrained Re-subdivision and Material Removal Stitching: The extracted closed intersection loop is used as a hard boundary constraint. The Local Constraint Delaunay Triangulation (CDT) algorithm is called to re-subdivide the original large triangular facets that intersect. Then, using the non-intersecting edges as connection channels, a region growing algorithm is executed to cluster all facets into several independent patch units. For adjacent patches, the spatial relationship is determined based on the local triangular facet orientation of the adjacent boundaries: In triangular faces sharing the same boundary edge, if a triangular facet is located in the wedge-shaped space formed by another solid triangular facet, then the patch unit to which the triangular facet belongs is located inside the other solid; if they are coplanar, then they are located on the solid surface; if one is outside, then it is located outside the solid. For isolated patch units (not connected to other patch units), a detection ray is emitted within any patch unit. If the normal vector of the facet corresponding to the first intersection point of the ray is opposite to the ray direction (i.e., it has entered the solid interior), then the patch unit is determined to be located inside the subtracted solid (sweep volume). According to the Boolean subtraction rule, workpiece sheet elements inside the swept body are removed, while sheet elements outside the swept body and cutting surface sheet elements inside the workpiece are retained. Finally, the retained sheet elements are stitched together to form a new workpiece mesh model.
[0067] Step 3: Direct extraction of 3D high-sharpness CWE boundary based on mesh half-edge attribute retrieval.
[0068] The key to cutting physics simulation lies in accurately obtaining the instantaneous tool-worker contact area. This embodiment overcomes the shortcomings of traditional discretization methods that require the reconstruction of isosurfaces to extract the CWE, and directly extracts the geometric three-dimensional boundary based on the topological retention attributes of the aforementioned Boolean operations.
[0069] Combination Figure 5 Therefore, the specific implementation process of step 3 is as follows:
[0070] Step 3.1: Define the tool termination contact surface: Since the tool forms a cutting mark on the new workpiece surface when the cutting motion ends, the closed bottom surface at the end of the sweep body is essentially the solid surface of the tool itself at the current moment. The system extracts all triangular facets on this termination surface and marks them.
[0071] Step 3.2: Coplanar Fitting Patch Screening and Assembly Construction: The swept body's surface within the original workpiece will coincide with the surface of the workpiece after cutting. Based on this, extract the patch elements located within the workpiece mesh and coplanar from the swept body mesh, and mark all triangular faces within them. Extract the triangular faces marked twice as the CWE triangular face set f. cwe .
[0072] Step 3.3: Lossless boundary stripping based on the top half: Rapidly retrieve f using the half-edge data structure cwe The outer contour boundary. Traverse f cweEach triangle in the set has three half-edges. Check the pointers to the opposite half-edge of each half-edge:
[0073] If its opposite half is empty, or if the triangle to which its opposite half belongs does not belong to set f. cwe This provides a rigorous topological proof that the half-edge is located at the outermost boundary of the contact region. This half-edge is labeled as the "CWE boundary half-edge". All extracted "CWE boundary half-edges" are then sequentially chained together based on their start and end points to directly output a continuous 3D CWE boundary wireframe. Since this wireframe is entirely composed of the original vertices calculated from mesh intersections, without any smoothing fitting, it retains the high geometric sharpness and realistic step features left by repeated cutting in and out.
[0074] Step 4: Cutting edge micro-element division based on tool generatrix parameterization and IUCT numerical solution.
[0075] In order to apply the extracted macroscopic 3D CWE boundary to the underlying cutting physics model, this embodiment constructs a general physical parameter dimensionality reduction solution model to achieve efficient approximate calculation of each micro-element parameter.
[0076] Combination Figure 6 and Figure 7 The detailed execution logic is as follows:
[0077] Step 4.1: Unify the parameterization mapping of the tool generatrix: Assume that the tool geometry parameters include radius R and corner fillet radius r. Introduce the generatrix length parameter S: the length the tool travels along the generatrix from the tool tip.
[0078] The cutting edge is divided into N infinitesimal cutting edge elements by performing equal-length division along the generatrix S. This method replaces the method of equal division along the tool's Z-axis, ensuring that the actual physical cutting path width of each discrete infinitesimal element is completely equal, thus improving the numerical stability of the force integral at the bottom edge and corners.
[0079] Step 4.2: Dimensional reduction and meshing interval solution in two-dimensional cylindrical coordinate system:
[0080] The coordinates (x, y, z) of each node in the high-precision 3D CWE boundary frame extracted in step 3.3 are transformed into the coordinates of the rotation angle φ and the generatrix length S in a 2D cylindrical coordinate system. (Adjustments may be needed based on the quadrant). When the tool surface is unfolded, the original three-dimensional wireframe is unfolded into one or more closed two-dimensional CWE polygons.
[0081] For the j-th cutting edge element, calculate its current ordinate S. j Draw a horizontal scan line S=S jThe process involves calculating the set of intersection points between the scan line and each boundary segment of the 2D CWE polygon. The intersection points are sorted in ascending order of φ. Then, the direction of the boundary lines determines whether the region formed by adjacent intersection points belongs to the interior of the CWE. The intervals belonging to the interior are recorded as immersion segments, and their entry and exit angles are recorded. These represent the multiple real meshing (entry and exit) intervals of the micro-element at the current rotation angle. If the current rotation angle of the micro-element enters any immersion segment, the micro-element is marked as being in an "effective cutting meshing state."
[0082] Step 4.3: Solving for the instantaneous undeformed chip thickness using IUCT:
[0083] For the micro-element marked as participating in cutting, the instantaneous total feed velocity vector of the center of the micro-element in space is obtained through machine tool kinematics. .
[0084] The local surface normal vector at this infinitesimal element Determined by the surface of the rotating body of the tool.
[0085] Project the total feed rate vector onto the direction of the local normal vector to obtain the normal feed rate component. .
[0086] Based on the time difference between the previous cutting tooth and the current cutting tooth passing through the position of the infinitesimal element. (Usually determined by spindle speed and number of cutter teeth, such as) Using the principle of normal distance integral approximation, the instantaneous undeformed chip thickness (IUCT) is calculated: .
[0087] Finally, the system will iterate through the calculated micro-element numbers, center coordinates, cutting width, current meshing state, entry and exit angles, and instantaneous chip thickness. The data array is formatted, saved, and exported. This underlying geometric data stream can be directly transmitted to physical simulation modules such as milling cutting mechanics models and chatter stability domain analysis, serving as integration boundaries and parameter inputs, thereby extending from pure geometric path verification to high-fidelity machining physical behavior prediction.
[0088] In summary, this invention proposes a tool-worker contact region extraction method based on triangular mesh Boolean operations, which systematically reconstructs and innovates from four dimensions: the underlying cutting sweep body configuration, the mesh intersection algorithm framework, the topology retrieval mechanism, and the micro-element dimensionality reduction calculation. This method not only effectively overcomes the shortcomings of B-Rep solid modeling (prone to collapse) and voxel discretization (involving step effects and boundary distortion), improving the timeliness of simulation calculations and topological robustness under extremely complex conditions, but also connects the high-sharpness extraction of macroscopic CWE continuous boundaries with the accurate solution of underlying physical micro-element IUCT parameters. This provides stable and reliable foundational support data for process planning, chatter suppression, and tool life optimization of complex structural components in aerospace and high-end mold industries.
[0089] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention. For those skilled in the art, various modifications and improvements can be made to the algorithm data structure, pathfinding strategy, or coordinate transformation method involved in the present invention without departing from the principles of the present invention, and these modifications and improvements should also be considered to fall within the patent protection scope of the present invention.
Claims
1. A method for extracting the tool-worker contact region based on triangular mesh Boolean operations, characterized in that, Includes the following steps: Step 1: Construct a non-self-intersecting single-step swept body mesh model compatible with various integral end mills; Step 1.1: Based on the input CNC machining trajectory tool position sequence, which includes a set of three-dimensional coordinate points and the corresponding tool axis vector set, extract the tool feed kinematic parameters between two adjacent tool position points; combining differential geometry and tool envelope theory, based on the envelope boundary condition that the dot product of the instantaneous velocity vector v of a surface feature point and the surface normal vector n at that point is zero, i.e. The tool is layered along the tool axis, and the critical contour points within each layer that satisfy the envelope feature are solved. Step 1.2: To eliminate local mesh distortion caused by discrete interlayer spacing and rotational twisting under five-axis drastic attitude change conditions, a distance-weighted linear interpolation mechanism is introduced. Spatial correspondences are solved between critical contour points within adjacent height layers, and high-precision coordinate linear interpolation is performed to calculate interlayer critical contour points. All critical contour points are sorted in a uniform counter-clockwise or clockwise direction and stitched together using Delaunay triangulation or specific triangle topology connection rules to generate a high-quality preliminary swept surface triangular mesh. The tool mesh model is divided into two parts along the curve connecting the critical contour points and stitched together with the generated preliminary swept surface triangular mesh to obtain a complete single-step swept body mesh model. ; Step 1.3: To address the self-intrusion and folding phenomena that easily occur on the swept surface during five-axis large swing angle machining, a sweep body self-intersection discrimination criterion based on the dynamic evolution of the velocity vector angle is established; the spatial angle between the velocity vector and the tool axis vector at the center of each layer of the tool is calculated in real time; when the angle crosses the threshold or a directional change occurs, local self-intersection is determined; a discrete substitution processing mechanism is activated, and a series of interpolated tool models at the tool positions are used to replace the swept body in subsequent calculations; Step 2: Material removal and dynamic updating of the workpiece model based on improved triangular mesh Boolean operations; Load the workpiece mesh model from the initial or previous machining step using a half-side data structure. and the single-step swept volume mesh model generated in step 1 Perform Boolean subtraction operation ; Step 2.1: Intersection Calculation and Topology Broadcasting: Establish a hierarchical spatial bounding box based on an AABB tree, and perform coarse-level collision filtering on the workpiece mesh and the swept body mesh; for potential intersecting faces with overlapping bounding boxes, perform precise edge-triangle intersection calculation; in this process, a topology broadcasting mechanism is introduced: when it is determined that a half-edge E intersects with a triangular face f and the intersection point coordinates V are obtained, the intersection point coordinates and intersection status identifier are immediately dynamically attached to and stored in the data structure unit of the half-edge E as exclusive attributes; when the intersection algorithm subsequently traverses to the adjacent triangular face that shares the same vertex with the half-edge E, it directly reads the intersection information already cached in its attribute table, skipping the repeated solution of the line-surface geometry test equation; Step 2.2: Coplanar Singular Degradation Processing: Detect the existence of coplanar degradation where the normal vectors of the swept body patch and the workpiece patch are parallel and the spatial distance approaches zero; if so, extract the set of triangular patches that produce coplanar fit, and project them onto a local two-dimensional plane using an orthogonal projection matrix; within the two-dimensional projection domain, use the improved Sutherland-Hodgman polygon clipping algorithm to solve for the accurate overlapping polygon region; subsequently, backproject the intersection points and their boundaries generated by clipping back into three-dimensional space, and assign specific Boolean attribute labels of "remove" or "retain" to the coplanar region; Step 2.3: Construction of Undirected Intersecting Graph and Extraction of Intersection Cycles: Instantiate all spatial intersection point objects obtained in Steps 2.1 and 2.2 as nodes of the graph, and instantiate intersecting line segments that exist in the same triangular facet and connect two intersection points as undirected edges of the graph. Dynamically construct an undirected intersecting graph in system memory; using a graph theory-based depth-first search pathfinding algorithm, traverse the intersecting graph starting from any node with a degree greater than 1. When the traversal path returns to the starting node, a closed intersection cycle is directly extracted until all valid nodes in the graph have been visited. Step 2.4: Local Constraint Mesh Generation and Patch Unit Stitching: Using the extracted closed intersection loop as the internal hard geometric constraint boundary, the constrained Delaunay triangulation algorithm is called to re-mesh only the local large triangular facets truncated by the intersection line. Subsequently, using non-intersecting edges as topological connectivity links, the updated facet set is divided into several independent mesh patch units using the region growing method. Based on the ray casting method, it is determined whether each patch unit is located inside or outside the swept volume in space. According to the Boolean subtraction rule, the material facets located inside are removed, and the external patch units are retained. Finally, the mesh units are stitched together to generate a new workpiece mesh model after material removal. ; Step 3: Direct extraction of 3D high-sharpness CWE boundary based on mesh half-edge attribute retrieval; Step 3.1: In the Boolean subtraction operation piece cell retention and splicing stage in Step 2, maintain the original source tracking tags of all triangular facets; extract the sweep body termination surface mesh corresponding to the current machining moment, that is, the static solid surface mesh of the tool itself at the end of the motion; Step 3.2: Traverse the updated new workpiece mesh model By matching source tags, verifying normal vector consistency, and determining the center distance threshold of facets, all overlapping triangular faces that belong to both the tool sweep body termination surface and are completely attached to the updated workpiece surface are selected. These triangular faces are then aggregated and defined as the tool-workpiece transient contact surface set. ; Step 3.3: Utilize the adjacency record property of the top half in the half-edge data structure to traverse the set of faces. The set contains all internal half-edges; if and only if a certain half-edge is not included in the set. Any other triangular face within the triangle is shared in the reverse direction, meaning the pointer to the opposite half of that half is null, or the face to which its opposite half belongs does not belong to it. At that time, the system marks it as an absolute boundary half-side; Step 3.4: All extracted absolute boundary half edges are chained together according to the topological connection order of the first and last vertices to directly output a three-dimensional continuous CWE macro boundary wireframe model with high geometric sharpness; for multiple separated contact areas caused by discontinuous cutting, the algorithm automatically separates and outputs multiple independent CWE connected branches by tracing non-intersecting closed chains. Step 4: Cutting edge micro-element partitioning and IUCT numerical solution based on tool generatrix parameterization; Step 4.1: Tool Generatrix Equal Division Parametric Modeling: To unify the mechanical discrete model of flat-bottom, ball-end, and circular arc end mills, the generatrix length S of the tool's rotating surface is introduced as a single dimension reduction parameter; the effective cutting edge of the entire tool is divided into N cutting edge micro-elements along the three-dimensional generatrix trajectory at equal intervals to ensure that the actual cutting width of the micro-elements in the region of steep change in geometric curvature of various tools remains absolutely consistent; Step 4.2: CWE Dimensionality Reduction Mapping and Multi-Segment Meshing Interval Calculation: Construct a two-dimensional cylindrical coordinate system consisting of the tool rotation angle φ and the generatrix length S; using the coordinate transformation matrix, accurately flatten and project the three-dimensional CWE boundary frame output in Step 3 into this two-dimensional cylindrical coordinate system to form a two-dimensional CWE closed polygon region; for any j-th micro-element on the cutting edge, calculate its current spatial coordinates corresponding to ( ); using the point and polygon containment test algorithm, determine the point ( Whether it is located inside the 2D CWE polygon; for effective meshing micro-elements located inside, by solving the geometric intersection point between the horizontal axis corresponding to the height of the micro-element and the 2D CWE boundary polygon, the multi-segment incision angle of the micro-element at the current turning angle can be accurately extracted. and the cutting angle ; Step 4.3: IUCT Kinematic Modeling and Approximate Solution: For each cutting micro-element in an effective meshing state, extract the instantaneous feed velocity vector corresponding to the current tool position command. Based on the local cutting plane normal vector of the infinitesimal element in three-dimensional space Project the velocity vector onto the normal direction to obtain the instantaneous feed velocity component in the normal direction. ; Combining the time difference step size of adjacent cutting teeth passing through this spatial position Based on the principle of instantaneous velocity normal projection, using the formula The instantaneous undeformed chip thickness of the micro-element is quickly calculated. The system then encapsulates and outputs the micro-element number, meshing state, entry and exit angles, and IUCT value, providing accurate underlying parameter boundaries for subsequent milling physical simulation.
2. The method for extracting the tool-worker contact region based on triangular mesh Boolean operations according to claim 1, characterized in that, In step 1, the specific calculation method for the interlayer critical contour points is as follows: Let the corresponding intralayer critical contour points in two adjacent height slices be respectively... and The algorithm first calculates the vertical distance between the geometric planes containing the two layers, and the local normal curvature variation trend of the two slices at the corresponding points; based on this trend, it constructs a distance-inverse proportional weighting factor; subsequently, on the ray that keeps the tool rotation angle φ phase synchronized, the weighting factor is used to... and Linear numerical interpolation is performed between the three-dimensional coordinate matrices.
3. The method for extracting the tool-worker contact region based on triangular mesh Boolean operations according to claim 1, characterized in that, The storage structure and pathfinding extraction mechanism of the undirected intersecting graph in step 2 are as follows: The system dynamically allocates and maintains a cross-linked list or adjacency list data structure in memory; whenever a valid spatial line-plane intersection is detected, it is assigned a globally unique integer index ID and registered as a vertex of the graph; when the mesh intersection algorithm determines the intersecting line segment formed by two intersection points within the same large triangular facet, the index IDs of these two intersection points are used as the start and end points, and an undirected edge is inserted into the adjacency list; when starting the intersection cycle extraction, the algorithm first performs degree cleaning of the graph, removing non-closed dead ends with a degree of 1 caused by floating-point errors in numerical calculations; then, with any unvisited valid vertex as the root node, a depth-first traversal is started; during the traversal, the path is pushed onto the stack, and when the latest visited adjacent node is equal to the bottom node of the stack, it is determined that a closed intersection cycle has been successfully captured, all nodes in the cycle are popped and marked as visited, and so on, until all nodes in the graph have been traversed.
4. The method for extracting the tool-worker contact region based on triangular mesh Boolean operations according to claim 1, characterized in that, The parameterized equations for the tool generatrix length S are adaptively switched according to the specific shape of the tool used. Specifically: when a flat-end mill is detected, the system makes the generatrix S obey radial linear polar coordinate equations in the bottom cutting edge segment and axial linear parametric equations in the peripheral cutting edge segment; when a ball end mill is detected, the generatrix S is uniformly described as a three-dimensional spatial circular arc parametric equation with a radius of curvature strictly equal to the ball end radius R; when a circular arc end mill is detected, the generatrix S is expressed as a local circular arc equation with a radius equal to the designed circular arc radius r in the tool tip corner region, and first-order geometrical continuity constraint boundary conditions are applied to the bottom cutting edge straight segment and the peripheral cutting edge straight segment; by establishing this unified parameterized mapping underlying framework, the two-dimensional dimensionality reduction mapping algorithm and the three-dimensional geometric shape of the tool are decoupled, ensuring that the same parameter extraction system can perform indiscriminate micro-element calculations on various complex-shaped milling tools used in aerospace manufacturing.