Rapid layering method for laser processing curved surface based on octree structure

Through the fast layering method of laser processing surfaces based on the octree structure, the problem of insufficient spherical bounding box gaps and hierarchical bounding box traversal in the STL surface layered fast intersection technology is solved, and more efficient intersection and layering processing are achieved. , suitable for laser subtractive processing of complex geometries.

CN118710845APending Publication Date: 2024-09-27BEIJING INST OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410724807.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The existing STL surface hierarchical fast intersection technology has problems such as gaps in spherical bounding boxes, insufficient processing of hierarchical bounding box traversal, high memory consumption and hash conflicts caused by the average cell method, resulting in reduced algorithm performance.

Method used

A fast layering method for laser-processed surfaces based on the octree structure is used to achieve rapid layering of laser-processed surfaces by constructing hierarchical bounding boxes, using adjacency relationships to solve boundary intersection lines, and reconstructing truncated triangles.

Benefits of technology

The intersection efficiency is significantly improved, the number of position judgments is reduced, the identification of intersecting patches is faster, the gap problem of the spherical bounding box is avoided, the memory consumption is reduced, and the layering efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710845A
    Figure CN118710845A
Patent Text Reader

Abstract

The invention provides a laser processing curved surface rapid layering method based on an octree structure. The laser processing curved surface rapid layering method can achieve laser processing curved surface rapid layering. The specific process of the method comprises the following steps of: acquiring a layered curved surface for an STL (Standard Template Library) model; based on an octree structure, constructing a hierarchical bounding box of an STL model for the hierarchical curved surface; aiming at the constructed hierarchical bounding box, solving a boundary intersection line by utilizing an adjacency relation; and after the model intersection line is solved, the truncated triangle is reconstructed, and rapid layering of the laser processing curved surface is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of curved surface laser subtractive processing, and more specifically, relates to an octree structure-based laser processing curved surface rapid layering method suitable for laser subtractive processing path generation. Background Art

[0002] Laser subtractive processing technology is a processing technology that uses the photothermal effect of laser to achieve material removal. The laser is irradiated onto the surface of the material, causing the surface of the material to rapidly heat up and melt or vaporize in a short period of time, thereby achieving processing such as cutting and marking of the material. However, due to the photothermal characteristics of the laser itself, a heat-affected zone will be generated during the material processing process, causing thermal damage to the surface of the workpiece. In order to reduce thermal damage during laser processing and improve processing accuracy, an ultra-short pulse laser technology, such as femtosecond laser, has been developed in recent years. Femtosecond laser is an extremely short pulse laser, and its pulse width is usually at the level of one trillionth of a second. The pulse width is extremely short, the peak power is extremely high, and the focus radius is extremely small. This special laser characteristic significantly reduces the impact of thermal damage and significantly reduces the processing line width. Femtosecond lasers have great advantages, especially in processing applications that require high precision and microstructures.

[0003] At present, the widely used data file format in subtractive processing is the STL model file, which is fitted by a series of small triangular facets. Since the line width of ultrashort pulse laser processing is much smaller than the size of triangular facets, it is possible to plan the path directly on the STL model. Since laser processing equipment cannot generate paths directly on STL surfaces, it is necessary to layer the STL model in advance and convert it into several planes or curved surface patches to facilitate the subsequent path generation.

[0004] Plane layering is to directly cut the STL model into several plane slices. The advantages are simple layering method and fast calculation speed. However, since the curvature change of the model itself is not taken into account, in places where the curvature of the model surface changes greatly, step-like stacking will occur between adjacent slices, seriously affecting the processing accuracy.

[0005] Surface layering can reduce or even eliminate the step effect, and has obvious advantages when processing certain complex geometric shapes. However, the surface layering calculation is large and the layering efficiency is low. There are two main reasons: first, there is a lack of topological information between STL triangles, and the traversal search speed is slow; second, since the number of faces in the STL model can reach thousands or even tens of thousands, there are a large number of triangles in the calculation of surface layering, and the calculation complexity is high.

