Model optimization method and system for polishing processing path planning
By constructing a standardized topological data structure and automating geometric processing, the problems of low model preprocessing efficiency and unstable results in existing technologies are solved, achieving efficient and stable polishing path planning and generating high-quality three-dimensional geometric models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, model preprocessing relies on manual operation, which is inefficient, produces unstable results, lacks overall optimization capabilities for the processing technology, and is difficult to meet the high requirements of polishing for surface continuity and smoothness, leading to recognition errors or even processing failures in CAM system path planning.
By constructing a standardized topological data structure, contours and axes are automatically classified based on endpoint distance and tolerance threshold. Repeated edge geometry is identified and trimmed, non-processed areas are eliminated, and the model is reconstructed into a three-dimensional geometric model, which is then rendered and verified.
It achieves fully automated processing from two-dimensional boundary curves to three-dimensional geometric models, improving processing efficiency and result consistency, ensuring model continuity and topological consistency, generating stable toolpaths, avoiding invalid machining areas, and improving machining quality and efficiency.
Smart Images

Figure CN121859541A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided manufacturing system model processing technology, and in particular to a model optimization method and system for polishing process path planning. It is primarily applied to part polishing processing tasks, and is especially suitable for processing parts with rotational characteristics, such as thermos bottles. Background Technology
[0002] In the actual production process of parts polishing, the prerequisite for the Computer-Aided Manufacturing System (CAM) to perform toolpath planning is to obtain a valid geometric model input. Typically, a two-dimensional geometric model is used as the initial data, which is then processed and optimized to generate a three-dimensional geometric model. Toolpath planning is then completed based on this three-dimensional model, ultimately achieving automated polishing of the parts. However, due to the diversity of design platforms in industrial production, the complexity of data exchange formats, and the compatibility differences between different modeling software, the two-dimensional geometric models input into the CAM system generally have many quality problems, specifically manifested as data duplication, boundary confusion, contour redundancy, and inconsistent geometric topology. These defects directly lead to model recognition errors during path planning in the CAM system, and in severe cases, can even cause machining interruptions or failures, affecting production efficiency and product quality.
[0003] To address the aforementioned model quality issues, the commonly used solution in existing technologies is to rely on manual preprocessing and correction of CAD models. Specific operations include manually removing redundant geometry, reconstructing fracture boundaries, repairing defective surfaces, adjusting layer attributes, and deleting redundant line segments. In some scenarios, auxiliary tools are also used for curve fitting, smoothing, and simplification. Meanwhile, while mainstream CAD / CAM software integrates some geometric repair functions, these functions are mostly limited to basic boundary closure checks and duplicate entity deletion, and are not specifically designed for the specific needs of manufacturing processes.
[0004] However, existing model preprocessing methods still have significant shortcomings and are difficult to meet the precision manufacturing requirements of polishing: First, they are highly dependent on manual operation. For complex curved surfaces or large-scale part models, manual inspection and repair are time-consuming, labor-intensive, and extremely inefficient, failing to meet the capacity requirements of large-scale, automated manufacturing scenarios. Second, the repair results are greatly affected by the operator's experience and subjective judgment. Different operators have different repair strategies and detail processing standards, resulting in poor consistency of the preprocessed model, which in turn affects the stability and repeatability of subsequent toolpath planning, and may ultimately lead to inconsistent product processing quality. Third, the geometric repair functions of existing CAD / CAM software lack the overall optimization capability for processing technology requirements. They can only solve some basic geometric defects and cannot systematically optimize the model from the perspective of processing technology adaptability. Fourth, polishing requires extremely high continuity and smoothness of curved surfaces, but existing methods are weak in automatically detecting and correcting key defects such as surface splicing errors, inconsistent topology, and boundary breaks, often leading to unstable toolpaths and even processing failures.
[0005] In summary, existing model preprocessing methods have significant shortcomings in terms of processing efficiency, result stability, and intelligence, failing to meet the requirements of high-quality geometric models for polishing path planning. There is an urgent need for an automated model optimization method that can meet the actual processing requirements, replace traditional manual repair methods, improve the reliability of the processing model and the accuracy of path planning, and ensure the smooth progress of polishing. Summary of the Invention
[0006] To address this, embodiments of the present invention provide a model optimization method and system for polishing process path planning, which solves the problems in the prior art where model preprocessing relies on manual operation, is inefficient, produces unstable results, lacks overall optimization capabilities for the processing technology, and is insufficient in automatically detecting and correcting surface splicing errors and topological inconsistencies, making it difficult to meet the high requirements of polishing for surface continuity and smoothness, thus leading to identification errors or even processing failures in CAM system path planning.
[0007] To address the aforementioned technical problems, embodiments of the present invention provide a model optimization method for polishing process path planning, the method comprising the following steps: Obtain the input set of two-dimensional boundary curves and establish a normalized topological data structure containing a set of vertices and a set of topological edges; Based on the endpoint distance of each edge in the topological edge set and the preset tolerance threshold, each edge is geometrically classified as a contour or an axis. The contour edges obtained from the classification are detected, and the repeated edge geometry is identified and clipped. Based on the spatial relationship between the trimmed contour edge and the axis, non-processable areas are eliminated, and processable contours are extracted. The processable contour is reconstructed into a three-dimensional geometric model, and the three-dimensional model is rendered and visualized for verification.
[0008] Preferably, the process of obtaining the input set of two-dimensional boundary curves and establishing a normalized topological data structure containing a set of vertices and a set of topological edges specifically includes: Obtain a set of two-dimensional boundary curves exported from a CAD system or generated from a point set; Collect the endpoints of all curves to form an initial vertex candidate set, and merge the endpoints whose distance is less than the vertex tolerance under the set vertex tolerance to obtain the final vertex set; Based on the vertex set, the curves are paired with endpoints to construct a topological edge set. Each edge records its start point, end point, and corresponding geometric curve expression. Based on the set of vertices and the set of topological edges, a vertex-edge adjacency matrix is established to characterize the topological relationships, and a topological data structure containing vertex coordinates, edge endpoint indices, and geometric curve expressions is output.
[0009] Preferably, in the vertex-edge adjacency matrix, the elements are assigned values of -1, +1, or 0 depending on whether the vertex is the start or end point of the corresponding edge. The vertex-edge adjacency matrix is represented as follows: Its elements are defined as: ; in, Represents the vertex-edge adjacency matrix; express It is a real matrix, it has lines and List, This represents the total number of vertices in the model. This represents the total number of edges in the model; Represents the vertex-edge adjacency matrix The middle is located in the first line, number Column elements; Indicates the first One vertex; Indicates the first Edge; Representing an edge The starting point; Representing an edge The end point.
[0010] Preferably, the process of geometrically classifying each edge into a contour or axis based on the endpoint distance of each edge in the topological edge set and a preset tolerance threshold specifically includes: Iterate through all edges in the topological edge set; Determine whether the distance between the start and end points of each edge is less than the tolerance threshold; If it is less than, then the edge is determined to be part of the closed contour and is included in the contour container; Otherwise, determine that the edge is part of the axis and classify it into the axis container.
[0011] Preferably, the process of detecting, identifying, and trimming the repeated edge geometry of the classified contour edges specifically includes: Perform a parametric interval scan on the edges in the contour container to find potential geometrically overlapping intervals; Calculate the geometric distance between corresponding points on the two sides in the overlapping interval; If the maximum value of the geometric distance is less than the set geometric tolerance, then the interval is determined to be a repeating edge interval; Based on all identified duplicate edge intervals, the redundant edge geometry is trimmed. The remaining edges after trimming are connected in topological order to form continuous and unique contour data.
[0012] Preferably, the condition for determining the repeated edges is: the two edges are geometrically present on a specific parameter sub-interval, and there is a monotonic mapping within that interval, such that the geometric distance between the mapping point pairs never exceeds the geometric tolerance.
[0013] Preferably, the process of eliminating non-processable areas and extracting processable contours based on the spatial relationship between the trimmed contour edges and the axis specifically includes: Traverse the cropped outline edges; Project each vertex of an edge vertically onto the axis, and determine whether the edge is connected to the axis based on the distance between the projection point and the vertex. The edges connected to the axis are divided into top edges and bottom edges, and marked as edges to be removed; Traverse the remaining contour edges. If a vertex of one edge is higher than the vertex of the other edge connected to it, mark that edge as an edge to be removed. Delete all edges marked as to be removed, and connect the remaining edges to form at least two sets of wireframe geometry; Compare the relative positions of each wireframe geometry to the axis, and select the wireframe geometry located on one side of the axis as the final machinable profile.
[0014] Preferably, "located on one side of the axis" specifically means "located on the right side of the axis".
[0015] Preferably, the process of reconstructing the machinable contour into a three-dimensional geometric model specifically includes: Based on the rotation surface generation algorithm, a two-dimensional machinable contour is rotated around the axis to generate a complete three-dimensional model.
[0016] This invention also provides a model optimization system for polishing path planning. This system implements the aforementioned model optimization method for polishing path planning, specifically including: The input module is used to obtain the set of input two-dimensional boundary curves and establish a normalized topological data structure containing a set of vertices and a set of topological edges. The axis and contour extraction module is used to geometrically classify each edge as a contour or axis based on the endpoint distance of each edge in the topological edge set and a preset tolerance threshold. The contour deduplication module is used to detect the contour edges obtained from classification, identify and trim duplicate edge geometry; The machinable contour extraction module is used to extract the machinable contour by eliminating non-machinable areas based on the spatial positional relationship between the trimmed contour edge and the axis. The 3D reconstruction and rendering module is used to reconstruct the machinable contour into a 3D geometric model, and to render and visualize the 3D model.
[0017] As can be seen from the above technical solutions, this invention application has the following beneficial effects: (1) This invention achieves a complete automated process from data import, axis contour separation to repeated edge trimming by constructing a standardized topological data structure (including vertex merging and establishing a vertex-edge adjacency matrix) and a tolerance-based automatic classification rule. This completely changes the traditional method of manually repairing models in CAD software. Its advantages are: First, automated processing avoids time-consuming and laborious manual operations, especially suitable for complex curved surfaces and large-scale part models, and the processing efficiency is improved by orders of magnitude; Second, the standardized processing flow has good compatibility with the source and format of input data (such as DXF wireframes and point cloud contour generation), effectively solving the problem of cross-platform and multi-format data import, and enhancing the universality and practicality of the method.
[0018] (2) This invention ensures the inherent quality of the optimized model through precise geometric algorithms. On the one hand, in the contour deduplication step, a duplicate edge detection and trimming algorithm based on parameter range and geometric tolerance is adopted, which can accurately identify and eliminate redundant data with geometric overlap, ensuring the uniqueness of contour data and fundamentally avoiding toolpath oscillation or repeated cutting caused by duplicate geometry. On the other hand, the entire process always maintains and explicitly manages the topological connection relationship between vertices and edges (through the adjacency matrix), and reorders and connects the remaining edges after deduplication and removal, ensuring the continuity and topological consistency of the final machinable contour. This lays a reliable geometric foundation for the subsequent CAM system to generate stable, smooth, and abnormal toolpaths.
[0019] (3) This invention goes beyond general geometric repair and further integrates intelligent judgment logic for polishing processes. In the process of extracting the machinable contour, the algorithm automatically identifies and eliminates non-machinable areas such as the top and bottom based on the spatial positional relationship between the contour edge and the axis (such as vertical projection and relative height comparison). The direct benefit of this is that the generated toolpath can be fully focused on the effective curved surface area of the part that actually needs to be polished, completely avoiding the generation of invalid empty toolpaths in non-machinable areas, thereby shortening the processing time and improving equipment utilization. At the same time, the clean and continuous machinable contour obtained is more conducive to generating a smooth tool path, which is crucial for ensuring the uniformity and high quality of the polished surface. Finally, through automated 3D reconstruction and rendering verification, a closed loop is formed from the problem model to a high-quality 3D model that can be directly used for programming, further ensuring the reliability of the final processing result. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Referring to the drawings will make the features and advantages of the present invention clearer. The drawings are illustrative and should not be construed as limiting the present invention in any way. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart of a model optimization method for polishing process path planning provided by the present invention; Figure 2 This is a schematic diagram illustrating the principle of model axis and complete contour extraction in this invention. Figure 3 This is a flowchart of the model axis and complete contour extraction process in this invention; Figure 4 This is a schematic diagram of model contour deduplication in this invention, where (a) is the unprocessed model and (b) is the processed model; Figure 5 This is a flowchart of the processable contour extraction in this invention; Figure 6 This is a schematic diagram of the processable contour extracted in this invention; Figure 7 This is a block diagram of a model optimization system for polishing process path planning provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1: To address the problems in existing technologies where model preprocessing relies on manual operation, resulting in low efficiency, unstable results, lack of overall optimization capabilities for machining processes, and insufficient ability to automatically detect and correct surface splicing errors and topological inconsistencies, making it difficult to meet the high requirements of polishing for surface continuity and smoothness, and consequently leading to identification errors or even machining failures in CAM system path planning, such as... Figure 1 As shown, this invention proposes a model optimization method for polishing process path planning, which includes the following steps: S1: Obtain the input set of two-dimensional boundary curves and establish a normalized topological data structure containing a set of vertices and a set of topological edges; S2: Based on the endpoint distance of each edge in the topological edge set and the preset tolerance threshold, the geometry of each edge is classified as either a contour or an axis. S3: Detect the contour edges obtained from the classification, identify and trim the repeated edge geometry; S4: Based on the spatial relationship between the trimmed contour edge and the axis, eliminate non-processable areas and extract processable contours; S5: Reconstruct the machinable contour into a 3D geometric model, and render and visualize the 3D model for verification.
[0023] As can be seen from the above technical solution, this invention proposes a model optimization method for polishing path planning. First, by acquiring the input set of two-dimensional boundary curves and establishing a standardized topological data structure containing vertex and edge sets, it achieves high compatibility and unified expression of cross-platform, multi-format geometric data. Next, based on endpoint distance and a preset tolerance threshold, each edge is automatically classified into contours or axes, enabling rapid and accurate separation of key geometric elements of the model. Then, redundant geometry detection and intelligent trimming are performed on the contour edges, effectively eliminating redundant data and ensuring the uniqueness and continuity of the contours. Furthermore, based on the spatial relationship between contour edges and axes, non-machinable areas are automatically identified and eliminated, accurately extracting machinable contours that meet the actual polishing process requirements. Finally, the machinable contours are reconstructed into a three-dimensional geometric model and rendered for verification, thus providing the CAM system with a clean, stable, and high-quality three-dimensional model input that can be directly used for toolpath generation. This method achieves fully automated and intelligent processing from the problem model to the machinable model, significantly improving preprocessing efficiency, result consistency, and process fit.
[0024] This embodiment uses a two-dimensional DXF wireframe model of the outer contour of a thermos bottle exported from a CAD system as the processing object to explain in detail the implementation steps of the present invention.
[0025] Step S1: Input Model Import and Topology Data Normalization This step aims to transform diverse and potentially chaotic two-dimensional geometric data into a standardized data structure that can be processed internally. First, the import module reads the input DXF file, parses all types of curves (such as line segments, circular arcs, spline curves, etc.), and forms a set of two-dimensional boundary curves. ,in Represents the first in the set Parametric curves, This represents the total number of curve segments in the set. This represents a two-dimensional real number space. Next, the algorithm collects all... The endpoints of the curves constitute the initial vertex candidate set. ,in Represents the initial vertex candidate set The total number of elements (vertices) in the middle. Represents the first in the set A vertex is a vertex in a two-dimensional real space. A point in the middle has coordinates To address potential minor vertex discrepancies that may exist in the outputs of different software (e.g., the coordinates of what should be the same point have extremely subtle differences), the system sets a vertex merging tolerance. Algorithm traversal Euclidean distance Less than or equal to All points are merged into a single vertex to obtain the final vertex set. ,in Indicates the first One vertex, Represents the final set of vertices The total number of elements (vertices) in the set. Then, based on the merged vertex set, for each curve... Match its starting point and the end point This allows for the construction of topological edges. This forms a set of topological edges. ,in To be with the edge The bound geometric curve expression, Represents the set of topological edges The total number of elements (edges) in the model. To clearly characterize the connectivity relationships within the model, the system establishes a vertex-edge association matrix. Its element definition is as follows: ; In this matrix, -1 indicates that a vertex is the starting point of an edge, +1 indicates that a vertex is the ending point of an edge, and 0 indicates that a vertex is not connected to the edge. Finally, the system outputs a complete topological data structure containing vertex coordinates, edge endpoint indices, and curve expressions.
[0026] This step has the following advantages: Format uniformity and compatibility: By parsing and reconstructing data from different sources, diverse input formats are unified into an internal standard data structure, effectively solving cross-platform and cross-software data compatibility issues.
[0027] Fault tolerance and geometric consistency: Introducing vertex merging tolerance It can automatically repair "breakpoints" or "ghost points" caused by accuracy issues, ensuring the geometric consistency of subsequent topology construction from the source and avoiding topology errors caused by minor errors.
[0028] Explicit topological relationships: By constructing an adjacency matrix, geometric information and topological connectivity are separated and explicitly stored, providing a solid foundation for subsequent automated analysis based on graph theory or connectivity (such as contour search and loop detection), replacing the traditional method of manually visually inspecting connectivity.
[0029] Step S2: Extraction of model axes and complete contour The goal of this step is to automatically separate the intertwined "contour edges" representing the shape of a part and the "axis edges" representing the center of rotation. Its core principle is based on the observation that in two-dimensional engineering drawings, line segments forming a closed contour (such as the outline of a bottle) are usually connected end-to-end, while line segments representing axes (such as center lines) are often independent or have endpoints far from other lines. The system iterates through the set of topological edges obtained in step S1. For each edge Calculate its starting point and the finish line Euclidean distance between Set a contour connectivity tolerance threshold. (usually slightly larger than the vertex merging tolerance) ).like If the two endpoints of the edge are considered to be "close" or coincident in actual geometry, then the edge is part of a closed contour and is stored in the "contour container"; if If the edge is not found to be independent, it is considered independent and stored in the "axis container". This process is as follows: Figure 2 (If the distance between points B and C is less than a preset tolerance threshold, the system determines that these two points "coincide" or are "close enough," and therefore connects line segments AB and CD as part of a continuous closed contour. Conversely, if the distance between points B and C is greater than the threshold, no connection is made.) Figure 3 As shown, the axis and contour can be quickly and automatically separated by simple distance judgment.
[0030] This step has the following advantages: Automated separation: It completely eliminates the need for manual operation in CAD software to distinguish between axes and contours by switching layers on and off or manually selecting them, and realizes automatic identification and classification of key graphic elements, which greatly improves efficiency.
[0031] The algorithm is simple and efficient: it is based solely on the comparison of endpoint distances, has low computational complexity, fast processing speed, and is suitable for large-scale models.
[0032] High robustness: through tolerance threshold It can adapt to different drawing standards and centerline drawing habits (such as whether it precisely passes through the contour points), ensuring the accuracy of extraction.
[0033] Step S3: Deduplication of model outline The original model may contain geometrically overlapping "duplicate edges" due to design repetition, data conversion errors, or other reasons. This step aims to detect and remove this redundant data. Define duplicate edges: For two edges within the contour container... and If there exists a parameter sub-interval , and monotonic mapping This maximizes the geometric distance between all pairs of mapped points within the interval. Not exceeding the set geometric tolerance Then determine and exist Repetition within intervals. During implementation, the system performs pairwise comparisons of all edges within the contour container. First, a rapid spatial bounding box or parameter interval overlap test is performed to filter out potentially repeating edge pairs. Then, precise geometric distance calculations are performed on the potentially repeating edge pairs to identify the specific set of repeating parameter intervals. ,in This represents the parameter range for a pair of repeating edges. Finally, according to... Repeating edges are trimmed (e.g., retaining the complete interval of one edge and removing the repeated interval of another edge), and the remaining edge fragments are reconnected in topological order to form a clean, unique, and continuous contour. The processing result is as follows: Figure 4 As shown.
[0034] This step has the following advantages: Eliminating path interference: Repeated edges can cause confusion in the CAM system when calculating tool contact points, potentially generating overlapping, oscillating, and invalid toolpaths. This step thoroughly eliminates redundant geometry, ensuring the uniqueness of subsequent path planning data.
[0035] Improved model quality and computational efficiency: Reduced unnecessary geometric data, making subsequent contour sorting, offset calculation and other operations faster and more stable.
[0036] Precise parametric processing: It adopts a judgment method based on parameter range and geometric tolerance, which is more accurate than the method based on pixels or rasterization alone, and can handle the coincidence judgment of complex geometries such as spline curves.
[0037] Step S4: Extraction of Machinable Contours Not all contours require machining. Taking the polishing of a rotating body as an example, the top of the bottle neck and the bottom of the bottle are usually unmachined areas (such as support surfaces or interfaces). This step automatically identifies and removes these areas based on geometric relationships, extracting the true "machineable" contours. The specific process is as follows: Figure 5 As shown: Traverse the outline edges after trimming and deduplication.
[0038] For each edge, calculate the perpendicular projection point from each vertex to the axis (assuming it's a perpendicular line). If the distance from a vertex to its projection point is extremely small (less than a set threshold), then the vertex is considered to be on the axis, and the edge is considered an "edge connected to the axis" (e.g., ...). Figure 2 (A and B sides in the diagram).
[0039] These "connected edges" are divided into the top edge and the bottom edge according to their vertical coordinate (Y coordinate), and then placed into the "to be removed container".
[0040] Traverse the remaining contour edges (i.e., the side contour of the bottle body) and check the connection relationship between adjacent edges. If the Y coordinate of the start (or end) of an edge is higher than the Y coordinate of the corresponding endpoint of another edge connected to it, then the edge belongs to the transition area (non-straight wall) of the bottle mouth or bottom, and is also added to the "containers to be rejected".
[0041] Remove all edges from the "to be culled container" from the contour data.
[0042] At this point, the remaining edges may be broken into two parts (left half of the profile and right half of the profile) due to the deletion operation. The system connects them into two sets of wireframe geometry.
[0043] Determine the relative positions of these two sets of wireframes to the axis (e.g., compare the X coordinates of their centroids with the X coordinates of the axis), and select the set of wireframe geometry located to the right of the axis (assuming the machining coordinate system is defined as such) as the final "machinable profile," such as... Figure 6 As shown.
[0044] This step has the following advantages: High process fit: Automatically identifies and rejects non-machined areas, ensuring that the generated tool path is completely focused on the effective surface that needs polishing, avoiding idle tool travel and interference, and directly improving processing efficiency.
[0045] Achieve fully automatic region segmentation: By using logical judgments based on spatial location and connectivity, it replaces the manual operation of selecting processing areas on the graphic, ensuring the objectivity and repeatability of the processing results.
[0046] Provides clean input for toolpath generation: The output "machinable profile" is a continuous, directional two-dimensional curve, which is an ideal input for generating commonly used polishing paths such as spiral toolpaths and contour toolpaths.
[0047] Step S5: 3D Model Reconstruction and Rendering To perform 3D toolpath planning and collision checking in a CAM system, the optimized 2D contour needs to be converted into a 3D model. This step utilizes the properties of solids of revolution, rotating the "machinable contour" (a set of 2D curves) extracted in step S4 around the "axis line" (a straight line) extracted in step S2. A surface of revolution generation algorithm is used, for example, discretizing the contour line into a dense set of points, with each point rotating around the axis to generate a circle; the mesh formed by all these circles constitutes the surface of revolution. For a more precise representation, the analytical surface of the contour curve rotated around the axis can be directly calculated. After generating the 3D model, a graphics rendering module (such as OpenGL) is used to shade, light, and display it, allowing engineers to visually verify and check the correctness and completeness of the optimized model.
[0048] This step has the following advantages: Complete the data chain loop: upgrade the final output of the automated optimization process from two dimensions to three dimensions, meeting the direct requirements of modern CAM systems for three-dimensional model input.
[0049] Providing verification methods: Rendering visualization is an effective way to quickly verify whether the entire optimization process is correct. It can detect possible errors in time and ensure the reliability of the output results.
[0050] Supporting subsequent automation: The generated clean and accurate 3D model can be directly used as input for the CAM system's automatic programming module, driving the generation of stable and efficient polishing toolpaths, ultimately achieving full-process automation from design model to machining code.
[0051] In summary, this embodiment demonstrates, through five consecutive automated steps, how to transform a potentially problematic original 2D wireframe model into a high-quality 3D geometric model suitable for polishing path planning. This method significantly improves the automation level, processing efficiency, and result quality of CAM preprocessing, and has significant industrial application value.
[0052] Example 2: Figure 7 As shown, this invention provides a model optimization system for polishing process path planning. This system is used to implement the model optimization method for polishing process path planning in Embodiment 1 above, specifically including: Input module 100 is used to obtain the input set of two-dimensional boundary curves and establish a normalized topological data structure containing a set of vertices and a set of topological edges; The axis and contour extraction module 200 is used to geometrically classify each edge as a contour or axis based on the endpoint distance of each edge in the topological edge set and a preset tolerance threshold. The contour deduplication module 300 is used to detect the contour edges obtained from the classification, identify and trim the duplicate edge geometry; The machinable contour extraction module 400 is used to extract the machinable contour by eliminating non-machinable areas based on the spatial positional relationship between the trimmed contour edge and the axis. The 3D reconstruction and rendering module 500 is used to reconstruct the machinable contour into a 3D geometric model and to render and visualize the 3D model.
[0053] This embodiment provides a model optimization system for polishing path planning, used to implement the aforementioned model optimization method for polishing path planning. Therefore, the specific implementation of the model optimization system for polishing path planning can be found in the previous section on the embodiments of the model optimization method for polishing path planning. For example, the input module 100, axis and contour extraction module 200, contour deduplication module 300, machinable contour extraction module 400, and 3D reconstruction and rendering module 500 are respectively used to implement steps S1, S2, S3, S4, and S5 in the aforementioned model optimization method for polishing path planning. Therefore, its specific implementation can be referred to the descriptions of the corresponding embodiments. To avoid redundancy, further details are omitted here.
[0054] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0055] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0056] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0057] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A model optimization method for polishing process path planning, characterized in that, Includes the following steps: Obtain the input set of two-dimensional boundary curves and establish a normalized topological data structure containing a set of vertices and a set of topological edges; Based on the endpoint distance of each edge in the topological edge set and the preset tolerance threshold, each edge is geometrically classified as a contour or an axis. The contour edges obtained from the classification are detected, and the repeated edge geometry is identified and clipped. Based on the spatial relationship between the trimmed contour edge and the axis, non-processable areas are eliminated, and processable contours are extracted. The machinable contour is reconstructed into a three-dimensional geometric model, and the three-dimensional model is rendered and visualized for verification.
2. The model optimization method for polishing process path planning according to claim 1, characterized in that, The process of obtaining the input set of two-dimensional boundary curves and establishing a normalized topological data structure containing a set of vertices and a set of topological edges specifically includes: Obtain a set of two-dimensional boundary curves exported from a CAD system or generated from a point set; Collect the endpoints of all curves to form an initial vertex candidate set, and merge the endpoints whose distance is less than the vertex tolerance under the set vertex tolerance to obtain the final vertex set; Based on the vertex set, the curves are paired with endpoints to construct a topological edge set. Each edge records its start point, end point, and corresponding geometric curve expression. Based on the set of vertices and the set of topological edges, a vertex-edge adjacency matrix is established to characterize the topological relationships, and a topological data structure containing vertex coordinates, edge endpoint indices, and geometric curve expressions is output.
3. The model optimization method for polishing process path planning according to claim 2, characterized in that, In the vertex-edge adjacency matrix, each element is assigned a value of -1, +1, or 0 depending on whether the vertex is the start or end point of the corresponding edge. The vertex-edge adjacency matrix is represented as follows: Its elements are defined as: ; in, Represents the vertex-edge adjacency matrix; express It is a real matrix, it has lines and List, This represents the total number of vertices in the model. This represents the total number of edges in the model; Represents the vertex-edge adjacency matrix Located in the middle line, number Column elements; Indicates the first One vertex; Indicates the first Edge; Representing an edge The starting point; Representing an edge The end point.
4. The model optimization method for polishing process path planning according to claim 1, characterized in that, The process of geometrically classifying each edge into a contour or axis based on the endpoint distance of each edge in the topological edge set and a preset tolerance threshold specifically includes: Iterate through all edges in the topological edge set; Determine whether the distance between the start and end points of each edge is less than the tolerance threshold; If it is less than, then the edge is determined to be part of the closed contour and is included in the contour container; Otherwise, determine that the edge is part of the axis and classify it into the axis container.
5. The model optimization method for polishing process path planning according to claim 1, characterized in that, The process of detecting, identifying, and trimming the repeated edge geometry of the classified contour edges specifically includes: Perform a parametric interval scan on the edges in the contour container to find potential geometrically overlapping intervals; Calculate the geometric distance between corresponding points on the two sides in the overlapping interval; If the maximum value of the geometric distance is less than the set geometric tolerance, then the interval is determined to be a repeating edge interval; Based on all identified duplicate edge intervals, the redundant edge geometry is trimmed. The remaining edges after trimming are connected in topological order to form continuous and unique contour data.
6. The model optimization method for polishing process path planning according to claim 5, characterized in that, The condition for determining repeated edges is that the two edges exist geometrically on a specific parameter sub-interval, and there is a monotonic mapping within that interval, such that the geometric distance between the mapping point pairs never exceeds the geometric tolerance.
7. The model optimization method for polishing process path planning according to claim 1, characterized in that, The process of eliminating non-processable areas and extracting processable contours based on the spatial relationship between the trimmed contour edges and the axis specifically includes: Traverse the cropped outline edges; Project each vertex of an edge vertically onto the axis, and determine whether the edge is connected to the axis based on the distance between the projection point and the vertex. The edges connected to the axis are divided into top edges and bottom edges, and marked as edges to be removed; Traverse the remaining contour edges. If a vertex of one edge is higher than the vertex of the other edge connected to it, mark that edge as an edge to be removed. Delete all edges marked as to be removed, and connect the remaining edges to form at least two sets of wireframe geometry; Compare the relative positions of each wireframe geometry to the axis, and select the wireframe geometry located on one side of the axis as the final machinable profile.
8. The model optimization method for polishing process path planning according to claim 7, characterized in that, "Located on one side of the axis" specifically means located on the right side of the axis.
9. The model optimization method for polishing process path planning according to claim 1, characterized in that, The process of reconstructing the machinable contour into a three-dimensional geometric model specifically includes: Based on the rotation surface generation algorithm, a two-dimensional machinable contour is rotated around the axis to generate a complete three-dimensional model.
10. A model optimization system for polishing process path planning, characterized in that, The system is used to implement the model optimization method for polishing process path planning as described in any one of claims 1 to 9, including: The input module is used to obtain the set of input two-dimensional boundary curves and establish a normalized topological data structure containing a set of vertices and a set of topological edges. The axis and contour extraction module is used to geometrically classify each edge as a contour or axis based on the endpoint distance of each edge in the topological edge set and a preset tolerance threshold. The contour deduplication module is used to detect the contour edges obtained from classification, identify and trim duplicate edge geometry; The machinable contour extraction module is used to extract the machinable contour by eliminating non-machinable areas based on the spatial positional relationship between the trimmed contour edge and the axis. The 3D reconstruction and rendering module is used to reconstruct the machinable contour into a 3D geometric model, and to render and visualize the 3D model.