Laser engraving path planning method, system, equipment and medium
By performing cross-sectional cutting, contour reconstruction, and topological relationship construction on the 3D model, combined with the Vatti polygon clipping algorithm and preset filling method, the problem of balancing additive and subtractive manufacturing in laser engraving is solved, and precise and rapid engraving toolpath planning is achieved.
Patent Information
- Application Number
- CN202511272833.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-12-09
AI Technical Summary
Existing technologies are insufficient to fully meet the demands of both additive manufacturing rapid prototyping and subtractive manufacturing complex logics in laser engraving, and cannot satisfy all the requirements of laser engraving.
By acquiring a preset format file of a 3D model, cross-cutting is performed to obtain intersection points and lines. Coordinate information is stored using a quadtree data structure. The Vatti polygon clipping algorithm is used to determine the inclusion relationship of the region segmentation curves, a topological relationship tree is established, regions are divided, and a preset filling method is used to generate carving toolpaths.
It enables precise and rapid division of processing areas on a 3D model and generation of engraving toolpaths, ensuring processing accuracy and efficiency, and is suitable for laser engraving of complex shapes.
Smart Images

Figure CN121093701A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser engraving technology, and more specifically, to a laser engraving path planning method, system, equipment, and medium. Background Technology
[0002] Manufacturing is generally divided into additive manufacturing and subtractive manufacturing. Additive manufacturing employs a layered stacking strategy, progressively adding material to each layer of the model along a planned toolpath. Subtractive manufacturing, on the other hand, is based on a parametric CAD model, following two steps: roughing and finishing. It plans the machining path based on the model drawings and the geometry of the cutting tools, removing material to complete the manufacturing process. Laser engraving belongs to subtractive manufacturing. It utilizes the thermal effect of a laser on the workpiece for engraving. The characteristics of laser engraving dictate that its toolpath planning algorithm must possess both the rapid prototyping capabilities of additive manufacturing and the complex logic expression requirements of subtractive manufacturing. Currently, neither additive nor subtractive manufacturing, when applied to laser engraving scenarios, can fully accommodate all these requirements and cannot meet all the demands of laser engraving. Summary of the Invention
[0003] In view of this, the purpose of this invention is to overcome the shortcomings of the prior art and provide a laser engraving path planning method, system, device, and medium. This invention provides the following technical solution: In a first aspect, the present invention provides a laser engraving path planning method, the method comprising: Obtain a preset format file, the preset format file including: a three-dimensional model of the part to be processed; The three-dimensional model is cross-cut to obtain multiple intersection points and multiple intersection lines; Based on the intersection points and intersection lines, the contour of the three-dimensional model is reconstructed to obtain at least one closed region segmentation curve; Based on the region segmentation curves, the Vatti polygon clipping algorithm is used to determine the inclusion relationship between the region segmentation curves. Based on the inclusion relationships between the segmentation curves of each region, a topological relationship tree is established; Based on the aforementioned topological relationship tree, regions are divided to obtain multiple different processing regions; For each of the processing areas, a preset filling method is used to generate the corresponding engraving toolpath.
[0004] In an optional implementation, the three-dimensional model is a three-dimensional mesh surface model, which is composed of multiple triangular faces. The step of cross-cutting the three-dimensional model to obtain multiple intersection points and lines includes: The three-dimensional model is cross-cut using a preset cross-section to obtain multiple intersection points and lines. Each intersection point is the intersection of the preset cross-section with each of the triangular faces, and each line of intersection is the intersection of the preset cross-section with each of the triangular faces.
[0005] In an optional implementation, before reconstructing the contour of the 3D model based on each of the intersection points and each of the intersection lines, the method further includes: Obtain the coordinate information of each intersection point and each intersection line, and store the coordinate information of each intersection point and each intersection line into a quadtree data structure. In an optional implementation, the step of reconstructing the contour of the 3D model based on each of the intersection points and each of the intersection lines to obtain at least one closed region segmentation curve includes: Each intersection point and the start and end points of each intersection line are sequentially determined as points to be connected. The target connection point of each point to be connected is determined using a quadtree search algorithm. The distance between the target connection point and the point to be connected is less than a preset distance threshold. The point to be connected is an intersection point other than the point to be connected, or the start and end points of an intersection line other than the intersection line where the point to be connected is located. Each of the points to be connected is connected to the corresponding target connection point to obtain at least one region segmentation curve.
[0006] In an optional implementation, the topology diagram includes an M-layer topology structure. Based on the topology tree, region division is performed to obtain multiple different processing regions, including: Based on the region segmentation curves corresponding to any node and its child nodes in the j-th layer topology, a processing region is determined, wherein the child nodes of any node in the j-th layer topology belong to the (j+1)-th layer topology, M≥1, 1≤j≤M.
[0007] In an optional implementation, before performing a cross-sectional cut on the three-dimensional model, the method further includes: The orientation of the 3D model is adjusted according to its axial degrees of freedom.
[0008] In an optional implementation, the preset filling method includes: contour parallel filling method and / or directional parallel filling method.
[0009] Secondly, the present invention provides a laser engraving path planning system, the system comprising: The acquisition module is used to acquire a preset format file, which includes: a three-dimensional model of the part to be processed; The cutting module is used to perform cross-sectional cutting on the three-dimensional model to obtain multiple intersection points and multiple intersection lines; The contour reconstruction module is used to reconstruct the contour of the three-dimensional model based on each of the intersection points and each of the intersection lines to obtain at least one closed region segmentation curve. The determination module is used to determine the inclusion relationship between the region segmentation curves based on each of the region segmentation curves and using the Vatti polygon clipping algorithm. The topology generation module is used to establish a topology tree based on the inclusion relationship between the segmentation curves of each region; The region division module is used to divide regions based on the topological relationship tree to obtain multiple different processing regions; The toolpath generation module is used to generate corresponding engraving toolpaths for each of the aforementioned processing areas using a preset filling method.
[0010] Thirdly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when run on the processor, executes the laser engraving path planning method described in any of the foregoing embodiments. Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the laser engraving path planning method described in any of the foregoing embodiments.
[0011] The laser engraving path planning method, system, equipment, and medium provided in this application acquire a preset format file, which includes: a 3D model of the part to be processed; cross-cutting the 3D model to obtain multiple intersection points and multiple intersection lines; based on each intersection point and each intersection line, reconstructing the contour of the 3D model to obtain at least one closed region segmentation curve; based on each region segmentation curve, using the Vatti polygon clipping algorithm to determine the inclusion relationship between each region segmentation curve; based on the inclusion relationship between each region segmentation curve, establishing a topology tree; based on the topology tree, dividing the region to obtain multiple different processing regions; and for each processing region, using a preset filling method to generate corresponding engraving toolpaths. Based on the 3D model, through cross-cutting, contour reconstruction, and topology construction, the processing region is accurately and quickly divided and engraving toolpaths are generated, while processing accuracy is ensured through local intersection point and intersection line processing.
[0012] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0013] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A schematic flowchart of the laser engraving path planning method provided in an embodiment of this application is shown. Figure 2 A schematic diagram of a three-dimensional mesh surface model provided in an embodiment of this application is shown; Figure 3 This paper illustrates another flowchart of the laser engraving path planning method provided in an embodiment of this application. Figure 4 A schematic diagram of a region segmentation curve provided in an embodiment of this application is shown; Figure 5 This illustration shows a schematic diagram of region segmentation provided in an embodiment of this application; Figure 6 A schematic diagram of a topology structure tree provided in an embodiment of this application is shown; Figure 7 A schematic diagram of the engraving toolpath provided in an embodiment of this application is shown; Figure 8 Another schematic diagram of the engraving toolpath provided in an embodiment of this application is shown; Figure 9 A schematic diagram of the structure of the laser engraving path planning system provided in an embodiment of this application is shown; Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.
[0015] Explanation of key component symbols: 900 - Laser engraving path planning system; 910 - Acquisition module; 920 - Cutting module; 930 - Contour reconstruction module; 940 - Determination module; 950 - Topology generation module; 960 - Region division module; 970 - Toolpath generation module; 1000 - Electronic equipment; 1001 - Transceiver; 1002 - Processor; 1003 - Memory. Detailed Implementation
[0016] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0017] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the template description is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0019] Example 1 This application provides a laser engraving path planning method. Please refer to [link to relevant documentation]. Figure 1 The method includes steps S110 to S170.
[0020] Step S110: Obtain a preset format file, the preset format file including: a three-dimensional model of the part to be processed.
[0021] In this embodiment, the preset format files include: stereolithography (STL) files or wavefront object (OBJ) files, which are used to store the three-dimensional model of the part to be processed. Specifically, the geometric information of the part to be processed is recorded in the form of three-dimensional coordinates, mesh structure, surface equations, etc., to provide basic model support for subsequent toolpath planning.
[0022] It should be noted that the three-dimensional model described in this embodiment includes: a three-dimensional mesh surface model composed of multiple triangular faces, such as... Figure 2 As shown. The geometric information of the three-dimensional mesh surface model includes, but is not limited to: (1) vertex information of each triangle surface; (2) edge information of each triangle surface; (3) normal information of each triangle surface.
[0023] Step S120: The three-dimensional model is cross-cut to obtain multiple intersection points and multiple intersection lines.
[0024] In this embodiment, a preset cross-section is used to cut the 3D model. When the preset cross-section intersects the surface of the 3D model, corresponding geometric results are generated: on the one hand, the preset cross-section may intersect with the edges of the triangular faces constituting the 3D model, forming discrete intersection points; on the other hand, the preset cross-section may also intersect with the triangular faces constituting the 3D model, forming continuous intersection lines. Through such cross-sectional cutting operations, multiple such intersection points and intersection lines will eventually be obtained.
[0025] In other embodiments, the three-dimensional model can be cut using multiple different preset cross-sections.
[0026] In one embodiment, before performing cross-sectional cutting on the three-dimensional model, the method further includes: adjusting the orientation of the three-dimensional model according to its axial degrees of freedom.
[0027] It's understandable that before performing cross-sectional cutting on a 3D model, the model's orientation needs to be adjusted based on its degrees of freedom (DOF). Here, DOF refers to the possibility of the 3D model rotating around one or more coordinate axes (such as the X, Y, and Z axes). The specific rotation depends on the symmetry of the 3D model itself. By adjusting the angle or orientation of the 3D model along these axes, it can be positioned more effectively for cross-sectional cutting. For example, it might be necessary to rotate the 3D model by a certain angle so that the cross-section can more accurately cut the target structure, or to make the intersections and lines obtained after cutting easier for subsequent contour reconstruction and analysis, ensuring that the cutting operation efficiently and accurately serves subsequent processing needs.
[0028] In one embodiment, the three-dimensional model is a three-dimensional mesh surface model, which is composed of multiple triangular faces. The step of cross-cutting the three-dimensional model to obtain multiple intersection points and lines includes: The three-dimensional model is cross-cut using a preset cross-section to obtain multiple intersection points and lines. Each intersection point is the intersection of the preset cross-section with each of the triangular faces, and each line of intersection is the intersection of the preset cross-section with each of the triangular faces.
[0029] It can be understood that a 3D model is a 3D mesh model composed of numerous triangular faces, each of which is a basic unit constituting the surface of the 3D model. Using a preset cross-section, such as a plane at a specific angle or position, and intersecting it with the 3D model, multiple intersection points and lines are obtained. Each intersection point is formed by the intersection of the preset cross-section with a triangular face on the 3D model, and each line of intersection is a line segment formed by the intersection of the preset cross-section with a triangular face on the 3D model.
[0030] Step S130: Based on each of the intersection points and each of the intersection lines, the contour of the three-dimensional model is reconstructed to obtain at least one closed region segmentation curve.
[0031] After cutting the 3D model using a preset cross-section, a series of scattered intersection points and lines are obtained. Based on these scattered intersection points and lines, a preset algorithm, such as a quadtree search algorithm, is used to match the start and end points of nearby intersection points or lines, connect them, and reconstruct the contour of the cut cross-section of the 3D model. Finally, these scattered intersection points and lines are stitched together into at least one closed curve, which is a region segmentation curve. Each region segmentation line defines an independent region on the cross-section, clearly showing the structural morphology of the model at the cross-section.
[0032] In one embodiment, before reconstructing the contour of the three-dimensional model based on each of the intersection points and each of the intersection lines, the method further includes: obtaining the coordinate information of each of the intersection points and each of the intersection lines, and storing the coordinate information of each of the intersection points and each of the intersection lines in a quadtree data structure. In this embodiment, before reconstructing the contour of the 3D model, it is necessary to obtain the coordinate information of all intersection points, i.e., the specific location of each intersection point in the 3D model, and the coordinate information of all intersection lines, i.e., the coordinate information of the two endpoints of the intersection lines, to determine the position and range of the intersection lines. Then, this coordinate information is stored according to the rules of the quadtree data structure. The purpose of doing this is to leverage the efficient spatial data organization capability of the quadtree to facilitate the rapid search of adjacent intersection points or intersection lines during subsequent contour reconstruction (such as finding other endpoints that are sufficiently close to the endpoint of a certain intersection line), thereby improving the efficiency of the entire processing.
[0033] In one implementation, please refer to Figure 3 Step S130 includes: steps S131 to S132.
[0034] Step S131: Sequentially determine each intersection point and the start and end points of each intersection line as points to be connected, and use the quadtree search algorithm to determine the target connection point of each point to be connected. The distance between the target connection point and the point to be connected is less than a preset distance threshold. The point to be connected is an intersection point other than the point to be connected, or the start and end points of an intersection line other than the intersection line where the point to be connected is located.
[0035] In this embodiment, the target connection point is an intersection point or the start and end point of an intersection line that is less than a preset distance threshold from the point to be connected. Specifically, each intersection point and the start and end point of each intersection line are sequentially taken as the point to be connected. For each point to be connected, a quadtree search algorithm is used to search for target connection points in space that meet the conditions—these target points are other intersection points besides the point to be connected, or the start or end point of other intersection lines. In this way, the intersection points and the start and end points of intersection lines that should theoretically be connected can be quickly located.
[0036] Step S132: Connect each of the points to be connected to the corresponding target connection points to obtain at least one of the region segmentation curves.
[0037] By connecting the matching points to be connected and the target points pairwise, the originally scattered intersection points and lines are pieced together into a continuous curve, resulting in a closed region segmentation curve, such as... Figure 4 As shown, these region segmentation curves are the complete outlines of the 3D model after it has been cut by a cross-section, used to define different regions.
[0038] Step S140: Based on each of the region segmentation curves, the Vatti polygon clipping algorithm is used to determine the inclusion relationship between each of the region segmentation curves.
[0039] In this embodiment, please refer to Figure 5 , Figure 5 The diagram illustrates a region segmentation scheme provided in an embodiment of this application, where numbers 0-7 represent region segmentation curves. After obtaining each region segmentation curve, the Vatti polygon clipping algorithm is used to analyze their inclusion relationships. The Vatti polygon clipping algorithm excels at handling geometric curves represented by polynomial equations. By calculating and comparing each closed region segmentation curve, it can determine which region segmentation curves are completely inside another region segmentation curve (i.e., contained), which region segmentation curves are outside (i.e., contain other curves), or which region segmentation curves are independent and have no inclusion relationship. The core of this step is to use the algorithm to accurately define and hierarchically divide the spatial range of the region enclosed by the region segmentation curves, thereby clarifying the nesting or parallel relationships between the region segmentation curves.
[0040] Step S150: Based on the inclusion relationship between the segmentation curves of each region, establish a topological relationship tree.
[0041] After clarifying the inclusion relationships between the segmentation curves of each region, a topology tree is constructed based on these relationships. The outermost region segmentation curve, not included by other region segmentation curves, is taken as the root node of the tree. Region segmentation curves included by the root node become the next-level child nodes. If there are curves included by this child node, they continue to be the next-level child nodes, and so on. All region segmentation curves are organized into a tree structure according to their inclusion hierarchy. This clearly and intuitively presents the hierarchical nesting relationship of each region at the topological level, facilitating subsequent topological analysis and processing of the segmented regions of the 3D model. For example, please refer to... Figure 6 , Figure 6 A schematic diagram of the topology tree provided in an embodiment of this application is shown. Figure 6 The labels in the text correspond to respectively Figure 5 The labels in the figure represent the region segmentation curves 0-7, respectively.
[0042] Step S160: Based on the topological relationship tree, perform region division to obtain multiple different processing regions.
[0043] In this embodiment, the space segmented from the 3D model is divided according to the topological logic between the region segmentation curves represented by the topological relationship tree. From the outermost layer to the innermost layer, regions with different levels and different inclusion relationships are defined according to the structure of the topological relationship tree, resulting in multiple different processing regions.
[0044] In one embodiment, the topology graph includes an M-layer topology. The process of dividing regions based on the topology graph to obtain multiple different processing regions includes: determining a processing region based on the region segmentation curves corresponding to any node in the j-th layer topology and its child nodes, wherein the child nodes of any node in the j-th layer topology belong to the (j+1)-th layer topology, M≥1, 1≤j≤M.
[0045] In this embodiment, for any node in the j-th layer of the topology, combined with the child nodes of that node, which belong to the corresponding region segmentation curves of the (j+1)-th layer of the topology, a processing region is determined through such a correspondence. That is, by using the parent-child relationship of nodes in two adjacent layers of the topology and their corresponding region segmentation curves, independent processing regions are defined layer by layer and node by node, and finally multiple different processing regions are obtained. In this way, the processing regions are accurately divided according to the topological hierarchy.
[0046] For example, please see again Figure 6 A processing area is determined based on the region segmentation curves corresponding to node 0 and its child nodes 1 and 2, respectively; a processing area is determined based on the region segmentation curves corresponding to node 4 and its child node 5, respectively; and a processing area is determined based on the region segmentation curves corresponding to node 6 and its child nodes, respectively.
[0047] Step S170: For each of the processing areas, a preset filling method is used to generate the corresponding engraving toolpath.
[0048] For each processing area, a preset filling method is used to generate a unique carving toolpath for that area. This toolpath is the movement path of the carving tool when processing that area, allowing subsequent carving operations to be performed precisely and systematically based on these specifically generated toolpaths. For example, please see... Figure 7 and Figure 8 , Figure 7 A schematic diagram of the engraving toolpath generated based on the contour parallel filling method is shown. Figure 8 A schematic diagram of the engraving toolpath generated based on the directional parallel fill method is shown.
[0049] Compared with existing technologies, this application combines the layer-by-layer stacking method of 3D printing rapid prototyping with the toolpath planning of traditional computer-aided manufacturing. Based on the geometric properties of the 3D model itself, it can batch generate complex five-axis machining processes. It can not only perform point-to-point engraving along a single direction, but also link with a rotation axis to perform arbitrary geometric layer-by-layer arrays of complex shapes such as spirals. More importantly, it provides better memory security, ensuring stable long-term operation under conditions of large data volumes and complex models.
[0050] In one embodiment, the preset filling method includes: contour parallel filling method and / or directional parallel filling method.
[0051] In this embodiment, either the directional parallel filling method or the contour parallel filling method can be selected for toolpath planning, or these two filling methods can be cascaded. In other embodiments, other filling methods can be selected according to actual needs.
[0052] This application provides a laser engraving path planning method. The method involves acquiring a preset format file, which includes: a 3D model of the part to be processed; performing a cross-section cut on the 3D model to obtain multiple intersection points and lines; reconstructing the contour of the 3D model based on each intersection point and line to obtain at least one closed region segmentation curve; using the Vatti polygon clipping algorithm to determine the inclusion relationship between the region segmentation curves; establishing a topology tree based on the inclusion relationship; dividing the region based on the topology tree to obtain multiple different processing areas; and generating corresponding engraving toolpaths for each processing area using a preset filling method. Based on the 3D model, through cross-section cutting, contour reconstruction, and topology construction, the method accurately and quickly divides the processing area and generates engraving toolpaths, while ensuring processing accuracy through local intersection point and line processing.
[0053] Example 2 In addition, please see Figure 9 This application also provides a laser engraving path planning system 900, comprising: The acquisition module 910 is used to acquire a preset format file, which includes a three-dimensional model of the part to be processed.
[0054] The cutting module 920 is used to perform cross-cutting on the three-dimensional model to obtain multiple intersection points and multiple intersection lines.
[0055] The contour reconstruction module 930 is used to reconstruct the contour of the three-dimensional model based on each of the intersection points and each of the intersection lines to obtain at least one closed region segmentation curve.
[0056] The determination module 940 is used to determine the inclusion relationship between the region segmentation curves based on the region segmentation curves and using the Vatti polygon clipping algorithm.
[0057] The topology generation module 950 is used to establish a topology tree based on the inclusion relationship between the segmentation curves of each region.
[0058] The region division module 960 is used to divide regions based on the topological relationship tree to obtain multiple different processing regions.
[0059] The toolpath generation module 970 is used to generate corresponding engraving toolpaths for each of the processing areas using a preset filling method.
[0060] The laser engraving path planning system 900 provided in this embodiment of the invention can execute the laser engraving path planning method provided in the above-described method embodiment 1. To avoid repetition, it will not be described again here.
[0061] The laser engraving path planning system provided in this application, based on a three-dimensional model, accurately and quickly divides the processing area and generates engraving toolpaths through cross-cutting, contour reconstruction and topological relationship construction, while ensuring processing accuracy through local intersection point and intersection line processing.
[0062] Example 3 Furthermore, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program executes the laser engraving path planning method provided in Embodiment 1 when running on the processor.
[0063] For details, please see Figure 10 The electronic device 1000 includes: a transceiver 1001, a bus interface, and a processor 1002. The processor 1002 is used to acquire a preset format file, which includes: a three-dimensional model of the part to be processed; to perform cross-cutting on the three-dimensional model to obtain multiple intersection points and multiple intersection lines; to reconstruct the contour of the three-dimensional model based on each intersection point and each intersection line to obtain at least one closed region segmentation curve; to determine the inclusion relationship between each region segmentation curve using the Vatti polygon clipping algorithm; to establish a topology tree based on the inclusion relationship between each region segmentation curve; to divide the region based on the topology tree to obtain multiple different processing regions; and to generate corresponding engraving toolpaths for each processing region using a preset filling method.
[0064] In this embodiment of the invention, the electronic device 1000 further includes a memory 1003. Figure 10 In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1002) and memory (memory 1003). The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1001 may be multiple elements, including a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium. The processor 1002 is responsible for managing the bus architecture and general processing, and the memory 1003 may store data used by the processor 1002 during operation.
[0065] The electronic device 1000 provided in this embodiment of the invention can execute the laser engraving path planning method provided in the above-described method embodiment 1. To avoid repetition, it will not be described again here.
[0066] Example 4 Furthermore, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the laser engraving path planning method provided in Embodiment 1.
[0067] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0068] The computer-readable storage medium provided in this embodiment can implement the laser engraving path planning method provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0069] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.
[0070] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0071] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A laser engraving path planning method, characterized in that, The method includes: Obtain a preset format file, the preset format file including: a three-dimensional model of the part to be processed; The three-dimensional model is cross-cut to obtain multiple intersection points and multiple intersection lines; Based on the intersection points and intersection lines, the contour of the three-dimensional model is reconstructed to obtain at least one closed region segmentation curve; Based on the region segmentation curves, the Vatti polygon clipping algorithm is used to determine the inclusion relationship between the region segmentation curves. Based on the inclusion relationships between the segmentation curves of each region, a topological relationship tree is established; Based on the aforementioned topological relationship tree, regions are divided to obtain multiple different processing regions; For each of the processing areas, a preset filling method is used to generate the corresponding engraving toolpath.
2. The laser engraving path planning method according to claim 1, characterized in that, The three-dimensional model is a three-dimensional mesh surface model, which is composed of multiple triangular faces. The three-dimensional model is then cross-cut to obtain multiple intersection points and lines, including: The three-dimensional model is cross-cut using a preset cross-section to obtain multiple intersection points and lines. Each intersection point is the intersection of the preset cross-section with each of the triangular faces, and each line of intersection is the intersection of the preset cross-section with each of the triangular faces.
3. The laser engraving path planning method according to claim 1, characterized in that, Before reconstructing the contour of the 3D model based on the intersection points and the intersection lines, the method further includes: Obtain the coordinate information of each intersection point and each intersection line, and store the coordinate information of each intersection point and each intersection line into a quadtree data structure.
4. The laser engraving path planning method according to claim 3, characterized in that, The process of reconstructing the contour of the 3D model based on each of the intersection points and each of the intersection lines to obtain at least one closed region segmentation curve includes: Each intersection point and the start and end points of each intersection line are sequentially determined as points to be connected. The target connection point of each point to be connected is determined using a quadtree search algorithm. The distance between the target connection point and the point to be connected is less than a preset distance threshold. The point to be connected is an intersection point other than the point to be connected, or the start and end points of an intersection line other than the intersection line where the point to be connected is located. Each of the points to be connected is connected to the corresponding target connection point to obtain at least one region segmentation curve.
5. The laser engraving path planning method according to claim 1, characterized in that, The topology diagram includes an M-layer topology structure. Based on the topology tree, regions are divided to obtain multiple different processing regions, including: Based on the region segmentation curves corresponding to any node and its child nodes in the j-th layer topology, a processing region is determined, wherein the child nodes of any node in the j-th layer topology belong to the (j+1)-th layer topology, M≥1, 1≤j≤M.
6. The laser engraving path planning method according to claim 1, characterized in that, Before performing the cross-sectional cutting of the three-dimensional model, the method further includes: The orientation of the 3D model is adjusted according to its axial degrees of freedom.
7. The laser engraving path planning method according to claim 1, characterized in that, The preset filling methods include: contour parallel filling method and / or directional parallel filling method.
8. A laser engraving path planning system, characterized in that, The system includes: The acquisition module is used to acquire a preset format file, which includes: a three-dimensional model of the part to be processed; The cutting module is used to perform cross-sectional cutting on the three-dimensional model to obtain multiple intersection points and multiple intersection lines; The contour reconstruction module is used to reconstruct the contour of the three-dimensional model based on each of the intersection points and each of the intersection lines to obtain at least one closed region segmentation curve. The determination module is used to determine the inclusion relationship between the region segmentation curves based on the region segmentation curves and using the Vatti polygon clipping algorithm. The topology generation module is used to establish a topology tree based on the inclusion relationship between the segmentation curves of each region; The region division module is used to divide regions based on the topological relationship tree to obtain multiple different processing regions; The toolpath generation module is used to generate corresponding engraving toolpaths for each of the aforementioned processing areas using a preset filling method.
9. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that, when executed on the processor, performs the laser engraving path planning method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the laser engraving path planning method according to any one of claims 1-7.
Citation Information
Cited By
Special-shaped thin-wall part machining path identification method for laser cutting application
CN121733055A