[0006] Based on the above analysis, the entire intersection of the STL model is divided into two processes: preliminary detection and precise intersection. The first step is preliminary detection, which eliminates non-intersecting areas by establishing a hierarchical bounding box of triangular facets to reduce the number of position judgments; the second step is precise intersection. Although the preliminary detection eliminates non-intersecting areas to a certain extent, it is still necessary to traverse and calculate the intersection in the intersecting area, so there is still room for improvement in processing time.

[0007] Shou Huahao and Zhou Chao combined the AABB hierarchical bounding box method and the average cell method to propose a hybrid intersection method. The hierarchical bounding box method was used to eliminate most of the non-intersecting triangles, and then the intersection was quickly calculated based on the cell method. This method is more suitable for large model scenes. Song Chenghu et al. used the method of combining the AABB hierarchical bounding box with the hash table to achieve the effect of fast intersection. The elimination effect of the hierarchical bounding box and the fast search ability of the hash table, combined with the two, greatly improved the detection speed. Palmer used a spherical bounding box to perform collision detection on the model. Fast detection was achieved through three steps: constructing a global bounding box, creating an octree spherical hierarchical bounding box, and specific intersection judgment. The spherical bounding box is simpler to construct, but there is also a problem of gaps.

[0008] The existing STL surface hierarchical fast intersection technology has the following disadvantages: first, there are gaps in the spherical bounding box; second, although the hierarchical bounding box method performs sub-bounding box traversal, it is still insufficient in the intersection solution of triangular facets and contour order processing. When using the average cell method, it is necessary to create a grid or cell structure in space to divide the model into smaller parts. For high-resolution grids, this may cause significant memory consumption; when using the hash table method, for grids with uneven data, hash conflicts will occur, and multiple keys will be mapped to the same hash table position by the hash function, which will generate additional time overhead and lead to algorithm performance degradation. Summary of the invention

[0009] In view of this, the present invention proposes a method for rapid stratification of laser processed surfaces based on an octree structure, which can achieve rapid stratification of laser processed surfaces.

[0010] The technical solution for implementing the present invention is as follows:

[0011] A fast layering method for laser processing surfaces based on an octree structure, the specific process is as follows:

[0012] For the STL model, a layered surface is obtained; based on the octree structure, a hierarchical bounding box of the STL model is constructed for the layered surface;

[0013] For the constructed hierarchical bounding box, the boundary intersection line is solved by using the adjacency relationship; after the model intersection line is solved, the truncated triangles are reconstructed to achieve rapid stratification of the laser processed surface.

[0014] Furthermore, the present invention constructs a hierarchical bounding box of an STL model based on an octree structure for the layered surface, and the specific process is as follows:

[0015] In a top-down manner, based on the three vertex coordinates of the triangular facets in the layered surface, a small bounding box Box of each triangular facet is obtained. i , judge Box i Check whether the range overlaps with the bounding box value of the octree node. If so, store the triangle in the bounding box of the node.

[0016] Furthermore, the judgment Box of the present invention i The principle for judging whether the range of overlaps with the bounding box value of the octree node is:

[0017] First, determine whether there is overlap between the bounding box and the triangle. If so, store the triangle in the bounding box of the node. If not, further determine whether the projections of the vertices of the octree bounding box on the normal of the triangle are on the opposite side. If so, store the triangle in the bounding box of the node.

[0018] Furthermore, the process of determining whether the projections of the vertices of the octree bounding box on the normal of the triangle face are on the opposite side is as follows:

[0019] First, get the normal vectors of each vertex of the octree bounding box on the triangle patch

[0020] Next, choose a point P(x,y,z) on the triangle patch and compare it with the vertices V of the cube. j (x v ,y v ,z v )Build vector

[0021]

[0022] Again, calculate the vector exist The projection L j , if the projection L j is negative, then it is determined that there is no overlap. If the projection L j If it is positive, it is judged that there is overlap.

[0023] Furthermore, the present invention adopts the vertex movement method to obtain the layered surface, and the specific process is as follows:

[0024] When the number of facets around a vertex is less than or equal to 3, the normals of the facets around the vertex of the STL model are weighted to calculate the moving direction vector;

