Steep and shoal finish machining method based on region integration
Through the regional integration method, the model to be processed is divided into steep and shallow areas, and the processing paths are generated using appropriate algorithms respectively, which solves the problem of difficulty in effectively planning complex terrain processing paths in the existing technology, and achieves high-precision and high-efficiency CNC machining.
Patent Information
- Application Number
- CN202411795480.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-15
AI Technical Summary
In CNC machining, especially when dealing with complex terrain or workpiece surfaces, it is difficult for the prior art to effectively plan and generate processing paths in steep and shallow areas, resulting in insufficient processing accuracy and efficiency.
The model to be processed is divided into steep areas and shallow areas based on regional integration, and the processing path is generated using the cross-plane method, heat conduction method and other parameter methods respectively. The specific steps include building a model to be processed, dividing the areas using a contour plane demarcation algorithm, using a contour precision processing algorithm for steep areas, and using heat conduction and equal parameter methods to generate paths for shallow areas.
Through this method, the tool path of the entire model can be directly generated, machining accuracy and efficiency can be improved, suitable for processing workpieces of complex shapes, and the stability and safety of the processing process can be optimized through collision detection and path connection algorithms.
Smart Images

Figure CN119828600A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of numerical control machining, in particular to a steep and shallow finishing method based on regional integration. Background Art
[0002] With the rapid development of the global manufacturing industry and the continuous advancement of digital transformation, the industrial manufacturing process is becoming increasingly digitalized and automated, and the manufacturing process and precision requirements are becoming increasingly higher, which poses new challenges to the control and optimization of the manufacturing process. CNC machining technology is a technology that uses digital information to control mechanical movement and working processes. CNC machine tools are mechatronic products formed by the penetration of new technologies represented by CNC programming technology into traditional manufacturing industries and emerging manufacturing, namely the so-called digital equipment. CNC machining technology is an important method to achieve high-efficiency and high-precision machining, and is also the cornerstone of modern high-end industry. It plays an important role in various fields of manufacturing industries such as aerospace, medical equipment, etc.
[0003] Computer Aided Manufacturing (CAM) is an important part of the manufacturing process. With the improvement of production requirements, people have put forward higher requirements for the accuracy and efficiency of CAM in actual CNC machining. CAM generally includes machining path planning and tool axis direction planning. Since the tool must move along the planned machining trajectory, the quality of the machining path and tool axis direction determines the subsequent machining accuracy and efficiency to a certain extent.
[0004] Shallow steep finishing usually refers to high-precision machining on complex terrain or workpiece surfaces. This machining method is widely used in aerospace, mold manufacturing and other fields. Using CAM software to generate complex tool paths, especially when processing shallow and steep areas, requires careful planning of tool motion trajectories. How to further plan steep and shallow machining paths and improve machining accuracy and efficiency has become an important research topic in this technical field. Summary of the invention
[0005] The purpose of the present invention is to provide a steep and shallow finishing method and system based on regional integration, which divides the model to be processed into a steep area and a shallow area, applies the cutting plane method to generate a processing path for the steep area, and applies the heat conduction method and the equal parameter method to generate a processing path in the shallow area. For various complex models, the tool path of the entire model can be directly generated, thereby improving the processing accuracy and processing efficiency, and can be used to process workpieces with complex shapes.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A method for steep and shallow finishing based on regional integration, the method comprising the following steps:
[0008] S1, constructing a model of the workpiece to be processed, and using a contour surface demarcation algorithm to determine the steep and shallow types, and dividing the surface of the model to be processed into a steep area and a shallow area based on the demarcation angle;
[0009] S2, for steep areas, adopt the contour finishing algorithm for path planning, generate contour surfaces parallel to the XY plane with equal steps for the specified downcut step, and generate steep processing paths based on the intersection of the contour surfaces and the steep areas;
[0010] S3, for the shallow area, firstly, the surface of the model to be processed is reparameterized using the heat conduction method, and then the parallel, contour or spiral processing path is generated using the isoparametric method to obtain the shallow processing path;
[0011] S4, processing the workpiece based on the steep processing path and the shallow processing path.
[0012] Furthermore, in S1, the use of the contour surface boundary algorithm to determine the steepness and shallowness types, and based on the boundary angle, the to-be-processed area of the to-be-processed model is divided into a steep area and a shallow area, and the specific steps are as follows:
[0013] S101, cross-cutting: selecting a set of equal-height surfaces parallel to the XY plane, and cutting the surface of the model to be processed into a number of surface areas;
[0014] S102, longitudinal sectioning: for each curved surface area generated by the transverse sectioning, longitudinal sections perpendicular to the XY plane are uniformly selected at equal angles to divide each curved surface area into a number of sub-areas, and two intersection lines formed by the longitudinal section and the curved surface in each sub-area are recorded;
[0015] S103, for each sub-area and its two intersection lines, calculate the angle between each intersection line and the z-axis, and calculate the remaining angle, and compare whether the minimum value of the two remaining angles is less than a given boundary angle. If so, it is determined to be a shallow area, otherwise it is determined to be a steep area;
[0016] S104, using S103 to classify and judge each sub-region generated by the transverse cutting and the longitudinal cutting in turn;
[0017] S105, using Boolean operations to merge the sub-regions according to the two types of steep and shallow, to obtain a merged steep region and shallow region.
[0018] Furthermore, in S2, for steep areas, a contour finishing algorithm is used for path planning, and the specific steps are as follows:
[0019] S201, according to the input steep area, calculate the z height range of the steep area, and find the upper and lower limits of its z value as the generation range of the contour surface, wherein the z height is the height along the z axis;
[0020] S202, according to the given step down distance and the maximum step down distance, determine the height interval and the residual height, starting from the lower limit of the z height range, calculate the height that the current contour surface and the next adjacent contour surface need to be raised according to the residual height, and the height cannot exceed the maximum step down distance;
[0021] S203, generating contour surfaces one by one according to the height interval and the z-height range of the steep area, and generating a steep processing path based on the intersection lines of the contour surfaces and the steep area; wherein the steep processing path also includes the intersection lines of the variable contour surfaces calculated according to the residual height and the steep area.
[0022] Furthermore, the S2 also includes, for the steep area, using a spiral line generation algorithm to classify all intersection lines intercepted by the contour surface into adjacent groups of contour lines, and in each group of contour lines, connecting adjacent closed paths into spiral lines to generate a spiral steep processing path, the specific steps are as follows:
[0023] (1) Input steep processing path;
[0024] (2) Determine each path one by one to determine whether the current path and its adjacent paths are both closed. If they are both closed, proceed to (3). Otherwise, the current path does not need to be connected by a spiral line, and the next path is set as the current path.
[0025] (3) For the closed current path and its adjacent paths, adaptively select connection points based on their geometric properties so that the current path and its adjacent paths can be smoothly connected through the connection points;
[0026] (4) disconnect the closed current path from its adjacent path from the connection point, connect them into a spiral line, merge them into one path, and regard it as a closed path;
[0027] (5) Repeat (2)-(4) until all paths are judged to be complete.
[0028] Furthermore, in S3, for the shallow area, the surface is reparameterized using a heat conduction method, and the specific steps are as follows:
[0029] (6) First, construct a metric. Calculate the tensor matrix based on the surface geometry information of the model to be processed, and construct a new metric based on this matrix. In the new metric, the distance between two points on the surface is considered to be the number of tool widths under a given residual height. The meaning is: if the distance between two points is 1 under the new metric, then the positions of the two points on the surface are exactly the line spacing;
[0030] (7) Calculate the heat transfer function. According to the Varadhan equation, the distance from point p to point p0 at time t is: According to the heat transfer equation: and given boundary conditions, calculate the heat transfer function h, during which all distances and angles are calculated using the metrics established in (1);
[0031] (8) Calculate the unit vector field based on the heat transfer function:
[0032] (9) Use the least squares method to calculate the value function g:
[0033] (10) Reparameterize the surface using the value function.
[0034] Furthermore, in S3, the equal parameter method is used to generate a parallel processing path to obtain a shallow processing path, which specifically includes:
[0035] (1) Extract the inner and outer boundaries of the surface of the model to be processed and map them to the parameter domain, and obtain the rectangular bounding box (Bounding Box) of the outer boundary on the parameter domain [u min ,u max ]×[v min ,v max ];
[0036] (2) Select the initial path on the parameter domain and sample uniformly. If the input parameter direction is u, then v = v min is the initial parameter path, otherwise u=u min is the initial parameter path. Taking the u parameter direction as an example, n points (u i ,v min )(i=0,1,...,n-1), where
[0037] (3) Calculate the next parameter path, assuming that the current parameter path is v = v i , sample it uniformly, and for each sampling point (u i ,v i ), calculate its position on the parameter line u=u according to the residual height constraint i The offset point on the parameter domain is calculated, and the offset distance of all sampling points on the parameter domain is taken, and the minimum distance is set as d min , then the next parameter path is v=v i +d min ;
[0038] (4) Repeat the process of (3) until the boundary of the rectangular bounding box is reached and the parameter path is generated;
[0039] (5) performing path clipping, clipping the generated parameter path to retain the path within the outer boundary and remove the path within the inner boundary;
[0040] (6) Map the path in the parameter domain to three-dimensional space to obtain the tool contact point path, which is then converted into the tool position point path.
[0041] Further, in S3, an isoparametric method is used to generate a contour or spiral processing path to obtain a shallow processing path, which specifically includes:
[0042] (1) Obtaining the parameter grid: First, use the parallel machining path generation method to generate isoparametric lines for the parameter directions u and v respectively, and then intersect these isoparametric lines to obtain the parameter grid;
[0043] (2) Generate contour lines on the parameter domain. According to the parameter grid, start from the outermost layer and traverse each layer to form a rectangular path until the last layer. If there are an odd number of layers, the last layer degenerates into a parameter line.
[0044] (3) Generate a spiral line on the parameter domain, start traversing from the outermost layer of the contour line, disconnect the current contour line at the position where it connects with the next layer, and connect it to the next layer. After the traversal is completed, a spiral line can be obtained;
[0045] (4) Make arc transitions at corners to ensure the smoothness of the path;
[0046] (5) performing path clipping, clipping the generated parameter path to retain the path within the outer boundary and remove the path within the inner boundary;
[0047] (6) Map the path in the parameter domain to three-dimensional space to obtain the tool contact point path, which is then converted into the tool position point path.
[0048] Furthermore, the path clipping is to clip the generated parameter path to retain the path within the outer boundary and remove the path within the inner boundary, which specifically includes:
[0049] Algorithm 1 is used for path clipping. The specific steps are as follows:
[0050] First, keep the part within the outer boundary. The algorithm flow is as follows:
[0051] (1) For each path point, determine whether it is inside the outer boundary by using the ray method, and assign it a bool value. If the path point is inside the outer boundary, its bool value is true, otherwise it is false;
[0052] (2) Create an empty total path. For each path, traverse the points on it and determine its bool value. If it is false, skip it until the first point with a bool value of true is encountered. Create an empty path temp. Calculate the intersection of the line segment formed by the point and the previous point with the outer boundary. Add it and the point to path temp. Continue traversing. If a point with a bool value of true is encountered, add it to path temp. Until a point with a bool value of false is encountered, calculate the intersection of the line segment formed by the point and the previous point with the outer boundary. Add it to the end of path temp. Add path temp to the total path and set path temp to an empty value. Repeat this process to obtain the total path, that is, multiple paths clipped by the outer boundary path.
[0053] Then, after obtaining the path within the outer boundary, the part within the inner boundary is removed. The algorithm flow is as follows:
[0054] (1) For each path point, use the ray method to determine whether it is inside the inner boundary and assign it a bool value with an initial value of false. Traverse the inner boundaries. If the path point is inside a certain inner boundary, its bool value is true and the number of the inner boundary where the path point is located is recorded.
[0055] (2) Create an empty total path. For each path, traverse the points on it and determine its bool value. If it is true, skip it until the first point with a bool value of false is encountered. Create an empty path temp. Calculate the intersection of the line segment formed by the point and the previous point with the inner boundary of the corresponding number. Add it and the point to path temp. Continue traversing. If a point with a bool value of false is encountered, add it to path temp. Until a point with a bool value of true is encountered, calculate the intersection of the line segment formed by the point and the previous point with the inner boundary of the corresponding number. Add it to the end of path temp. Add path temp to the total path and set path temp to an empty value. Repeat this process to obtain the total path, that is, multiple paths clipped by the inner boundary path.
[0056] Algorithm 2 is used for path clipping. The specific steps are as follows:
[0057] (1) Calculate the intersection points of each path with the inner and outer boundaries, insert these intersection points into the original path, and record their indexes;
[0058] (2) Because the path runs through the inner and outer boundaries, there will always be an even number of intersections (considering repeated intersections, that is, intersections that are vertices of polygons). The paths between the two intersections are retained in the order of the paths. If there are two repeated intersections with no path between them, they are ignored.
[0059] Furthermore, the processing method further includes performing collision detection on the steep processing path and the shallow processing path based on the Z-buffer algorithm, and deleting the tool position points where the collision occurs. The specific steps are as follows:
[0060] (1) Constructing a projection plane: Based on the boundary information of the model to be processed, a projection plane perpendicular to the tool axis direction is constructed at a certain distance from the model to be processed, in the opposite direction of the tool axis direction.
[0061] (2) Constructing a distance image: Select the range size of the projection of the model to be processed on the projection plane to generate an image. Given that the image has 1024 × 1024 pixels, for each pixel cell, calculate the distance between all points on the model to be processed that fall within the cell and the image, and store the minimum distance.
[0062] (3) For each tool position point in the steep machining path and the shallow machining path, the local spatial point where the tool may contact the surface is calculated based on the tool geometric model;
[0063] (4) For each spatial point given by the tool position point, calculate its distance to the projection plane and the corresponding cell on the image. If these distances are not less than the storage value of the cell, it is considered that the tool position point has no collision, otherwise the tool position point has a collision;
[0064] (5) Delete all tool positions where collision occurs, and the remaining output is the path.
[0065] Furthermore, the processing method further includes connecting all the paths of the spiral lines in the steep processing path and the shallow processing path and the remaining ZigZag topological paths using a multi-topological connection algorithm based on MST, and the specific steps are as follows:
[0066] (1) Treat each spiral or ZigZag path as a point and construct a fully connected graph. The weight of the edge is determined by the geodesic distance between the corresponding paths of the two points.
[0067] (2) For the graph structure constructed in (1), calculate its minimum spanning tree T: sort each edge in the graph according to its weight, and each time take the edge with the smallest weight and whose two vertices are not in the same set from the edge set and add it to the spanning tree, and repeat this process until all nodes are successfully connected;
[0068] (3) For the tree structure T calculated in (2), use the breadth-first search method to start from a vertex in the graph and search for adjacent vertices that have not been visited. Visit as many vertices as found, and then start from each of these vertices to continue searching for adjacent vertices that have not been visited, and calculate a traversal path.
[0069] (4) Connect all paths according to the traversal path order of the tree structure T
[0070] The present invention also provides a control device, including a memory, a processor, and a program stored in the memory, wherein when the processor executes the program, the steep and shallow finishing method based on regional integration as described above is implemented.
[0071] According to the specific embodiment provided by the present invention, the steep and shallow finishing method based on regional integration provided by the present invention discloses the following technical effects:
[0072] Firstly, a contour surface demarcation algorithm is used to judge the steepness and shallowness types, and based on the demarcation angle, the surface of the model to be processed is divided into a steep area and a shallow area, so that different strategies can be used for processing in different areas; then, a contour finishing algorithm is used for path planning in the steep area, and three strategies of parallel, contour and spiral are used to generate paths in the shallow area. Firstly, the surface is re-parameterized using a heat conduction method, and then the path is generated using an isoparametric method; the present invention divides the surface of the model to be processed into regions, integrates each sub-region according to the steepness and shallowness types, realizes the integration of different regions, is conducive to generating an overall processing path, avoids the tedious calculation of generating a processing path for each surface separately, and is conducive to improving the efficiency and accuracy of path generation.
[0073] The present invention optimizes the generated path, ensures the stability and efficiency of the machining process, can meet the machining requirements of complex surfaces and different regions, is suitable for machining workpieces with complex shapes, and can directly generate the tool path of the entire model for various complex models, thereby improving machining accuracy and efficiency. In addition, the present invention also proposes a collision detection z-buffer algorithm to ensure the safety of actual machining and avoid unnecessary collisions of the tool during machining. At the same time, a multi-topology connection algorithm based on MST is used to connect all paths, thereby reducing tool retraction, and further improving the steep and shallow finishing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0075] Figure 1 A flow chart of a steep and shallow finishing method based on regional integration according to an embodiment of the present invention;
[0076] Figure 2Schematic diagram of the contour surface demarcation algorithm according to an embodiment of the present invention, wherein (a) is a cross-section schematic diagram, (b) is a longitudinal section schematic diagram, and (c) is a schematic diagram of the angle between the intersection line and the z-axis;
[0077] Figure 3 An example diagram of a path generated by the contour finishing algorithm according to an embodiment of the present invention;
[0078] Figure 4 Schematic diagram of a path generated by the spiral line generation algorithm of an embodiment of the present invention, wherein (a) is a schematic diagram of a top view, (b) is a schematic diagram of a three-dimensional view, and (c) is a schematic diagram of a spiral line;
[0079] Figure 5 Generate a path diagram for the parametric method of the embodiment of the present invention;
[0080] Figure 6 Schematic diagram of the path method for generating contour and spiral strategies according to an embodiment of the present invention, wherein (a) is a schematic diagram of a parameter grid, (b) is a schematic diagram of a contour path, and (c) is a schematic diagram of a spiral path;
[0081] Figure 7 illustrative diagrams of contour line paths and spiral line paths according to embodiments of the present invention, wherein (a) is a schematic diagram of a contour line path, and (b) is a schematic diagram of a spiral line path;
[0082] Figure 8 A schematic diagram of a distance image is constructed for an embodiment of the present invention, wherein (a) is a three-dimensional schematic diagram, and (b) is a plane schematic diagram.
[0083] Fig. 9 Schematic diagram of the geometric model for selecting spatial points in the embodiment of the present invention, wherein (a) is a ball-end cutter with a hemispherical bottom surface; (b) is a plane cutter with a circular bottom surface; (c) is an end mill with a rounded tip, with a circular bottom surface + a circular line;
[0084] Fig.10 Schematic diagram of path comparison before and after using the z-buffer algorithm in an embodiment of the present invention, wherein (a) is a schematic diagram of the path before using the z-buffer algorithm; (b) is a schematic diagram of the path after using the z-buffer algorithm;
[0085] Fig.11 A schematic diagram of a multi-topology connection of paths based on MST according to an embodiment of the present invention;
[0086] Fig.12 It is a schematic diagram of the steep and shallow finishing results of an embodiment of the present invention;
[0087] Fig.13 is a schematic diagram of residual height;
[0088] Fig.14Figure 2 is the path spacing of the knife contact points on three different surfaces, where (a) is the path spacing on a plane; (b) is the path spacing on a convex surface; and (c) is the path spacing on a concave surface. DETAILED DESCRIPTION
[0089] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0090] The purpose of the present invention is to provide a steep and shallow finishing method based on regional integration, which divides the model to be processed into a steep area and a shallow area, applies the cutting plane method to generate a processing path for the steep area, and applies the heat conduction method and the equal parameter method to generate a processing path in the shallow area. For various complex models, the tool path of the entire model can be directly generated, thereby improving the processing accuracy and processing efficiency, and can be used to process workpieces with complex shapes.
[0091] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0092] like Figure 1 As shown, the steep and shallow finishing method based on regional integration provided by the present invention comprises the following steps:
[0093] S1, constructing a model of the workpiece to be processed, and using a contour surface demarcation algorithm to determine the steep and shallow types, and dividing the surface of the model to be processed into a steep area and a shallow area based on the demarcation angle;
[0094] S2, for steep areas, adopt the contour finishing algorithm for path planning, generate contour surfaces parallel to the XY plane with equal steps for the specified downcut step, and generate steep processing paths based on the intersection of the contour surfaces and the steep areas;
[0095] S3, for the shallow area, firstly, the surface of the model to be processed is reparameterized using the heat conduction method, and then the parallel, contour or spiral processing path is generated using the isoparametric method to obtain the shallow processing path;
[0096] S4, processing the workpiece based on the steep processing path and the shallow processing path.
[0097] In conjunction with a specific embodiment, a method for finishing steep slopes and shallow slopes based on regional integration is described in detail as follows:
[0098] 1. The boundary between steepness and shallowness
[0099] First, the model to be processed is divided into steep areas and shallow areas according to the demarcation angle, and then different strategies are used to process them respectively. Here, the demarcation angle refers to the angle between the processing area segment and the reference plane (usually the XY plane). The processing area can be classified according to the demarcation angle. The processing area segment greater than the demarcation angle is defined as a "steep area"; the processing area segment less than the demarcation angle is defined as a "shallow area". The larger the demarcation angle, the smaller the "steep area".
[0100] The present invention uses a contour surface demarcation algorithm to determine the type of steep shoal. A large number of contour surfaces parallel to the XY plane are used to cut the surface. For each surface area between two adjacent sections, it is determined whether it belongs to a shoal or a steep area according to a given demarcation angle. Figure 2 As shown, the specific process is:
[0101] (1) Cross-section: Select a set of equal-height surfaces parallel to the XY plane and cut the model into several regions;
[0102] (2) Longitudinal section: For each area generated by the transverse section, select screenshots perpendicular to the XY plane at equal angles, divide the area into several sub-areas, and record the two intersection lines formed by the longitudinal section and the curved surface in each sub-area;
[0103] (3) For each sub-area and its two intersection lines, calculate the angle between the intersection line and the z-axis, and calculate the remaining angle, and compare whether the minimum value of the two complementary angles is less than the given dividing angle. If so, it is judged as a shallow area, otherwise it is judged as a steep area;
[0104] (4) classifying and judging each sub-region generated by the cross-section and the longitudinal section;
[0105] (5) Use Boolean operations to merge the sub-areas according to the steep and shallow types to obtain the merged steep area and shallow area.
[0106] 2. Processing path in steep areas
[0107] 1. Equal height finishing algorithm
[0108] For steep areas, the present invention adopts the contour finishing algorithm for path planning. For the specified step-down distance, the contour surface parallel to the XY plane is generated with equal step distance, and the intersection line between the contour surface and the steep area is calculated as the output path. At the same time, we provide the option of using residual height calculation to generate a variable contour processing path. According to the residual height, the variable contour surface is calculated, and the intersection line with the steep area is calculated as the output path. The specific process of the algorithm is:
[0109] (1) According to the input steep area, calculate the z height range of the steep area, and find the upper and lower limits of its z value as the range for generating the contour surface.
[0110] (2) Determine the z height interval and residual height based on the given step down distance and the maximum step down distance. When the residual height calculation is selected, start from the z lower limit and calculate the z height that needs to be raised between the current contour surface and the next adjacent contour surface based on the residual height. This height cannot exceed the maximum step down distance.
[0111] (3) Generate contour surfaces one by one according to the z-height range of the interval and steep area. Calculate the intersection line between the contour surface and the curved surface, and output the path. Taking the model of an "egg-shaped doll" as an example, the output path is as follows: Figure 3 shown.
[0112] Among them, about the scallop height:
[0113] The residual height is referred to as the residual height. When the surface is machined, traces of tool cutting will be left on its surface, forming a "wavy" surface, such as Fig.13 The smaller the tool contact path interval is, the denser the tool path is, and the smaller the residual height is, but the overall path length will increase, thus reducing the processing efficiency. Therefore, an acceptable limit must be set for the residual height, that is, the residual height constraint. When the residual height does not exceed the limit, the tool contact path interval should be increased as much as possible to reduce the total path length.
[0114] The path spacing is calculated based on the maximum residual height constraint. As the tool moves along the tool path trajectory, the residual height appears on the machined surface. The distance between the path trajectories is the tool contact path spacing, such as Fig.14 As shown. The calculation of path spacing is related to the concavity of the surface. The path spacing depends on the local curvature radius R of the surface, the feed direction, the tool radius r and the height h of the residual on the surface. Usually, the maximum residual height constrained is much smaller than the tool radius r, so an approximate method can be used to simplify the calculation of path spacing. When using a ball-end tool for machining, the tool contact path spacing l on the plane flat , the knife contact path spacing on the convex surface l convex , the knife contact path spacing on the concave surface l concave It can be approximated by the following equation:
[0115]
[0116] In free-form surface multi-axis CNC machining, the point where the cutting surface of the tool head contacts the machining surface is usually called the tool contact point. The tool position point refers to the positioning reference point of the tool. The tool position point of a ball-end tool is the center of the ball head, and the conversion between the tool position point and the tool contact point of a ball-end tool is also relatively simple: the tool position point can be obtained by offsetting the tool contact point along the normal vector of the surface by the radius of the ball head. The tool position point of a flat-bottom tool is the center point of the bottom surface of the tool, and the conversion method between the tool contact point and the tool position point is as follows: the tool contact point is offset by the radius of the bottom surface in a direction perpendicular to the tool axis to obtain the tool position point.
[0117] 2. Spiral generation algorithm
[0118] For the paths generated by contour finishing in steep areas, the spiral line generation algorithm can be used as needed to classify all the intersection lines intercepted by the contour surface into adjacent groups of contour lines. In each group of contour lines, the adjacent closed paths are connected into spiral lines, such as Figure 4 As shown, the specific process of the algorithm is:
[0119] (1) Input path;
[0120] (2) Determine whether the current path and its adjacent paths are both closed. If they are both closed, proceed to (3). Otherwise, the current path does not need to be connected by a spiral line, and the next path is set as the current path.
[0121] (3) For closed adjacent paths, the connection points are adaptively selected according to their geometric properties so that they can be smoothly connected through the connection points;
[0122] (4) The closed adjacent paths are disconnected from the connection point, connected into a spiral line, and merged into one path, which is regarded as a closed path;
[0123] (5) Repeat (2)-(4) until all paths are judged to be complete.
[0124] 3. Processing path in the shallow area
[0125] In the shallow area, three strategies, parallel, contour and spiral, are used to generate paths. The surface is first reparameterized using the heat conduction method, and then the path is generated using the isoparametric method.
[0126] 1. Heat conduction method
[0127] First determine the heat source. If the parallel strategy is used, set the heat source to a straight line projection on the surface at a specified parallel angle. If the contour or spiral strategy is used, set the heat source to a given boundary or surface boundary. Calculate the heat transfer function using the given heat source, then construct a value function to fit the thermal process, and use the value function to reparameterize the surface. The specific process is:
[0128] (1) First, construct a metric. Calculate a tensor matrix based on the surface geometry information, and use this matrix to construct a new metric. In this new metric, the distance between two points on the surface is considered to be the number of knife widths under a given residual height. This means that if the distance between two points is 1 under the new metric, then the positions of the two points on the surface are exactly the row distance.
[0129] (2) Calculate the heat transfer function. According to the Varadhan equation, the distance from point p to point p0 at time t is: According to the heat transfer equation: and given boundary conditions, calculate the heat transfer function h, during which all distances and angles are calculated using the metrics established in (1);
[0130] (3) Calculate the unit vector field based on the heat transfer function:
[0131] (4) Use the least squares method to calculate the value function g:
[0132] (5) Reparameterize the surface using the value function.
[0133] 2. Equal parameter method
[0134] After the surface is reparameterized, the path can be generated using the isoparametric method. For the parallel strategy, the algorithm flow is as follows:
[0135] (1) Extract the inner and outer boundaries of the surface to be processed and map them to the parameter domain, and obtain the rectangular bounding box (Bounding Box) of the outer boundary on the parameter domain [u min ,u max ]×[v min ,v max ]; u is used to measure the width of the parameter domain of the parametric surface, v is used to measure the length of the parameter domain of the parametric surface, the subscript min represents the minimum value, and the subscript max represents the maximum value. Given (u, v), a point on the surface can be uniquely determined.
[0136] (2) Select the initial path on the parameter domain and sample uniformly. If the input parameter direction is u, then v = v min is the initial parameter path, otherwise u=v min is the initial parameter path. Taking the u parameter direction as an example, n points (u i ,v min )(i=0,1,...,n-1), where
[0137] (3) Calculate the next parameter path. Let the current parameter path be v = v i , sample it uniformly, and for each sampling point (u i ,v i ), calculate its position on the parameter line u=u according to the residual height constraint i The offset point on the parameter domain is calculated, and the offset distance of all sampling points on the parameter domain is taken, and the minimum distance is set as d min , then the next parameter path is v=v i +d min ;
[0138] (4) Repeat the process of (3) until the boundary of the rectangular bounding box is reached and the parameter path is generated;
[0139] (5) performing path clipping, clipping the generated parameter path to retain the path within the outer boundary and remove the path within the inner boundary;
[0140] (6) Map the path in the parameter domain to three-dimensional space to obtain the tool contact point path, which is then converted into the tool position point path.
[0141] Ignoring the steep and shallow boundaries, a parallel strategy is used to generate a path on the surface of an "egg-shaped doll" as follows Figure 5 shown.
[0142] For the contour and spiral strategies, the algorithm flow is as follows:
[0143] (1) Obtain the parameter grid. First, use the parallel strategy to generate isoparametric lines for the parameter directions u and v respectively. Intersecting these isoparametric lines can obtain the parameter grid.
[0144] (2) Generate contour lines on the parameter domain. According to the parameter grid, start traversing from the outermost layer. Each layer can be connected into a rectangular path until the last layer. If it is an odd number of layers, the last layer degenerates into a parameter line.
[0145] (3) Generate a spiral line on the parameter domain. Start traversing from the outermost layer of the contour line, disconnect the current contour line at the position where it connects with the next layer, and connect it to the next layer. After the traversal is completed, a spiral line can be obtained;
[0146] (4) To ensure the smoothness of the path, an arc transition can be made at the corners;
[0147] (5) Path clipping: the generated parameter path needs to be clipped to retain the path within the outer boundary and eliminate the path within the inner boundary;
[0148] (6) Map the path in the parameter domain to three-dimensional space to obtain the tool contact point path, which is then converted into the tool position point path.
[0149] The contour lines and spiral lines after corner transition are generated on the parameter domain of a parametric surface. The parameter grid, the contour lines on the parameter domain, and the spiral lines are shown in Figure 6 shown.
[0150] Figure 7 These are some examples of generating contour paths and spiral paths on the surfaces of some workpiece models to be processed.
[0151] Among the path clipping designed in the above algorithms, the present invention proposes two path clipping algorithms, which can be applied to the clipping of parameter domain paths generated by any algorithm.
[0152] Algorithm 1:
[0153] First, keep the part within the outer boundary. The algorithm flow is as follows:
[0154] (1) For each path point, determine whether it is inside the outer boundary by using the ray method, and assign it a bool value. If the path point is inside the outer boundary, its bool value is true, otherwise it is false;
[0155] (2) Create an empty total path. For each path, traverse the points on it and determine its bool value. If it is false, skip it until the first point with a bool value of true is encountered. Create an empty path temp. Calculate the intersection of the line segment formed by the point and the previous point with the outer boundary. Add it and the point to path temp. Continue traversing. If a point with a bool value of true is encountered, add it to path temp. Until a point with a bool value of false is encountered, calculate the intersection of the line segment formed by the point and the previous point with the outer boundary. Add it to the end of path temp. Add path temp to the total path and set path temp to an empty value. Repeat this process to obtain the total path, that is, multiple paths clipped by the outer boundary path.
[0156] After obtaining the path within the outer boundary, the part within the inner boundary is removed. The algorithm flow is as follows:
[0157] (1) For each path point, use the ray method to determine whether it is inside the inner boundary and assign it a bool value with an initial value of false. Traverse the inner boundaries. If the path point is inside a certain inner boundary, its bool value is true and the number of the inner boundary where the path point is located is recorded.
[0158] (2) Create an empty total path. For each path, traverse the points on it and determine its bool value. If it is true, skip it until the first point with a bool value of false is encountered. Create an empty path temp. Calculate the intersection of the line segment formed by the point and the previous point with the inner boundary of the corresponding number. Add it and the point to path temp. Continue traversing. If a point with a bool value of false is encountered, add it to path temp. Until a point with a bool value of true is encountered, calculate the intersection of the line segment formed by the point and the previous point with the inner boundary of the corresponding number. Add it to the end of path temp. Add path temp to the total path and set path temp to an empty value. Repeat this process to obtain the total path, that is, multiple paths clipped by the inner boundary path.
[0159] Algorithm 1 can cope with most situations, but for relatively flat surfaces, the path obtained by the equal parameter method is almost a straight line, which is manifested in the parameter domain as adjacent path points on a path being far apart and may cross the inner boundary or even the outer boundary. In this case, Algorithm 1 will fail. To address this situation, the present invention proposes Algorithm 2.
[0160] Algorithm 2:
[0161] (1) Calculate the intersection points of each path with the inner and outer boundaries, insert these intersection points into the original path, and record their indexes;
[0162] (2) Because the path runs through the inner and outer boundaries, there will always be an even number of intersections (considering repeated intersections, that is, intersections that are vertices of polygons). The paths between the two intersections are retained in the order of the paths. If there are two repeated intersections with no path between them, they are ignored.
[0163] Algorithm 2 is relatively simple, but because it needs to frequently calculate intersection points, it takes more time than Algorithm 1 under the same circumstances. Considering that Algorithm 2 only needs to deal with situations with fewer path points, the extra time spent can be ignored.
[0164] 4. Collision Detection Z-buffer Algorithm
[0165] In order to ensure the safety of actual processing, unnecessary collisions of the tool during the processing should be avoided. When a three-axis machine tool is used for processing, the tool may collide with the model when processing along the tool path in a certain tool axis direction. To avoid this situation, the generated tool path should be processed and some paths in the collision area should be cut off. The present invention introduces the idea of the Z-buffer algorithm in computer graphics to delete the path points. The Z-buffer algorithm is mainly used to solve the visibility problem in real-time rendering, that is, to determine which pixels should be displayed in the final rendered image. The basic idea is to compare the geometry in the scene with a depth buffer (also called Z buffer) corresponding to the screen pixels to determine the frontmost pixel. In layman's terms, the Z-buffer algorithm determines which objects are in front of other objects, and then only draws the frontmost objects and hides the obscured parts. Similarly, when machining in a certain tool axis direction, with the tool as the main perspective, when "looking" at the model to be machined and the tool path along the tool axis direction, part of the tool path will be blocked by the model. When machining along this part of the path, it is necessary to pass through the model, which is not allowed. Therefore, according to the idea of Z-buffer, only the path that can be "seen" can be displayed. When it is applied to collision detection of tool position points, the specific process is as follows:
[0166] 1. Construct the projection plane: According to the boundary information of the model, at a certain distance from the model (in the opposite direction of the tool axis), construct a projection plane perpendicular to the tool axis direction, such as Figure 8As shown;
[0167] 2. Construct a distance image: Select the range size of the model projection on the plane to generate an image. Given an image with 1024×1024 pixels, for each pixel cell, calculate the distance between all points on the model projected into the cell and the image, and store the minimum distance;
[0168] 3. For each tool position in the path, calculate the local spatial point where the tool may contact the surface based on the tool's geometric model:
[0169] like Fig. 9 As shown in the figure, for ball-end cutters, space points are evenly selected on the ball-end surface; for flat-bottom cutters, space points are evenly selected on the circular surface of the bottom surface; for end mills with rounded tips, space points are evenly selected on the circle with the larger radius and the circular surface of the bottom surface;
[0170] 4. For each spatial point given by the tool position point, calculate its distance to the projection plane and the corresponding cell on the image. If these distances are not less than the storage value of the cell, it is considered that the tool position point has no collision, otherwise the tool position point has a collision.
[0171] 5. Delete all tool positions where collision occurs, and the remaining output is the path.
[0172] Fig.10 The result of path reduction using the Z-buffer algorithm is shown, where the tool axis direction is the Z axis direction, which is the blue axis in the figure.
[0173] 5. MST-based multi-topology connection algorithm
[0174] In order to connect all the spirals, the algorithm can use the MST-based multi-topology connection algorithm to connect all the paths of the spirals generated by the spiral algorithm and the remaining ZigZag topology paths, thereby reducing the number of retractions. The algorithm flow is as follows:
[0175] (1) Treat each spiral or ZigZag path as a point and construct a fully connected graph. The weight of the edge is determined by the geodesic distance between the corresponding paths of the two points.
[0176] (2) For the graph structure constructed in (1), calculate its minimum spanning tree T: sort each edge in the graph by weight, and each time take the edge with the smallest weight and whose two vertices are not in the same set from the edge set and add it to the spanning tree. Repeat this process until all nodes are successfully connected;
[0177] (3) For the tree structure T calculated in (2), use the breadth-first search method to start from a vertex in the graph and search for adjacent vertices that have not been visited. Visit as many vertices as found, and then start from each of these vertices to continue searching for adjacent vertices that have not been visited, and calculate a traversal path.
[0178] (4) According to the traversal path order of tree T, connect all paths, such as Fig.11 shown.
[0179] Among them, the basic theory of the minimum spanning tree (MST) is as follows:
[0180] The minimum spanning tree is a concept in graph theory. First, define the spanning tree: for a connected graph G containing n points, its spanning tree refers to a very small connected subgraph of G, which contains all the vertices of G and has only (n-1) edges that constitute a tree. For a weighted graph, the one with the smallest sum of edge weights among all its spanning trees is called the minimum spanning tree of the graph. The Kruskal algorithm is often used to obtain the minimum spanning tree of a graph, and its algorithm process is:
[0181] (1) Take the empty set A;
[0182] (2) Sort the edge set excluding A;
[0183] (3) Select the edge with the minimum weight, and if it does not form a cycle with A, add it to A;
[0184] (4) Repeat (2)-(3) until there are (n-1) edges in A;
[0185] (5) The minimum spanning tree of the graph formed by the edges and vertices in A.
[0186] Finally, after cutting along a certain section of the tool path, it is necessary to lift the tool. If it is directly translated to the endpoint of the next tool path, it may pass through the model, causing a collision. The usual practice is to first lift the tool to a safe plane, quickly translate it on the safe plane to the top of the next tool path endpoint, and then drop the tool for processing. In order to improve the steep and shallow finishing process, the present invention incorporates both the Z-buffer algorithm and the tool lift. Fig.12 Taking a model as an example, the entire model is selected to show the results of the improved steep and shallow finishing. The red line is the tool path, the blue dotted line is the tool lift line, the black dotted line is the tool drop line, and the green line is the tool rapid movement line on the safety plane.
[0187] The present invention also provides a control device, including a memory, a processor, and a program stored in the memory, wherein when the processor executes the program, the steep and shallow finishing method based on regional integration as described above is implemented.
[0188] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for steep and shallow finishing based on regional integration, characterized in that: The following steps are involved: S1, constructing a model of the workpiece to be processed, and using a contour surface demarcation algorithm to determine the steep and shallow types, and dividing the surface of the model to be processed into a steep area and a shallow area based on the demarcation angle; S2, for steep areas, adopt the contour finishing algorithm for path planning, generate contour surfaces parallel to the XY plane with equal steps for the specified downcut step, and generate steep processing paths based on the intersection of the contour surfaces and the steep areas; S3, for the shallow area, firstly, the surface of the model to be processed is reparameterized using the heat conduction method, and then the parallel, contour or spiral processing path is generated using the isoparametric method to obtain the shallow processing path; S4, processing the workpiece based on the steep processing path and the shallow processing path.
2. The method for steep and shallow finishing based on regional integration according to claim 1, characterized in that: In S1, the use of the contour boundary algorithm to determine the steep and shallow types, and based on the boundary angle, the to-be-processed area of the to-be-processed model is divided into a steep area and a shallow area, and the specific steps are as follows: S101, cross-cutting: selecting a set of equal-height surfaces parallel to the XY plane, and cutting the surface of the model to be processed into a number of surface areas; S102, longitudinal sectioning: for each curved surface area generated by the transverse sectioning, longitudinal sections perpendicular to the XY plane are uniformly selected at equal angles to divide each curved surface area into a number of sub-areas, and two intersection lines formed by the longitudinal section and the curved surface in each sub-area are recorded; S103, for each sub-area and its two intersection lines, calculate the angle between each intersection line and the z-axis, and calculate the remaining angle, and compare whether the minimum value of the two remaining angles is less than a given boundary angle. If so, it is determined to be a shallow area, otherwise it is determined to be a steep area; S104, using S103 to classify and judge each sub-region generated by the transverse cutting and the longitudinal cutting in turn; S105, using Boolean operations to merge the sub-regions according to the two types of steep and shallow, to obtain merged steep regions and shallow regions.
3. The method for steep and shallow finishing based on regional integration according to claim 1, characterized in that: In S2, for steep areas, a contour finishing algorithm is used for path planning. The specific steps are as follows: S201, according to the input steep area, calculating the z height range of the steep area, finding the upper limit and lower limit of the z value as the generation range of the contour surface, wherein the z height is the height along the z axis; S202, according to the given step down distance and the maximum step down distance, determine the height interval and the residual height, starting from the lower limit of the z height range, calculate the height that the current contour surface and the next adjacent contour surface need to be raised according to the residual height, and the height cannot exceed the maximum step down distance; S203, generating contour surfaces one by one according to the height interval and the z-height range of the steep area, and generating a steep processing path based on the intersection lines of the contour surfaces and the steep area; wherein the steep processing path also includes the intersection lines of the variable contour surfaces calculated according to the residual height and the steep area.
4. The method for steep and shallow finishing based on regional integration according to claim 3, characterized in that: The S2 also includes, for the steep area, using a spiral line generation algorithm to classify all the intersection lines intercepted by the contour surface into adjacent groups of contour lines, and in each group of contour lines, connecting adjacent closed paths into spiral lines to generate a spiral steep processing path. The specific steps are as follows: (1) Input steep processing path; (2) Determine each path one by one to determine whether the current path and its adjacent paths are both closed. If they are both closed, proceed to (3). Otherwise, the current path does not need to be connected by a spiral line, and the next path is set as the current path. (3) For the closed current path and its adjacent paths, adaptively select connection points based on their geometric properties so that the current path and its adjacent paths can be smoothly connected through the connection points; (4) disconnect the closed current path from its adjacent path from the connection point, connect them into a spiral line, merge them into one path, and regard it as a closed path; (5) Repeat (2)-(4) until all paths are judged to be complete.
5. The method for steep and shallow finishing based on regional integration according to claim 1, characterized in that: In S3, for the shallow area, the surface is reparameterized using the heat conduction method. The specific steps are as follows: (1) First, a metric is constructed. A tensor matrix is calculated based on the surface geometry information of the model to be processed. A new metric is constructed based on this matrix. In the new metric, the distance between two points on the surface is considered to be the number of tool widths under a given residual height. The meaning is: if the distance between two points is 1 under the new metric, then the positions of the two points on the surface are exactly the line spacing; (2) Calculate the heat transfer function. According to the Varadhan equation, the distance from point p to point p0 at time t is: According to the heat transfer equation: and given boundary conditions, calculate the heat transfer function h, during which all distances and angles are calculated using the metrics established in (1); (3) Calculate the unit vector field based on the heat transfer function: (4) Use the least squares method to calculate the value function g: (5) Reparameterize the surface using the value function.
6. The method for steep and shallow finishing based on regional integration according to claim 1, characterized in that: In S3, the equal parameter method is used to generate a parallel processing path to obtain a shallow processing path, which specifically includes: (1) Extract the inner and outer boundaries of the surface of the model to be processed and map them to the parameter domain, and obtain the rectangular bounding box of the outer boundary on the parameter domain [u min ,u max ]×[v min ,v max ]; (2) Select the initial path on the parameter domain and sample uniformly. If the input parameter direction is u, then v = v min is the initial parameter path, otherwise u=u min is the initial parameter path. Taking the u parameter direction as an example, n points (u i ,v min )(i=0,1,...,n-1), where (3) Calculate the next parameter path, assuming that the current parameter path is v = v i , sample it uniformly, and for each sampling point (u i ,v i ), calculate its parametric line u=u according to the residual height constraint i The offset point on the parameter domain is calculated, and the offset distance of all sampling points on the parameter domain is taken, and the minimum distance is set as d min , then the next parameter path is v=v i +d min ; (4) Repeat the process of (3) until the boundary of the rectangular bounding box is reached and the parameter path is generated; (5) performing path clipping, clipping the generated parameter path to retain the path within the outer boundary and remove the path within the inner boundary; (6) Map the path in the parameter domain to three-dimensional space to obtain the tool contact point path, which is then converted into the tool position point path.
7. The method for steep and shallow finishing based on regional integration according to claim 6, characterized in that: In S3, an isoparametric method is used to generate a contour or spiral machining path to obtain a shallow shoal machining path, which specifically includes: (1) Obtaining the parameter grid: First, use the parallel machining path generation method to generate isoparametric lines for the parameter directions u and v respectively, and then intersect these isoparametric lines to obtain the parameter grid; (2) Generate contour lines on the parameter domain. According to the parameter grid, start from the outermost layer and traverse each layer to form a rectangular path until the last layer. If there are an odd number of layers, the last layer degenerates into a parameter line. (3) Generate a spiral line on the parameter domain, start traversing from the outermost layer of the contour line, disconnect the current contour line at the position where it connects with the next layer, and connect it to the next layer. After the traversal is completed, a spiral line can be obtained; (4) Make arc transitions at corners to ensure the smoothness of the path; (5) performing path clipping, clipping the generated parameter path to retain the path within the outer boundary and remove the path within the inner boundary; (6) Map the path in the parameter domain to three-dimensional space to obtain the tool contact point path, which is then converted into the tool position point path.
8. The method for steep and shallow finishing based on regional integration according to claim 6 or 7, characterized in that: The path clipping is to clip the generated parameter path to retain the path within the outer boundary and remove the path within the inner boundary, specifically including: Algorithm 1 is used for path clipping. The specific steps are as follows: First, keep the part within the outer boundary. The algorithm flow is as follows: (1) For each path point, determine whether it is inside the outer boundary by using the ray method, and assign it a bool value. If the path point is inside the outer boundary, its bool value is true, otherwise it is false; (2) Create an empty total path. For each path, traverse the points on it and determine its bool value. If it is false, skip it until the first point with a bool value of true is encountered. Create an empty path temp. Calculate the intersection of the line segment formed by the point and the previous point with the outer boundary. Add it and the point to path temp. Continue traversing. If a point with a bool value of true is encountered, add it to path temp. Until a point with a bool value of false is encountered, calculate the intersection of the line segment formed by the point and the previous point with the outer boundary. Add it to the end of path temp. Add path temp to the total path and set path temp to an empty value. Repeat this process to obtain the total path, that is, multiple paths clipped by the outer boundary path. Then, after obtaining the path within the outer boundary, the part within the inner boundary is removed. The algorithm flow is as follows: (1) For each path point, use the ray method to determine whether it is inside the inner boundary and assign it a bool value with an initial value of false. Traverse the inner boundaries. If the path point is inside a certain inner boundary, its bool value is true and the number of the inner boundary where the path point is located is recorded. (2) Create an empty total path. For each path, traverse the points on it and determine its bool value. If it is true, skip it until the first point with a bool value of false is encountered. Create an empty path temp. Calculate the intersection of the line segment formed by the point and the previous point with the inner boundary of the corresponding number. Add it and the point to path temp. Continue traversing. If a point with a bool value of false is encountered, add it to path temp. Until a point with a bool value of true is encountered, calculate the intersection of the line segment formed by the point and the previous point with the inner boundary of the corresponding number. Add it to the end of path temp. Add path temp to the total path and set path temp to an empty value. Repeat this process to obtain the total path, that is, multiple paths clipped by the inner boundary path. Algorithm 2 is used for path clipping. The specific steps are as follows: (1) Calculate the intersection points of each path with the inner and outer boundaries, insert these intersection points into the original path, and record their indexes; (2) Because the path runs through the inner and outer boundaries, there will always be an even number of intersections. The paths between the two intersections are retained in order of the paths. If there are two repeated intersections with no path between them, they are ignored.
9. The method for steep and shallow finishing based on regional integration according to claim 1, characterized in that: The processing method further includes performing collision detection on the steep processing path and the shallow processing path based on the Z-buffer algorithm and deleting the tool position points where the collision occurs. The specific steps are as follows: (1) Constructing a projection plane: Based on the boundary information of the model to be processed, a projection plane perpendicular to the tool axis direction is constructed at a certain distance from the model to be processed, in the opposite direction of the tool axis direction. (2) Constructing a distance image: Select the range size of the projection of the model to be processed on the projection plane to generate an image. Given that the image has 1024 × 1024 pixels, for each pixel cell, calculate the distance between all points on the model to be processed that fall within the cell and the image, and store the minimum distance. (3) For each tool position point in the steep machining path and the shallow machining path, the local spatial point where the tool may contact the surface is calculated based on the tool geometric model; (4) For each spatial point given by the tool position point, calculate its distance to the projection plane and the corresponding cell on the image. If these distances are not less than the storage value of the cell, it is considered that the tool position point has no collision, otherwise the tool position point has a collision; (5) Delete all tool positions where collision occurs, and the remaining output is the path.
10. The method for steep and shallow finishing based on regional integration according to claim 1, characterized in that: The processing method also includes connecting all the paths of the spiral lines in the steep processing path and the shallow processing path and the ZigZag topological paths of the rest using a multi-topological connection algorithm based on MST, and the specific steps are as follows: (1) Treat each spiral or ZigZag path as a point and construct a fully connected graph. The weight of the edge is determined by the geodesic distance between the corresponding paths of the two points. (2) For the graph structure constructed in (1), calculate its minimum spanning tree T: sort each edge in the graph according to its weight, and each time take the edge with the smallest weight and whose two vertices are not in the same set from the edge set and add it to the spanning tree, and repeat this process until all nodes are successfully connected; (3) For the tree structure T calculated in (2), use the breadth-first search method to start from a vertex in the graph and search for adjacent vertices that have not been visited. Visit as many vertices as found, and then start from each of these vertices to continue searching for adjacent vertices that have not been visited, and calculate a traversal path. (4) Connect all paths according to the traversal path order of the tree structure T.
Citation Information
Cited By
Machining method and device of eagle beak structure mold and electronic equipment
CN121424134A