A method for compensating a laser pipe cutting curved surface groove straight cutting trajectory
Patent Information
- Application Number
- CN202410549516.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2044-05-06
AI Technical Summary
[0003]然而四轴激光切管设备会遇到切割曲面坡口的情况,四轴激光切管设备配备的激光切割头是直切头,无法实现坡口切割,因此,亟需一种激光切管曲面坡口直切轨迹补偿方法,对轨迹进行切割补偿,从而满足后续装配或焊接的工艺需求
[0033] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:
Smart Images

Figure CN118218796B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser cutting technology, and specifically to a method for compensating for the straight cutting trajectory of a curved bevel in laser tube cutting. Background Technology
[0002] The four-axis laser tube cutting equipment features a four-axis motion control system that enables automatic rotation, lifting, and clamping of the tube, preparing it for subsequent processing. During the cutting process, it utilizes a high-power laser beam to quickly and accurately cut the tube. The laser cutting control system scans, measures, and analyzes the processing area, monitoring and finely adjusting the laser beam in real time to achieve high-quality cutting results. This equipment has wide applications in metal processing, electronic device manufacturing, and automotive parts processing.
[0003] However, four-axis laser tube cutting equipment encounters the situation of cutting curved bevels. The laser cutting head equipped with the four-axis laser tube cutting equipment is a straight cutting head, which cannot achieve bevel cutting. Therefore, there is an urgent need for a laser tube cutting curved bevel straight cutting trajectory compensation method to compensate for the trajectory cutting, so as to meet the process requirements of subsequent assembly or welding. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide a method for straight cutting trajectory compensation of laser-cut curved surface bevels to overcome or at least partially solve the above problems.
[0005] To address the aforementioned technical problems, the embodiments of this application disclose the following technical solutions:
[0006] In a first aspect, embodiments of the present invention disclose a method for compensating for the straight cutting trajectory of a laser-cut curved surface bevel, comprising:
[0007] S100. Obtain the set of outer surfaces of the part; perform statistics on all surfaces in the part, first obtain the surface with the largest area, and then obtain the set of all surfaces in the part that are on the outer surface according to the tangency relationship between the surfaces;
[0008] S200. Obtain the set of bevel faces; traverse all sub-trajectories of the cutting contour, first count the face where each sub-trajectory is located, then distinguish the outer surface and the bevel face, and finally count all the bevel faces;
[0009] S300. Extract the inner contour corresponding to the cutting contour; traverse all sub-trajectories of the cutting contour, first determine the bevel surface to which the sub-trajectory belongs, then traverse all the edges of the bevel surface, and filter out the inner contour corresponding to the sub-trajectory by calculating the distance between each edge and the outer surface.
[0010] S400. Traverse all sub-trajectories of the cutting contour, divide the sub-trajectories into straight lines and non-straight lines, calculate the feature point offsets of straight lines and non-straight lines respectively, and then perform offset compensation calculations on the straight line segments and non-straight line segments in the original cutting trajectory respectively, thereby realizing trajectory compensation.
[0011] Furthermore, in S100, all surfaces in the part are statistically analyzed. First, the surface with the largest area is obtained. Then, based on the tangency relationship between surfaces, the set of all surfaces in the part that are on the outer surface is obtained. The specific method includes:
[0012] S101. Create a list of all surface sets; based on the opencascade function library, perform surface traversal on the imported part model and store all surfaces of the part in the AllFacesList collection;
[0013] S102. Calculate the surface with the largest area; Iterate through all faces in AllFacesList, calculate the area of each face based on the opencascade function library, compare the areas of all faces, and record the largest area as S_Max, and the surface corresponding to the largest area S_Max as Face_max; Compare Face_max with the sizes of other faces, and when there are multiple faces whose differences from the largest area are less than a preset threshold, calculate the distance from the origin of the coordinate system to each face, and take the face corresponding to the largest distance as the updated surface with the largest area Face_max;
[0014] S103. Obtain the outer surfaces; First, create two sets: OutFaceList (outer surfaces) and OtherFaceList (other surfaces); Place Face_Max obtained in S102 into OutFaceList, and place all other faces except Face_Max into OtherFaceList; Iterate through OtherFaceList...
[0015] Further, traverse all faces in OtherFaceList and obtain the set of outer surfaces of the part according to the first preset rule; the first preset rule includes: when traversing the i-th face otherface_i in OtherFaceList, traverse each face in OutFaceList one by one; when traversing the j-th face outface_j in OtherFaceList, determine whether outface_j is tangent to otherface_i; if there is a face outface_j in OutFaceList that is tangent to the current face otherface_i, then determine that otherface_i also belongs to the outer surface; add otherface_i to OutFaceList; remove otherface_i from OtherFaceList; repeat the above process of traversing OtherFaceList until there are no faces in OtherFaceList that can be added to OutFaceList.
[0016] Furthermore, in S200, all sub-trajectories of the cutting contour are traversed. First, the faces containing each sub-trajectory segment are counted. Then, the outer surface and the bevel face are distinguished. Finally, all bevel faces are counted. Specific methods include:
[0017] S201. Take three points on the current sub-trajectory, namely the starting point P_Sta, the ending point P_End, and the middle point P_Mid; traverse each face of all surfaces one by one. When traversing the j-th face face_j, calculate the distances from the starting point P_Sta, the ending point P_End, and the middle point P_Mid to face_j, and denot them as D1, D2, and D3 respectively. When D1, D2, and D3 are all less than a preset threshold group, determine that the current sub-trajectory edge_i is on face_j.
[0018] S202. Execute the loop in S201. When it is found that the number of faces where the current sub-trajectory edge_i is located is equal to 2, record them as face1_i and face2_i respectively. Determine whether face1_i and face2_i belong to the OutFace List respectively, remove the faces that belong to the OutFace List, and add the remaining faces to the GrooveFace List.
[0019] Further, in S300, all sub-trajectories of the cutting contour are traversed. First, the bevel surface to which the sub-trajectory belongs is determined. Then, all edges of the bevel surface are traversed. The inner contour corresponding to the sub-trajectory is selected by calculating the distance between each edge and the outer surface. The specific method includes:
[0020] S301. Use the stitching function in the opencascade library to stitch all faces in the outer surface set OutFaceList in S100 into a complete outer surface OutFace_Sew;
[0021] S302. Create a two-dimensional dictionary Dict_List(face, ptlist). The dictionary is a list, and each element in the list contains a key face and a value ptlist. face represents a face in the set of bevel faces GrooveFaceList, and ptlist represents the set of discrete points of the inner contour corresponding to the face.
[0022] S303. Traverse all faces in the GrooveFaceList set of bevel faces obtained in S200 according to the second preset rule, and fill the two-dimensional dictionary Dict_List according to the traversal results;
[0023] S304. After traversing all faces in GrooveFaceList, connect the ptlist elements in all elements of Dict_List. The resulting shape is the inner contour corresponding to the contour to be cut.
[0024] Furthermore, in S303, all faces in the GrooveFaceList set of bevel faces obtained in S200 are traversed according to the second preset rule, which includes:
[0025] S3031. Use the edge extraction function in the opencascade library to extract all edges in each face, grooveface_i;
[0026] S3032. Calculate the distance from each edge in grooveface_i to OutFace_Sew using the distance function in the opencascade library, and store the edges with a distance greater than 0.5 times the part thickness into the inner contour trajectory list Iner_EdgeList.
[0027] S3033. Traverse all edges in Iner_EdgeList, use the discretization function to discretize all edges in Iner_EdgeList into columns of points and add them to the local point list local_ptlist;
[0028] S3034. Create a dictionary element Di(grooveface_i, local_ptlist) and add Di to the two-dimensional dictionary Dict_List.
[0029] Furthermore, in S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The feature point offsets of each sub-trajectory are calculated separately. Then, offset compensation calculations are performed on the straight line segments and non-straight line segments in the original cutting trajectory. The specific method includes: first, assigning a value to the end face identification parameter LorR according to whether the contour belongs to the near origin end or the far origin end. When the current contour belongs to the near origin end, the parameter LorR is set to 1; when the current contour belongs to the far origin end, the parameter LorR is set to -1.
[0030] Further, in S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The feature point offsets of each sub-trajectory are calculated separately. Then, offset compensation calculations are performed on the straight lines and non-straight lines in the original cutting trajectory. The specific method also includes: traversing each sub-cutting trajectory edge_i in the current contour, where i represents the i-th sub-trajectory, taking the starting point P_Sta_i and ending point P_End_i of edge_i, traversing the face set GrooveFaceList of the bevel, and calculating the distances from P_Sta_i and P_End_i to grooveface_j during the traversal of each groove face grooveface_j, denoted as d1 and d2 respectively. When d1 and d2 meet the preset threshold group, it is determined that the sub-trajectory edge_i is on the groove face grooveface_j, and the current face grooveface_j is recorded as a valid surface.
[0031] Further, in S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The feature point offsets of each sub-trajectory are calculated separately. Then, offset compensation calculations are performed on the straight line segments and non-straight line segments in the original cutting trajectory. The specific method also includes: determining the type of the current sub-trajectory; when the current sub-trajectory type is a straight line, the value ptlist corresponding to grooveface_j is found in the dictionary Dict_List; all points in ptlist are traversed, and the distances to P_Sta_i and P_End_i are calculated respectively. The point corresponding to the minimum distance is recorded as the corresponding offset point P_Sta_i_offset and P_End_i_offset; the offsets Offset_Sta and Offset_End at the start and end points are calculated respectively; the start and end points of the straight line are offset to form a new straight line. The specific judgment method includes: when Offset_Sta*LorR<0, the start point is moved along the X direction by Offset_Sta; otherwise, the start point remains unchanged; when Offset_End*LorR<0, the end point is moved along the X direction by Offset_End; otherwise, the end point remains unchanged.
[0032] Furthermore, in S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The feature point offsets of each sub-trajectory are calculated separately. Then, offset compensation calculations are performed on the straight line segments and non-straight line segments in the original cutting trajectory. The specific method also includes: determining the type of the current sub-trajectory. When the current sub-trajectory type is non-straight line, the sub-trajectory is discretized using the discrete function in the opencascade function library to obtain a list of discrete points. Each point Pt_j in each point list is traversed, and the offset Offset_j of each point is calculated according to the processing method of the starting point of the straight line. When Offset_j*LorR>0, Offset_j=0; when Offset_j*LorR<0, each discrete point of the sub-trajectory is offset by Offset_j along the X direction. Then, the fitting function in the opencascade function library is used to refit all the offset discrete points into a new spline.
[0033] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:
[0034] This invention discloses a method for compensating the straight cutting trajectory of a curved bevel in laser-cut tubes, comprising: S100. Obtaining a set of outer surfaces of a part; statistically analyzing all surfaces in the part, first obtaining the surface with the largest area, and then obtaining a set of all surfaces on the outer surface of the part based on the tangency relationship between surfaces; S200. Obtaining a set of bevel surfaces; traversing all sub-trajectories of the cutting contour, first counting the surfaces where each sub-trajectory segment is located, then distinguishing between the outer surface and the bevel surface, and finally counting all bevel surfaces; S300. Extracting the inner contour corresponding to the cutting contour; traversing all sub-trajectories of the cutting contour, first determining the bevel surface to which the sub-trajectory belongs, then traversing all edges of the bevel surface, and filtering out the inner contour corresponding to the sub-trajectory by calculating the distance between each edge and the outer surface; S400. Traversing all sub-trajectories of the cutting contour, dividing the sub-trajectories into straight lines and non-straight lines, calculating the feature point offsets of straight lines and non-straight lines respectively, and then performing offset compensation calculations on the straight lines and non-straight lines in the original cutting trajectory respectively, thereby achieving trajectory compensation. This invention solves the problem in the prior art that four-axis laser tube cutting equipment cannot perform bevel cutting when encountering curved surface bevel cutting.
[0035] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0036] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0037] Figure 1This is a flowchart of a method for compensating the straight cutting trajectory of a laser-cut curved surface bevel in Embodiment 1 of the present invention;
[0038] Figure 2 This is a flowchart of obtaining the outer surface in Embodiment 1 of the present invention. Detailed Implementation
[0039] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0040] To address the problems existing in the prior art, this invention provides a method for compensating the straight cutting trajectory of a laser-cut curved surface bevel.
[0041] Example 1
[0042] This invention discloses a method for compensating for the straight cutting trajectory of a laser-cut curved surface bevel, such as... Figure 1 ,include:
[0043] S100. Obtain the set of outer surfaces of the part; perform statistics on all surfaces in the part, first obtain the surface with the largest area, and then obtain the set of all surfaces in the part that are on the outer surface according to the tangency relationship between the surfaces;
[0044] Specifically, such as Figure 2 In S100 of this embodiment, all surfaces in the part are statistically analyzed. First, the surface with the largest area is obtained. Then, based on the tangency relationship between surfaces, the set of all surfaces in the part that are on the outer surface is obtained. The specific method includes:
[0045] S101. Establish a list of all surface sets; based on the OpenCASCADE library, perform surface traversal on the imported part model and store all surfaces of the part in the AllFacesList collection; specifically, OpenCASCADE Technology (OCCT) is a powerful geometric modeling library that provides a wide range of functions and tools for processing two-dimensional and three-dimensional geometric data. This library is based on the C++ programming language and employs an object-oriented design approach, enabling developers to build efficient and flexible geometric modeling applications. The OCCT library contains many functions for geometric processing, modeling, analysis, visualization, etc. The functions in the OpenCASCADE library include at least geometric object creation functions, Boolean operation functions, topology operation functions, shape analysis functions, visualization functions, and data import and export functions.
[0046] S102. Calculate the surface with the largest area; iterate through all faces in AllFacesList, calculate the area of each face based on the opencascade function library, compare the areas of all faces, and record the largest area as S_Max, and the surface corresponding to the largest area S_Max as Face_max; compare Face_max with the sizes of other faces, when there are multiple faces whose difference from the largest area is less than a preset threshold, calculate the distance from the origin of the coordinate system to each face, and take the face corresponding to the maximum distance as the updated surface with the largest area Face_max; in this embodiment, when there are multiple faces whose difference from the maximum area is less than 0.1mm, calculate the distance from the origin of the coordinate system to each face, and take the face corresponding to the maximum distance as Face_max. If there are multiple maximum distances, arbitrarily select one of them.
[0047] S103. Obtain the outer surface; First, establish two sets, namely the outer surface set OutFaceList and the other surface set OtherFaceList; Put Face_Max obtained in S102 into the set OutFaceList, and put the other faces except Face_Max into OtherFaceList; Traverse all faces in OtherFaceList and obtain the part's outer surface set according to the first preset rule.
[0048] In this embodiment, all faces in OtherFaceList are traversed, and the set of outer surfaces of the part is obtained according to a first preset rule. The first preset rule includes: when traversing the i-th face otherface_i in OtherFaceList, each face in OutFaceList is traversed one by one; when traversing the j-th face outface_j in OtherFaceList, it is determined whether outface_j is tangent to otherface_i; if there is a face outface_j in OutFaceList that is tangent to the current face otherface_i, it is determined that otherface_i also belongs to the outer surface; otherface_i is added to OutFaceList; otherface_i is removed from OtherFaceList; the above process of traversing OtherFaceList is repeated until there are no faces in OtherFaceList that can be added to OutFaceList.
[0049] S200. Obtain the set of bevel faces; traverse all sub-trajectories of the cutting contour, first count the face where each sub-trajectory is located, then distinguish the outer surface and the bevel face, and finally count all the bevel faces;
[0050] In S200 of this embodiment, all sub-trajectories of the cutting contour are traversed. First, the surfaces where each sub-trajectory segment is located are counted. Then, the outer surface and the bevel surface are distinguished. Finally, all bevel surfaces are counted. The specific method includes:
[0051] S201. Take three points on the current sub-trajectory: the starting point P_Sta, the ending point P_End, and the middle point P_Mid. Iterate through each face of all surfaces. When traversing the j-th face_j, calculate the distances from the starting point P_Sta, the ending point P_End, and the middle point P_Mid to face_j, denoted as D1, D2, and D3 respectively. If D1, D2, and D3 are all less than a preset threshold group, determine that the current sub-trajectory edge_i is on face_j. Specifically, in some preferred embodiments, when D1 < 0.01... mm If D2 < 0.01 mm and D3 < 0.01 mm, then edge_i is determined to be on face_j.
[0052] S202. Execute the loop in S201. When it is found that the number of faces where the current sub-trajectory edge_i is located is equal to 2, record them as face1_i and face2_i respectively. Determine whether face1_i and face2_i belong to the OutFace List respectively, remove the faces that belong to the OutFace List, and add the remaining faces to the GrooveFace List.
[0053] S300. Extract the inner contour corresponding to the cutting contour; traverse all sub-trajectories of the cutting contour, first determine the bevel surface to which the sub-trajectory belongs, then traverse all the edges of the bevel surface, and filter out the inner contour corresponding to the sub-trajectory by calculating the distance between each edge and the outer surface.
[0054] In step S300 of this embodiment, all sub-trajectories of the cutting contour are traversed. First, the bevel surface to which the sub-trajectory belongs is determined. Then, all edges of the bevel surface are traversed. The inner contour corresponding to the sub-trajectory is selected by calculating the distance between each edge and the outer surface. The specific method includes:
[0055] S301. Use the stitching function in the opencascade library to stitch all faces in the outer surface set OutFaceList in S100 into a complete outer surface OutFace_Sew;
[0056] S302. Create a two-dimensional dictionary Dict_List(face, ptlist). The dictionary is a list, and each element in the list contains a key face and a value ptlist. face represents a face in the set of bevel faces GrooveFaceList, and ptlist represents the set of discrete points of the inner contour corresponding to the face.
[0057] S303. Traverse all faces in the GrooveFaceList set of bevel faces obtained in S200 according to the second preset rule, and fill the two-dimensional dictionary Dict_List according to the traversal results;
[0058] S304. After traversing all faces in GrooveFaceList, connect the ptlist elements in all elements of Dict_List. The resulting shape is the inner contour corresponding to the contour to be cut.
[0059] In some preferred embodiments, all faces in the GrooveFaceList set of bevel faces obtained in S200 are traversed according to a second preset rule, the second preset rule including:
[0060] S3031. Use the edge extraction function in the opencascade library to extract all edges in each face, grooveface_i;
[0061] S3032. Calculate the distance from each edge in grooveface_i to OutFace_Sew using the distance function in the opencascade library, and store the edges with a distance greater than 0.5 times the part thickness into the inner contour trajectory list Iner_EdgeList.
[0062] S3033. Traverse all edges in Iner_EdgeList, use the discretization function to discretize all edges in Iner_EdgeList into columns of points and add them to the local point list local_ptlist;
[0063] S3034. Create a dictionary element Di(grooveface_i, local_ptlist) and add Di to the two-dimensional dictionary Dict_List.
[0064] S400. Traverse all sub-trajectories of the cutting contour, divide the sub-trajectories into straight lines and non-straight lines, calculate the feature point offsets of straight lines and non-straight lines respectively, and then perform offset compensation calculations on the straight line segments and non-straight line segments in the original cutting trajectory respectively, thereby realizing trajectory compensation.
[0065] The current cutting contour includes different sub-cutting trajectories such as straight lines, arcs, and splines. These sub-trajectories are divided into straight lines and non-straight lines for processing. Furthermore, the processing methods differ depending on whether the current contour is near or far from the origin. Specifically, in S400, all sub-trajectories of the cutting contour are traversed, and the feature point offsets of each sub-trajectory are calculated separately for straight and non-straight lines. Then, offset compensation calculations are performed on the straight and non-straight segments of the original cutting trajectory. The specific method includes: firstly, assigning a value to the end face identification parameter LorR based on whether the contour is near or far from the origin; when the current contour is near the origin, parameter LorR = 1; when the current contour is far from the origin, parameter LorR = -1.
[0066] Once the parameters are determined, each sub-cutting trajectory edge_i in the current contour is traversed, where i represents the i-th sub-trajectory. The starting point P_Sta_i and ending point P_End_i of edge_i are taken. The face set GrooveFaceList of the bevel is traversed. During the traversal of each bevel face grooveface_j, the distances from P_Sta_i and P_End_i to grooveface_j are calculated and denoted as d1 and d2, respectively. When d1 and d2 meet the preset threshold group, the sub-trajectory edge_i is determined to be on the bevel face grooveface_j, and the current face grooveface_j is recorded as a valid surface. In some preferred embodiments, when d1 < 0.01 mm and d2 < 0.01 mm, the sub-trajectory edge_i is determined to be on the bevel face grooveface_j, and the current face grooveface_j is recorded as a valid surface.
[0067] After the valid surface is obtained, the type of the current sub-trajectory is determined. If the current sub-trajectory type is a straight line, the value ptlist corresponding to grooveface_j is found in the dictionary Dict_List. All points in ptlist are traversed, and the distances to P_Sta_i and P_End_i are calculated respectively. The point corresponding to the minimum distance is recorded as the corresponding offset point P_Sta_i_offset and P_End_i_offset. The offsets Offset_Sta and Offset_End at the start and end points are calculated respectively. The start and end points of the straight line are offset to form a new straight line. The specific judgment method includes: when Offset_Sta*LorR<0, the start point is moved along the X direction by Offset_Sta; otherwise, the start point remains unchanged. When Offset_End*LorR<0, the end point is moved along the X direction by Offset_End; otherwise, the end point remains unchanged.
[0068] In some preferred embodiments, when the current sub-trajectory type is non-linear, the sub-trajectory is discretized using the discretization function in the opencascade function library to obtain a list of discrete points. Each point Pt_j in each point list is traversed, and the offset Offset_j of each point is calculated according to the processing method of the starting point of the straight line. When Offset_j*LorR>0, Offset_j=0; when Offset_j*LorR<0, each discrete point of the sub-trajectory is offset by Offset_j along the X direction. Then, the fitting function in the opencascade function library is used to refit all the offset discrete points into a new spline.
[0069] This embodiment discloses a method for straight-cut trajectory compensation of laser-cut curved surface bevel, including: S100. Obtaining the set of outer surfaces of the part; statistically analyzing all surfaces in the part, first obtaining the surface with the largest area, and then obtaining the set of all surfaces on the outer surface of the part according to the tangency relationship between surfaces; S200. Obtaining the set of bevel surfaces; traversing all sub-trajectories of the cutting contour, first counting the surface where each sub-trajectory segment is located, then distinguishing the outer surface and the bevel surface, and finally counting all bevel surfaces; S300. Extracting the inner contour corresponding to the cutting contour; traversing all sub-trajectories of the cutting contour, first determining the bevel surface to which the sub-trajectory belongs, then traversing all edges of the bevel surface, and filtering out the inner contour corresponding to the sub-trajectory by calculating the distance between each edge and the outer surface; S400. Traversing all sub-trajectories of the cutting contour, dividing the sub-trajectories into straight lines and non-straight lines, calculating the feature point offsets of the straight lines and non-straight lines respectively, and then performing offset compensation calculations on the straight lines and non-straight lines in the original cutting trajectory respectively, thereby achieving trajectory compensation. This invention solves the problem in the prior art that four-axis laser tube cutting equipment cannot perform bevel cutting when encountering curved surface bevel cutting.
[0070] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.
[0071] In the detailed description above, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than are explicitly stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features in a single disclosed embodiment. Therefore, the appended claims are hereby explicitly incorporated into the detailed description, with each claim representing a separate preferred embodiment of the invention.
[0072] Those skilled in the art will also understand that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments herein can be implemented as electronic hardware, computer software, or a combination thereof. To clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art can implement the described functionality in alternative ways for each specific application; however, such implementation decisions should not be construed as departing from the scope of this disclosure.
[0073] The steps of the methods or algorithms described in conjunction with the embodiments herein can be directly embodied in hardware, software modules executed by a processor, or a combination thereof. The software modules can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in a user terminal. Alternatively, the processor and storage medium can exist as discrete components in the user terminal.
[0074] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. This software code can be stored in memory units and executed by a processor. The memory units can be implemented within the processor or outside the processor; in the latter case, they are communicatively coupled to the processor via various means, as is well known in the art.
[0075] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is interpreted in a manner similar to the term "including," as interpreted when used as a conjunction in the claims. Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."
Claims
1. A method for compensating the straight cutting trajectory of a laser-cut curved surface bevel, characterized in that, include: S100. Obtain the set of outer surfaces of the part; perform statistics on all surfaces in the part, first obtain the surface with the largest area, and then obtain the set of all surfaces in the part that are on the outer surface according to the tangency relationship between the surfaces; In S100, all surfaces in the part are statistically analyzed. First, the surface with the largest area is obtained. Then, based on the tangency relationship between surfaces, the set of all surfaces in the part that are on the outer surface is obtained. The specific method includes: S101. Create a list of all surface sets; based on the opencascade function library, perform surface traversal on the imported part model and store all surfaces of the part in the AllFacesList collection; S102. Calculate the surface with the largest area; Iterate through all faces in AllFacesList, calculate the area of each face based on the opencascade function library, compare the areas of all faces, and record the largest area as S_Max, and the surface corresponding to the largest area S_Max as Face_max; Compare Face_max with the sizes of other faces, and when there are multiple faces whose differences from the largest area are less than a preset threshold, calculate the distance from the origin of the coordinate system to each face, and take the face corresponding to the largest distance as the updated surface with the largest area Face_max; S103. Obtain the outer surface; First, establish two sets, namely the outer surface set OutFaceList and the other surface set OtherFaceList; Put the Face_Max obtained in S102 into the set OutFaceList, and put the other faces except Face_Max into OtherFaceList; Traverse all faces in OtherFaceList and obtain the part's outer surface set according to the first preset rule; Traverse all faces in OtherFaceList and obtain the set of outer surfaces of the part according to a first preset rule. The first preset rule includes: when traversing the i-th face otherface_i in OtherFaceList, traverse each face in OutFaceList one by one; when traversing the j-th face outface_j in OtherFaceList, determine whether outface_j is tangent to otherface_i; if there is a face outface_j in OutFaceList that is tangent to the current face otherface_i, then determine that otherface_i also belongs to the outer surface; add otherface_i to OutFaceList; remove otherface_i from OtherFaceList; repeat the above process of traversing OtherFaceList until there are no faces in OtherFaceList that can be added to OutFaceList. S200. Obtain the set of bevel faces; traverse all sub-trajectories of the cutting contour, first count the face where each sub-trajectory is located, then distinguish the outer surface and the bevel face, and finally count all the bevel faces; S300. Extract the inner contour corresponding to the cutting contour; traverse all sub-trajectories of the cutting contour, first determine the bevel surface to which the sub-trajectory belongs, then traverse all the edges of the bevel surface, and filter out the inner contour corresponding to the sub-trajectory by calculating the distance between each edge and the outer surface. S400. Traverse all sub-trajectories of the cutting contour, divide the sub-trajectories into straight lines and non-straight lines, calculate the feature point offsets of straight lines and non-straight lines respectively, and then perform offset compensation calculations on the straight line segments and non-straight line segments in the original cutting trajectory respectively, thereby realizing trajectory compensation.
2. The method for compensating the straight cutting trajectory of a laser-cut curved surface bevel as described in claim 1, characterized in that, In S200, all sub-trajectories of the cutting contour are traversed. First, the faces containing each sub-trajectory segment are counted. Then, the outer surface and the bevel face are distinguished. Finally, all bevel faces are counted. The specific method includes: S201. Take three points on the current sub-trajectory, namely the starting point P_Sta, the ending point P_End, and the middle point P_Mid; traverse each face of all surfaces one by one. When traversing the j-th face face_j, calculate the distances from the three points P_Sta, P_End, and P_Mid to face_j, and denot them as D1, D2, and D3 respectively. When D1, D2, and D3 are all less than a preset threshold group, determine that the current sub-trajectory edge_i is on face_j. S202. Execute the loop in S201. When it is found that the number of faces where the current sub-trajectory edge_i is located is equal to 2, record them as face1_i and face2_i respectively. Determine whether face1_i and face2_i belong to the OutFace List respectively, remove the faces that belong to the OutFace List, and add the remaining faces to the GrooveFace List.
3. The method for compensating the straight cutting trajectory of a laser-cut curved surface bevel as described in claim 1, characterized in that, In S300, all sub-trajectories of the cutting contour are traversed. First, the bevel surface to which the sub-trajectory belongs is determined. Then, all edges of the bevel surface are traversed. The inner contour corresponding to the sub-trajectory is selected by calculating the distance between each edge and the outer surface. The specific method includes: S301. Use the stitching function in the opencascade library to stitch all faces in the outer surface set OutFaceList in S100 into a complete outer surface OutFace_Sew; S302. Create a two-dimensional dictionary Dict_List(face, ptlist). The dictionary is a list, and each element in the list contains a key face and a value ptlist. face represents a face in the set of bevel faces GrooveFaceList, and ptlist represents the set of discrete points of the inner contour corresponding to the face. S303. Traverse all faces in the GrooveFaceList set of bevel faces obtained in S200 according to the second preset rule, and fill the two-dimensional dictionary Dict_List according to the traversal results; S304. After traversing all faces in GrooveFaceList, connect the ptlist elements in all elements of Dict_List. The resulting shape is the inner contour corresponding to the contour to be cut.
4. The method for compensating the straight cutting trajectory of a laser-cut curved surface bevel as described in claim 3, characterized in that, In S303, all faces in the GrooveFaceList set of bevel faces obtained in S200 are traversed according to the second preset rule, which includes: S3031. Use the edge extraction function in the opencascade library to extract all edges in each face, grooveface_i; S3032. Calculate the distance from each edge in grooveface_i to OutFace_Sew using the distance function in the opencascade library, and store the edges with a distance greater than 0.5 times the part thickness into the inner contour trajectory list Iner_EdgeList; S3033. Traverse all edges in Iner_EdgeList, use the discretization function to discretize all edges in Iner_EdgeList into columns of points and add them to the local point list local_ptlist; S3034. Create a dictionary element Di(grooveface_i, local_ptlist) and add Di to the two-dimensional dictionary Dict_List.
5. The method for compensating the straight cutting trajectory of a laser-cut curved surface bevel as described in claim 1, characterized in that, In S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The feature point offsets of each sub-trajectory are calculated separately. Then, offset compensation calculations are performed on the straight line segments and non-straight line segments in the original cutting trajectory. The specific method includes: first, assigning a value to the end face identification parameter LorR according to whether the contour belongs to the near origin end or the far origin end. When the current contour belongs to the near origin end, the parameter LorR is set to 1; when the current contour belongs to the far origin end, the parameter LorR is set to -1.
6. The method for compensating the straight cutting trajectory of a laser-cut curved surface bevel as described in claim 3, characterized in that, In S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The feature point offsets of each sub-trajectories are calculated separately. Then, offset compensation calculations are performed on the straight lines and non-straight lines in the original cutting trajectory. The specific method also includes: traversing each sub-cutting trajectory edge_i in the current contour, where i represents the i-th sub-trajectory, taking the starting point P_Sta_i and the ending point P_End_i of edge_i, traversing the face set GrooveFaceList of the bevel, and calculating the distances from P_Sta_i and P_End_i to grooveface_j during the traversal of each groove face grooveface_j, and recording them as d1 and d2 respectively; when d1 and d2 meet the preset threshold group, it is determined that the sub-trajectory edge_i is on the groove face grooveface_j, and the current face grooveface_j is recorded as a valid surface.
7. The method for compensating the straight cutting trajectory of a laser-cut curved surface bevel as described in claim 6, characterized in that, In S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The feature point offsets of each sub-trajectory are calculated separately. Then, offset compensation calculations are performed on the straight line segments and non-straight line segments in the original cutting trajectory. The specific method also includes: determining the type of the current sub-trajectory. When the current sub-trajectory type is a straight line, the value ptlist corresponding to grooveface_j is found in the dictionary Dict_List. All points in ptlist are traversed, and the distances to P_Sta_i and P_End_i are calculated respectively. The point corresponding to the minimum distance is recorded as the corresponding offset point P_Sta_i_offset and P_End_i_offset. The offsets Offset_Sta and Offset_End at the start and end points are calculated respectively. The start and end points of the straight line are offset to form a new straight line. The specific judgment method includes: when Offset_Sta*LorR<0, the start point is moved along the X direction by Offset_Sta; otherwise, the start point remains unchanged. When Offset_End*LorR<0, the end point is moved along the X direction by Offset_End; otherwise, the end point remains unchanged.
8. The method for compensating the straight cutting trajectory of a laser-cut curved surface bevel as described in claim 6, characterized in that, In S400, all sub-trajectories of the cutting contour are traversed, and the sub-trajectories are divided into straight lines and non-straight lines. The offset of each feature point is calculated separately. Then, offset compensation calculations are performed on the straight line segments and non-straight line segments in the original cutting trajectory. The specific method also includes: determining the type of the current sub-trajectory. When the current sub-trajectory type is non-straight line, the sub-trajectory is discretized using the discrete function in the opencascade function library to obtain a list of discrete points. Each point Pt_j in each point list is traversed, and the offset Offset_j of each point is calculated according to the processing method of the starting point of the straight line. When Offset_j*LorR>0, Offset_j=0; when Offset_j*LorR<0, each discrete point of the sub-trajectory is offset by Offset_j along the X direction. Then, the fitting function in the opencascade function library is used to refit all the offset discrete points into a new spline.
Citation Information
Patent Citations
Tube manufacturing history information management method and device, and manufacturing method using the management method
CN101454104A
Tube-tube connection saddle surface welding and incising method
CN101458508A