[0025] When the number of faces around a vertex is greater than 3, the moving direction vector is calculated by grouping and taking the average direction.

[0026] Furthermore, the specific process of calculating the moving direction vector by grouping calculation and taking the direction average in the present invention is as follows:

[0027] ⅰ: Get the value at vertex P i,original The surrounding face set F n ;

[0028] ⅱ: From the set F n Take out 3 pieces of dough at a time (F o ,F p ,F q ), using the binomial theorem C n 3 , traverse all possible results and calculate their offset vector

[0029] ⅲ: Calculate by the following formula The average value of the original vertex P i,original The offset normal vector

[0030]

[0031] Furthermore, the present invention uses the adjacency relationship to solve the boundary intersection line for the constructed hierarchical bounding box, and the specific process is as follows:

[0032] (1) Determine the direction of the intersection line. If the intersection line is in a clockwise direction, change the starting point of the intersection line. Use the adjacency relationship to quickly search for triangular facets and calculate the boundary intersection line.

[0033] (ii) Boundary reconstruction: After solving the intersection lines of the model, the polygon triangulation method is used to reconstruct the truncated triangles.

[0034] Furthermore, the direction of the intersection line is determined as follows:

[0035] Let the normal N of the triangle F be F and the surface moving direction N P ;

[0036] Based on the endpoint V of the patch intersection 1 and V 2 , initially construct the direction vector N of the intersection line v ;

[0037] Calculate the normal N F and the surface moving direction N P The cross product vector N t , when the cross product vector N t With the direction vector N v When they are in the same direction, the direction of the intersection line is determined to be counterclockwise, otherwise the direction of the intersection line is determined to be clockwise.

[0038] Furthermore, the present invention reconstructs the truncated triangles by using a polygon triangulation method or a Delaunay triangulation method.

[0039] Furthermore, the specific process of reconstructing the truncated triangle by using the triangulation method described in the present invention is as follows:

[0040] First, an ordered sequence of boundary points is generated by counterclockwise sorting and converted to the XOY plane;

[0041] Secondly, calculate the internal angle of each vertex, prioritize the vertices with internal angles greater than 180°, generate new triangles, and remove related vertices. If no internal angle is greater than 180°, process the minimum internal angle of the polygon, and repeat this process until the polygon is completely divided into triangles.

[0042] Finally, the result is mapped back to the original space through inverse transformation to achieve triangulation reconstruction of the boundary.

[0043] Beneficial effects:

[0044] The present invention eliminates non-intersecting areas based on the octree method, reduces the number of position judgments, and is more compact than the spherical bounding box method; at the same time, it quickly determines the intersecting facets, significantly improves the intersection efficiency, and lays a foundation for subsequent path generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, 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 work.

[0046] Figure 1 is a flow chart of the method of the present invention;

[0047] Figure 2 It is the relationship diagram between triangle face and octagonal leaf node;

[0048] Figure 3 This is a schematic diagram for determining the position of the face and the cube;

[0049] Figure 4 Schematic diagram of triangle patch interception;

[0050] Figure 5 It is a schematic diagram for solving the intersection direction;

[0051] Figure 6 It is a schematic diagram of the remaining parts;

[0052] Figure 7 It is a schematic diagram of directed intersection lines and intersection surfaces;

[0053] Figure 8 This is a schematic diagram of the intersection lines of model 1, 2 and 3;

[0054] Fig. 9 This is a schematic diagram of a layered model;

[0055] Fig.10 This is a schematic diagram of hierarchical model II;

[0056] Fig.11 This is a schematic diagram of layered model three. DETAILED DESCRIPTION

[0057] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0058] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.

[0059] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0060] The embodiment of the present application provides a method for rapid layering of laser processed surfaces based on an octree structure suitable for laser subtractive processing, such as Figure 1 As shown, the process of this method is:

[0061] Firstly, a new strategy combining vertex movement method and octree hierarchical bounding box with face adjacency relationship is adopted to quickly determine the intersecting faces, which significantly improves the efficiency of intersection.

[0062] Secondly, the polygon concave corner priority subdivision algorithm is applied to efficiently subdivide and reconstruct the boundary triangles and complete the accurate model surface layering.

[0063] Before describing in detail the laser processing surface rapid layering method based on the octree structure in the embodiment of the present application, the topological relationship of the STL model is first introduced:

[0064] The STL model is a set S of points, lines and surfaces. V, E and F are sets of points, lines and surfaces respectively. The mathematical expression is as follows:

[0065] S={V,E,F} (1)

[0066]

[0067] The half-edge structure is an edge-based representation method. The half-edge is reflected in the common edge of two adjacent triangles. 1 and v 3 Constructed triangle F 1 and F 2 A common edge e 3 At the same time, in their respective triangles, they establish their own directed half-edges e in a counterclockwise direction, in the same direction as the points are arranged. 3,1 and e 3,2 The two are inner and outer halves of each other. The topological relationship of the STL model is established using the half-edge structure. This topological structure can realize the rapid search of adjacent facets and provide a data structure foundation for subsequent method steps.

[0068] The embodiment of the present application is a method for rapid layering of laser processed surfaces based on an octree structure suitable for laser subtractive processing, and the specific process is as follows:

[0069] Step 1: Obtain layered surfaces: Obtain layered surfaces for the STL model.

[0070] In the embodiment of the present application, a vertex movement method or a triangle edge offset method can be used to obtain the layered surface of the STL model.

[0071] This embodiment is based on the vertex movement method to illustrate the specific process of obtaining the layered surface:

[0072] Using the vertex movement method, the normals of the facets around the vertices of the STL model are weighted to calculate the moving direction vector.

[0073]

[0074] Among them, W j is the weighted coefficient of the normal of the triangle connected to each vertex, is the normal vector of the patch around the vertex.

[0075] According to the positional relationship between the original vertex and the new vertex, we can get equations (6) and (7):

[0076]

[0077] Among them, P i,original is the original vertex position, P i,new is the position of the new vertex.

[0078] Then the relationship between the offset vector and the surface normal is derived:

[0079]

[0080] Combining equations (5) and (8), we can derive the calculation formulas (9) and (10) for the weighted vector:

[0081]

[0082] When the number of facets around a point is greater than 3, equation (10) may have no solution. Therefore, when solving the problem using the above method, the present application adopts the following strategy for the difference in the number of triangular facets at the vertex:

[0083] (1) When N≤3, directly use the above formula (5) to solve.

[0084] (2) When N>3, in order to reduce the impact of different calculated values, group calculation and normal averaging are used to solve the problem. The specific steps are as follows:

[0085] ⅰ: Get the value at vertex P i,original The surrounding face set F n ;

[0086] ⅱ: From the set F n Take out 3 pieces of dough at a time (F o ,F p ,F q ), using the binomial theorem C n 3 , traverse all possible results and calculate their offset vector

[0087] ⅲ: Calculate by formula (11) The average value of the original vertex P i,original The offset normal vector

[0088]

[0089] The top surface of the STL model is offset along the calculated offset normal vector to achieve preliminary surface layering.

[0090] Step 2: Constructing a hierarchical bounding box: Based on the octree structure, constructing a hierarchical bounding box for the layered surface.

[0091] The octree structure of the AABB box is constructed in a top-down manner. By obtaining the model bounding box, the model is gradually divided into small space cubes.

[0092] When building the octree structure, the information of the layered surface needs to be stored in the leaf nodes of the octree. In the STL model, the triangle is the smallest component unit, which is represented by three vertex coordinates (x i ,y i ,z i ) can get the small bounding box Box of each triangle face i , judge Box i Whether the range overlaps with the bounding box value of the octree node, if there is an overlap, the triangle face is stored in the bounding box of the node.

[0093] The bounding box of the triangle face determined by the coordinate maximum value Box i There is a problem of too much redundant space in the bounding box, even if the octree Octr j And the triangle bounding box Box i There is a phenomenon where the ranges overlap but do not intersect, such as Figure 2 As shown in the figure, there is no intersection relationship between triangle F and gray cube C. This will lead to more unnecessary detection in the process of determining whether there is an intersection, affecting the processing efficiency.

[0094] Therefore, when judging whether there is an intersection between a triangle patch and a node, we cannot only judge whether the bounding box has an overlapping range. We also need to judge whether the projections of the vertices of the octree bounding box on the normal of the triangle patch are on the opposite side, that is, whether the octree bounding box and the patch intersect. Figure 3 As shown:

[0095] As can be seen from the figure, when the cube is on the same side of the triangle, the vertices on the triangle normal vector When the cube is on the opposite side of the triangle, the projections of the vertices are on both sides of the triangle. You can calculate whether they are on the same side by calculating the positive and negative projections between the vectors.

[0096] Choose a point P(x,y,z) on the triangle patch and compare it with the vertices V of the cube. j (x v ,y v ,z v ) constructs the vector and uses equations (12) and (13) to calculate exist The projection L j, determine its sign. and Same number, namely L j is positive, then on the same side, the bounding box does not contain the face; if and Different sign, i.e. L j If it is negative, the triangle passes through the bounding box, and there is a containment relationship between the two.

[0097] PV j ={x v,j -x,y v,j -y,z v,j -z} (12)

[0098] L j =PV j ·N (13)

[0099] Advantages of establishing an octree AABB hierarchical bounding box model in this embodiment: The octree can be adaptively divided according to the distribution of objects in space, so it is more flexible when dealing with irregular or highly variable geometric shapes. The octree can be depth-controlled as needed to balance accuracy and computational efficiency. This means that the depth of the tree can be adjusted according to specific circumstances to meet performance and accuracy requirements. Compared with the average cell method, the octree can usually represent the distribution of space more efficiently, thereby reducing memory consumption.

[0100] Step 3: Solve the boundary intersection line: For the hierarchical bounding box constructed in step 2, use the adjacency relationship to solve the boundary intersection line.

[0101] Determine the direction of the intersection line. When the intersection line direction is clockwise, change the starting point of the intersection line. Use the adjacency relationship to quickly search for triangles and calculate the boundary intersection line.

[0102] (1) Determine the direction of the intersection line. If the direction of the intersection line is clockwise, change the starting point of the intersection line. The specific process of this step is as follows:

[0103] Let the normal N of the triangle F be F and the surface moving direction N P ;

[0104] Based on the endpoint V of the patch intersection 1 and V 2 , initially construct the direction vector N of the intersection line v ;

[0105] Calculate the normal N F and the surface moving direction N P The cross product vector N t , when the cross product vector N t With the direction vector Nv If they are in the same direction, the direction of the intersection is determined to be counterclockwise, otherwise the direction of the intersection is determined to be clockwise. The specific analysis of this step is as follows:

[0106] In order to obtain the remaining part of the boundary triangle inside the intersection line, the direction of the intersection line needs to be determined. In view of the counterclockwise arrangement order of the half edges in the half edge structure, the direction of the intersection line is set to be counterclockwise, that is, the left side of the intersection line is the remaining part of the retained triangle patch, such as Figure 4 As shown, S 1 is the part of the boundary triangle that is discarded, S 2 The portion reserved for the triangle, S 3 It is the part inside the intersection line.

[0107] exist Figure 5 According to the characteristics of the STL model data format, we can know that the normal N of the face F is F The direction points to the outside of the patch; the position relationship between the points before and after the surface moves is corresponding, and the direction of surface movement N P ; The endpoint V of the intersection line of the face 1 and V 2 The direction vector N of the intersection line can be preliminarily constructed v . N is calculated based on the cross product of space vectors F With N P The cross product vector N t When N t With N v When they are in the same direction, it can be determined that the intersection line is counterclockwise.

[0108] N t =N F ×N P (14)

[0109] like Figure 5 As shown, N v In N t The projection of is negative, then N v The direction is clockwise, which does not meet the counterclockwise requirement. Therefore, the starting point of the intersection line needs to be exchanged so that the left side of the intersection line is the retained face part. The final result is as follows Figure 6 As shown in the figure, the gray area is the retained part, and the white area is the discarded part.

[0110] (2) Rapid search for adjacent intersecting triangular facets: Locate the intersecting triangular facets through the hierarchical bounding box, and use the located triangular facets as the starting face to find the next intersecting face until all the intersection lines are solved. The specific analysis of this step is as follows:

[0111] Since the octree cannot be over-divided and can only be divided to a certain level, when the number of faces is large, the data in each sub-leaf of the octree may not be 1. If there are many faces in the bounding box, exhaustively traversing the faces that may intersect will increase the processing time. Using the adjacency relationship of the half-edge structure, you only need to find a pair of intersecting triangles, and you can find the intersection line of one layer through adjacency traversal.

[0112] like Figure 7 As shown in Figure F 1 、F 2 、F 3 is a set of offset surfaces that intersect the side faces. Assume that the intersecting triangular faces F are located by hierarchical bounding boxes. 1 When F 1 The surface is the starting surface, and the next intersecting surface is found until all the intersection lines are solved.

[0113] Step 4: Boundary reconstruction: After completing the solution of the model intersection line, the polygon triangulation method is used to reconstruct the truncated triangles, and finally the laser processing surface can be quickly layered.

[0114] First, generate an ordered sequence of boundary points by counterclockwise sorting and convert them to the XOY plane. Then, calculate the internal angle of each vertex, prioritize the vertices with internal angles greater than 180°, generate new triangles, and remove related vertices. If no internal angle is greater than 180°, process the minimum internal angle (need to be confirmed). Repeat this process until the polygon is completely divided into triangles; finally, map the result back to the original space through inverse transformation to achieve triangulation reconstruction of the boundary, ensuring the accuracy of the model and processing efficiency.

[0115] In this step, Delaunay triangulation can also be used to reconstruct the truncated triangles.

[0116] After executing the above steps 1 to 4, a layered surface is obtained, which is suitable for laser subtractive machining path generation.

[0117] This embodiment is based on the advantages of intersecting face pairs and adjacency relationships, and the technology can efficiently identify and solve the intersection lines in the model. This method improves the processing speed because it reduces unnecessary comprehensive searches of the entire model and only focuses on adjacent and related triangular facets. In addition, this strategy also enhances the accuracy of the processing because it ensures that all intersection areas are accurately identified and processed, making it suitable for processing complex STL models, especially performing well in complex curved surface three-dimensional model data.

[0118] Example verification

[0119] (1) Fast intersection

[0120] Based on the window10 platform, C++ is used in Visual Studio 2019 to implement the construction of the half-edge structure of the STL model, and compared with the traversal method and the traditional hierarchical bounding box method. Three groups of experiments were set up in the experiment: ① traversal method; ② hierarchical bounding box method; ③ the method of this application. Two sphere models were used, with the number of faces being 1224, 2400, and 3480 respectively, intersecting at different positions. At the same time, the depth of the octree was set to 6. The total time for face intersection includes the reading of the STL file and the establishment of the topological relationship. The experimental results are shown in Tables 1 and Figure 8 As shown:

[0121] Table 1 Intersection test results

[0122]

[0123] The intersection method based on the hierarchical bounding box and adjacency relationship of the present application does not need to judge all the faces in the bounding box, which reduces the number of traversal and calculation times of the face pair, and speeds up the processing of the intersection line solution. It can be seen from the experimental results that as the number of intersecting faces increases, the improved intersection method based on the octree hierarchical bounding box of the present application gradually improves in calculation speed compared with the hierarchical bounding box method, and shortens the time by 10% under the 3480 face model.

[0124] (2) Surface stratification results

[0125] Based on the vertex moving layering method, the surface fast intersection method and the boundary triangle re-meshing method, the surface intersection lines of the model are quickly obtained, and the remaining surfaces are reconstructed. The following are the results of surface layering for several models, including intersection lines and layered surfaces, such as Figure 9-11 As shown in Figure 2, it can be seen that the stratification of the model can achieve relatively good results, and the stratification and intersection algorithm in this paper has good applicability.

[0126] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for rapid layering of laser processed surfaces based on an octree structure, characterized in that: The specific process is: For the STL model, a layered surface is obtained; based on the octree structure, a hierarchical bounding box of the STL model is constructed for the layered surface; For the constructed hierarchical bounding box, the boundary intersection line is solved by using the adjacency relationship; after the model intersection line is solved, the truncated triangles are reconstructed to achieve rapid stratification of the laser processed surface.

2. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 1, characterized in that: The hierarchical bounding box of the STL model is constructed based on the octree structure for the layered surface, and the specific process is as follows: In a top-down manner, based on the three vertex coordinates of the triangular facets in the layered surface, a small bounding box Box of each triangular facet is obtained. i , judge Box i Check whether the range overlaps with the bounding box value of the octree node. If so, store the triangle in the bounding box of the node.

3. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 2, characterized in that: The judgment box i The principle for judging whether the range of overlaps with the bounding box value of the octree node is: First, determine whether there is overlap between the bounding box and the triangle. If so, store the triangle in the bounding box of the node. If not, further determine whether the projections of the vertices of the octree bounding box on the normal of the triangle are on the opposite side. If so, store the triangle in the bounding box of the node.

4. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 1, characterized in that: The process of determining whether the projections of the vertices of the octree bounding box on the normal of the triangle face are on the opposite side is as follows: First, obtain the normal vector N of each vertex of the octree bounding box on the triangle patch; Next, choose a point P(x,y,z) on the triangle patch and compare it with the vertices V of the cube. j (x v ,y v ,z v )Build vector Again, calculate the vector exist The projection L j , if the projection L j is negative, then it is determined that there is no overlap. If the projection L j If it is positive, it is judged that there is overlap.

5. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 1, characterized in that: The vertex movement method is used to obtain the layered surface, and the specific process is as follows: When the number of faces around a vertex is less than or equal to 3, the normals of the faces around the vertex of the STL model are weighted to calculate the moving direction vector; When the number of faces around a vertex is greater than 3, the moving direction vector is calculated by grouping and taking the average direction.

6. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 5, characterized in that: The specific process of calculating the moving direction vector by grouping and taking the direction average is as follows: ⅰ: Get the value at vertex P i,original The surrounding face set F n ; ⅱ: From the set F n Take out 3 pieces of dough at a time (F o ,F p ,F q ), using the binomial theorem C n 3 , traverse all possible results and calculate their offset vector ⅲ: Calculate by the following formula The average value of the original vertex P i,original The offset normal vector 7. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 1, characterized in that: For the constructed hierarchical bounding box, the boundary intersection line is solved by using the adjacency relationship. The specific process is as follows: (1) Determine the direction of the intersection line. If the intersection line is in a clockwise direction, change the starting point of the intersection line. Use the adjacency relationship to quickly search for triangular facets and calculate the boundary intersection line. (ii) Boundary reconstruction: After solving the intersection lines of the model, the polygon triangulation method is used to reconstruct the truncated triangles.

8. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 7, characterized in that: The direction of the intersection line is determined as follows: Let the normal N of the triangle F be F and the surface moving direction N P ; Based on the endpoints V1 and V2 of the intersection line of the face, the direction vector N of the intersection line is preliminarily constructed. v ; Calculate the normal N F and the surface moving direction N P The cross product vector N t , when the cross product vector N t With the direction vector N v When they are in the same direction, the direction of the intersection line is determined to be counterclockwise, otherwise the direction of the intersection line is determined to be clockwise.

9. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 7, characterized in that: The truncated triangles are reconstructed using polygon triangulation or Delaunay triangulation.

10. The method for rapid layering of laser processed surfaces based on an octree structure according to claim 9, characterized in that: The specific process of reconstructing the truncated triangle by using the triangulation method is as follows: First, an ordered sequence of boundary points is generated by counterclockwise sorting and converted to the XOY plane; Secondly, calculate the internal angle of each vertex, prioritize the vertices with internal angles greater than 180°, generate new triangles, and remove related vertices. If no internal angle is greater than 180°, process the minimum internal angle of the polygon, and repeat this process until the polygon is completely divided into triangles. Finally, the result is mapped back to the original space through inverse transformation to achieve triangulation reconstruction of the boundary.