Three-dimensional pipe surface contour interference detection method and system

By using dynamic mesh generation and an improved GJK algorithm, the efficiency and adaptability issues of complex contour interference detection in 3D tube laser cutting are solved, achieving efficient and accurate contour interference judgment. It is applicable to the detection of complex structures and non-closed contours, improving processing efficiency and safety.

CN121032896AActive Publication Date: 2025-11-28NANJING CHAOYING NEW ENERGY TECH CO LTD +1

Patent Information

Application Number
CN202510952085.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-11-28
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

In the current technology of three-dimensional tube laser cutting, traditional geometric detection methods are inefficient when dealing with complex multi-target batch interference detection, and cannot effectively identify interference in complex structural contours, resulting in repeated cutting, material waste and safety hazards.

Method used

Contour interference detection is performed using dynamic mesh generation and an improved GJK algorithm. The dynamic mesh generation mechanism reduces the number of invalid detections, and the ear-cutting method is used to transform concave contours into convex contours. Combined with the search direction guided by the geometric center, efficient interference judgment is achieved.

Benefits of technology

It significantly improves the efficiency and adaptability of contour interference detection, reduces false positives and false negatives, ensures detection accuracy and system response capability, and is suitable for interference determination of complex structures and non-closed contours, meeting the real-time needs of industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121032896A_ABST
    Figure CN121032896A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional pipe surface contour interference detection method and system, which are suitable for interference identification and screening of complex contours in a laser pipe cutting and nesting process. The method comprises the steps that the surface of a three-dimensional pipe is unfolded into a two-dimensional plane; a dynamic grid division structure is constructed based on the median of the contour size, and space region division and contour mapping are achieved; the contour retrieval efficiency is optimized through a Hash index and condition triggering type grid reconstruction mechanism; an improved GJK algorithm is adopted to carry out interference judgment on any contour pair, the algorithm supports dynamic decomposition of a concave contour through an ear cutting method, a virtual closed edge is constructed for a non-closed contour to participate in detection, meanwhile, a contour geometric center is utilized to guide search direction initialization, and convergence efficiency is improved. The method can quickly and accurately detect the interference relationship among multiple types of three-dimensional contours, has the advantages of high adaptability, high operation efficiency, reliable detection result and the like, and is suitable for scenes such as automatic laser cutting path planning and drawing preprocessing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of laser cutting, and particularly relates to a three-dimensional pipe surface profile interference detection method and system, which is particularly suitable for profile nesting detection and interference screening in the process of pipe laser cutting. BACKGROUND

[0002] With the wide application of advanced manufacturing technologies such as laser processing and three-dimensional modeling, pipe laser cutting has gradually become an important means for efficient forming of metal components. In actual production, complex special-shaped pipe fittings often need to be arranged according to CAD drawings for multi-hole profile arrangement to achieve accurate machining. However, during the drawing generation and process arrangement stage, geometric overlap or coincidence interference may occur between multiple profiles, i.e., there is a potential path conflict. Such interference not only affects the accuracy of the cutting path and the stability of the equipment operation, but also may cause repeated cutting, material waste, and even local heat accumulation and structural deformation in the cutting area, thereby causing serious process safety hazards. Therefore, how to accurately determine the interference between profiles before drawing generation and path planning has become a key link to improve processing efficiency and quality control.

[0003] The current mainstream approach in the industry relies on discrete grid processing of three-dimensional models, followed by Boolean operation or face intersection calculation to identify potential geometric interference relationships. Although this method has certain universality and geometric expression ability, it faces significant efficiency bottlenecks in high-complexity, multi-target batch interference detection scenarios. On the one hand, as a computationally intensive process in geometric processing, the complexity of Boolean operation increases rapidly with the increase in the number of profiles and the number of face patches, resulting in a significant increase in overall detection time, which cannot meet the real-time and industrial automatic nesting requirements. On the other hand, when using the method of projecting three-dimensional models into two-dimensional development drawings, the traditional fixed grid division strategy often shows problems of insufficient resolution or redundant calculation due to the varying profile sizes and densities, reducing the overall accuracy of the judgment and the response ability of the system. In addition, when dealing with complex structural profiles, irregular boundaries, or non-closed graphics, the adaptability and stability of existing detection methods also have obvious shortcomings. For example, when facing special concave profiles or open path profiles, traditional geometric detection algorithms based on convexity assumption will no longer be applicable, or a large amount of preprocessing and correction work is required to run, which severely restricts the generalization ability and engineering deployment efficiency of the algorithm.

[0004] Therefore, it is an important technical requirement to build a three-dimensional pipe profile interference detection technology system that has both high efficiency and high adaptability to improve the automation and intelligent level of pipe processing. Especially in the laser pipe nesting process, how to quickly complete the interference screening of large-scale profiles is particularly critical. SUMMARY

[0005] To address the aforementioned technical problems, this invention provides a method and system for detecting interference on the surface contour of three-dimensional pipes. This system can support the rapid processing of large-scale contour data and is compatible with the interference judgment requirements of concave and non-closed structures, providing key support for high-quality cutting and processing of complex three-dimensional pipes.

[0006] Specifically, the technical solution provided by this invention is as follows: A three-dimensional pipe surface profile interference detection method includes the following steps: S1. Obtain the three-dimensional contour information of the machined holes on the surface of the pipe, including the set of discrete contour points and their coordinates; S2. Map the discrete point group of the contour and its coordinates to a two-dimensional plane to obtain the corresponding two-dimensional contour information; S3. Mesh the two-dimensional plane and determine the range of the mesh cells covered by each two-dimensional contour; S4. Based on the GJK algorithm, perform interference detection on contours whose coverage area contains the same or adjacent grid cells.

[0007] Furthermore, in step S2: In the three-dimensional space XYZ, assuming the length direction of a horizontally placed pipe is the Y-axis, the vertical direction is the X-axis, and the Z-axis is perpendicular to the XY plane, then the cross-sections at different length positions of the pipe all lie within the XZ plane and are all single, fixed closed curves. Now, suppose the pipe surface is cut along a baseline parallel to the Y-axis and spread into the two-dimensional plane xy. Let the x-coordinate value of each point on the baseline in the xy plane be 0, and the y-coordinate value of each point on the baseline in the xy plane be consistent with its Y-axis coordinate in the XY plane. Then, for the spatial points in the discrete point set of the three-dimensional contour of the machined hole... Calculate its in The closed curve of the pipe section at the point of connection to the baseline The length of the arc at the point is taken as... The x-coordinate values ​​mapped to the xy-plane, while the y-axis coordinate values ​​remain unchanged. constant.

[0008] Furthermore, step S3 employs a dynamic mesh generation method, including the following steps: S301. Determine the grid cell size. Extract the bounding box of each 2D contour, and use the median of the bounding box's length and height as the length of the mesh cell. Gw and height Gh The plane containing each two-dimensional contour is divided into several grid units according to rows and columns; S302. Calculate the mesh cell coverage area of ​​each contour. Line range: ~ Column range: ~ , wherein, x min , y min , x max , y max are the minimum and maximum values of the x and y coordinates of the circumscribed bounding box of the contour, respectively, and denote the floor and ceiling functions, respectively; saving the correspondence between each contour and the grid cells it covers; S303, dynamic grid triggering reconstruction When a new contour appears, if the size of the circumscribed bounding box of the new contour is greater than the length and width threshold of the current grid cell, the grid reconstruction is triggered, the correspondence between the original contour and the grid cell is emptied, the grid cell is re-divided according to step S301, and the correspondence is re-determined according to step S302.

[0009] Preferably, in step S302, the correspondence between each contour and the grid cell it covers is stored based on the hash index: the row and column coordinates of the grid cell are encoded as a hash key value, and the corresponding contour ID is stored in the hash table index position corresponding to the key value pair.

[0010] Further, in step S4, the ear cutting method is used to convert the concave contour to a convex contour supported by the GJK algorithm, including: S401, a group of contour discrete points mapped to a two-dimensional plane , judging the concave-convex property point by point For contour point , the predecessor edge vector, the successor edge vector and the cross product are calculated respectively: Predecessor edge vector: , Successor edge vector: , Cross product: cross= , If the contour is counterclockwise and cross<0, or clockwise and cross>0, then is a concave vertex; Iterate through all the contour points in the group of contour discrete points to generate a list of concave vertices; S402, dynamic decomposition by ear cutting method Ear tip selection: select the point closest to the center of the contour bounding box from the list of concave vertices as the initial ear tip ; Ear triangle cutting: for the selected ear tip , cut the triangle composed of its predecessor vertex 、 successive vertex ear triangle, if the triangle is valid, i.e. no other vertex is inside the triangle and the area of the triangle is less than a threshold, and the triangle is taken as a sub-contour, 、 、 contour points of the sub-contour, and the ear vertex is removed from the list of concave vertices ; otherwise, the next concave vertex is selected from the list of concave vertices as an ear vertex, and the cutting process is repeated until the remaining contour is a convex polygon, and the remaining contour is also taken as a sub-contour; S403, respectively, each sub-contour and the target contour are subjected to GJK interference detection, and if none of them interferes, it indicates that the two-dimensional contour before decomposition does not interfere with the target contour.

[0011] Preferably, the sub-contours after dynamic ear decomposition are stored in a tree structure, the root node stores the two-dimensional contour before decomposition, and the child nodes store the sub-contours; when interference detection is performed, the tree nodes are traversed, and there is no need to re-decompose.

[0012] Further, in step S4, when the two contours are subjected to interference detection by using the GJK algorithm, the direction of the geometric center vector of the two contours is taken as the initial search direction of the GJK algorithm: , represents the initial search direction, C A and C B are the geometric center coordinates of the two contours A and B to be detected, and the geometric center coordinates of the contour are equal to the average of the coordinates of each contour point in the three groups of discrete contour points of the contour.

[0013] Preferably, the three-dimensional contour discrete point groups and their coordinates of the machining holes are obtained from the pipe model by calling the OCCT library; for each row or column of machining holes of the same type of pipe surface, the three-dimensional contour discrete point group and its coordinates of the first machining hole are saved, and only the position offset of the subsequent machining holes of the same type of contour relative to the first machining hole is saved.

[0014] A pipe surface contour interference detection system based on the above method comprises the following modules: a contour information acquisition module for acquiring the contour discrete point groups and their coordinates of the machining holes on the pipe surface; a two-dimensional contour mapping module for mapping the three-dimensional contour discrete point groups and their coordinates to a two-dimensional plane to obtain the corresponding two-dimensional contour discrete point groups and their coordinates; a dynamic grid division module for dividing the plane containing each two-dimensional contour into a plurality of grid cells according to rows and columns, and determining the correspondence between each contour and the grid cells covered thereby; The interference detection module is used to perform interference detection on contours whose coverage area contains the same or adjacent grid cells.

[0015] Furthermore, the interference detection module also includes a dynamic ear-cutting module and a GJK detection module. The dynamic ear-cutting module uses the ear-cutting method to transform the concave contour into a convex contour supported by the GJK algorithm. The GJK detection module uses the GJK algorithm to perform interference detection on the two contours to be detected.

[0016] Compared with existing technologies, this invention demonstrates significant efficiency advantages and improved adaptability in three-dimensional pipe surface contour interference detection. Traditional detection methods generally rely on fixed mesh generation and global intersection strategies based on Boolean operations. These methods not only face problems such as high computational complexity and long response delays when processing large-scale contours, but also frequently result in false positives and false negatives when encountering contours with large size differences or complex geometric structures, severely restricting the intelligence and efficiency of automated processing. In contrast, this invention introduces a dynamic mesh generation mechanism based on the median of contour dimensions. This not only significantly reduces the number of invalid detections but also effectively avoids spatial configuration contradictions caused by fixed meshes, such as small contours being scattered or large contours spanning the mesh. Thus, it achieves precise spatial matching of contours and a simultaneous improvement in detection efficiency.

[0017] Meanwhile, this invention addresses the interference determination problem of complex structural contours, especially concave and non-closed contours, by proposing an improved GJK (Gilbert-Johnson-Keerthi) algorithm. By introducing an efficient ear-cut decomposition method, a virtual edge closure strategy, and an initialization mechanism guided by the geometric center, this algorithm not only significantly expands the applicability of the GJK method to multiple contour types but also significantly improves the overall judgment speed and iterative convergence efficiency while maintaining computational stability. Especially in laser tube cutting applications where irregular contour structures frequently occur, traditional algorithms are incompatible or prone to misjudgment. This invention, through targeted optimization of the data structure and search logic, fully ensures a balance between detection accuracy and system adaptability.

[0018] Furthermore, the hash-index-based grid storage structure and condition-triggered dynamic reconstruction mechanism not only enable rapid localization and screening of interference profiles but also avoid the global reconstruction overhead caused by data updates, greatly enhancing the system's processing capability in real-time update tasks in actual processing environments. Therefore, the method and system provided by this invention can effectively improve the accuracy, efficiency, and scalability of profile interference detection under highly complex and variable working conditions, demonstrating promising industrial application prospects and widespread value. Attached Figure Description

[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0020] Figure 1 This is a schematic diagram of the interference detection method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the outline of a three-dimensional pipe surface machining hole provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the module composition of an interference detection system provided in an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative effort are all within the scope of protection of the present invention.

[0022] Example 1 This embodiment provides a three-dimensional pipe surface contour interference detection method, such as... Figure 1 As shown, the method mainly includes processes such as contour data acquisition, two-dimensional mapping, dynamic mesh generation, and interference detection.

[0023] 1. Acquisition of 3D contour information like Figure 2 As shown, during the drawing generation stage of tube laser cutting, several machining holes must be arranged on the tube surface according to customer requirements. Each type of machining hole is arranged horizontally or vertically. Before cutting production, the arranged machining holes need to be checked for interference to ensure that there are no intersecting hole outlines.

[0024] To obtain and save the 3D contour information of machined holes on the pipe surface, the GCPnts_TangentialDeflection method of the OCCT (Open CASCADE Technology) library can be used to obtain the discrete point set of the 3D contour of the machined holes and their coordinates from the pipe model. For each row or column of machined holes of the same type, to save memory consumption, only the discrete point set of the 3D contour of the first machined hole and its coordinates can be saved. For the contours of subsequent machined holes of the same type, only their positional offset relative to the first machined hole needs to be saved.

[0025] 2. Two-dimensional mapping of contour information Since interference detection in three-dimensional space is computationally complex and inefficient, this embodiment maps the three-dimensional contour information of the pipe surface to a two-dimensional plane, which is equivalent to cutting the three-dimensional pipe from the side and spreading it into a plane, thereby achieving rapid contour interference detection in two-dimensional space.

[0026] In three-dimensional space, assuming the length direction of a horizontally placed pipe is the Y-axis, the vertical direction is the X-axis, and the Z-axis is perpendicular to the XY plane, then the cross-sections at different length positions of the pipe are all located in the XZ plane, and are all single fixed closed curves. The length of the closed curve is the circumference of the pipe.

[0027] Now, suppose the pipe surface is cut along a baseline parallel to the Y-axis and laid out into the XY plane. Let the X-axis coordinate of each point on the baseline in the XY plane be 0, and the Y-axis coordinate of each point on the baseline in the XY plane be consistent with its Y-axis coordinate in the XY plane. Then, for the spatial points in the discrete set of three-dimensional contours of the machined hole... Calculate its in The closed curve of the pipe section at the point of connection to the baseline The length of the arc at the point is taken as... The x-axis coordinates are mapped to the xy-plane, while the y-axis coordinates remain unchanged. The process remains unchanged. Using the method described above, the discrete point set representing the three-dimensional contour of the machined hole can be mapped one by one onto a two-dimensional plane. In some embodiments, the calculated arc length can be normalized using the perimeter of the closed curve of the cross-section.

[0028] 3. Dynamic mesh generation After mapping to a two-dimensional plane, it is only necessary to determine whether there is interference between the target contour and its neighboring contours, without having to traverse all contours one by one. The determination of neighboring contours can be combined with mesh generation, that is, the two-dimensional plane is divided into meshes, and contours located within adjacent meshes need to be checked for interference. In this embodiment, dynamic mesh generation is used, which, compared with traditional fixed mesh units, can avoid the problems of small contours being scattered and large contours crossing meshes, ensuring that the vast majority of contours are covered by a single mesh, further reducing the number of interference detections and the probability of false positives.

[0029] Specifically, dynamic mesh generation includes the following steps: ① Initialize mesh size Extract the bounding boxes of all contours to be detected. Use the median of the bounding box's length and height as the length and height of the grid cell, assuming they are respectively... Gw and Gh .

[0030] ② The outline corresponds to the mesh unit. Calculate the mesh coverage area of ​​the bounding box for each contour in the 2D plane: Row range: ~ Column range: ~ ,in, x min , y min , x max , y max These are the minimum and maximum x and y coordinates of the bounding box, respectively. and These represent rounding down and rounding up, respectively. The identity code ID of each contour is matched with the grid cell it covers. For example, if the bounding box of contour 001 covers a grid interval with rows ranging from 1 to 3 and columns ranging from 2 to 5, then contour 001 corresponds to the grid cell in rows 1 to 3 and columns 2 to 5.

[0031] ③ Dynamic mesh-triggered reconstruction When a new contour appears, if the bounding box size of the new contour is greater than the length and width threshold of the current grid cell, for example, if the length of the bounding box of the new contour is greater than twice the length of the current grid cell or the width of the bounding box is greater than twice the width of the current grid cell, then the grid reconstruction is triggered, the original correspondence between the contour and the grid cell is cleared, the grid cells are re-divided according to step ①, and the correspondence is re-determined according to step ②.

[0032] ④ Storage of grid correspondence The row and column coordinates of the grid cells are encoded as hash keys, and the corresponding contour ID is stored in the hash table index position corresponding to the key value. For example, the grid cells... The encoding is key value .

[0033] 4. Contour detection based on the improved GJK algorithm The GJK algorithm is an algorithm used to determine whether two convex polygons intersect. It determines whether they intersect by calculating the distance between the Minkowski difference of the two polygons and the origin. For example, for two convex polygons A and B, the Minkowski difference C is defined as: If C contains the origin, then A and B intersect; otherwise, they do not intersect.

[0034] The GJK algorithm approximates the point closest to the origin in polygon C by constructing a simplex. Starting from an initial direction, the algorithm calculates the support point along that direction and adds it to the simplex. Then, the algorithm updates the search direction based on the relationship between the current simplex and the origin, and continues iterating until a simplex containing the origin is found or it is determined that the two polygons do not intersect. In simple terms, given two polygons A and B, and an initial iteration direction, the GJK algorithm iteratively constructs and updates the simplex, determining whether the simplex contains the origin. If it does, the two polygons intersect; otherwise, they do not. Since the GJK algorithm is existing technology, its specific principles and implementation steps will not be elaborated here.

[0035] However, the traditional GJK algorithm only supports convex shapes, and its search direction initialization efficiency is low. Therefore, this embodiment improves the traditional GJK algorithm and applies it to contour interference detection in this scenario.

[0036] (1) Dynamic decomposition of concave contour Ear clipping is used to transform concave contours into convex contours supported by GJK. In this embodiment, when selecting concave vertices, the vertices closest to the center of the bounding box are prioritized to reduce the number of subsequent decompositions. At the same time, when verifying valid ears, ray tracing and area thresholding are used to quickly eliminate invalid ears, thus optimizing the efficiency of concave contour decomposition.

[0037] ① Determining the concavity and convexity of vertices For the discrete point set of the contour mapped to the two-dimensional plane Determine its concavity and convexity point by point: For contour points Calculate the predecessor edge vector, successor edge vector, and cross product of each: Predecessor edge vector: , Rear driver edge vector: , Cross product: cross= , If the contour is counterclockwise and cross < 0, or clockwise and cross > 0, then It is a concave vertex.

[0038] Iterate through all points in the discrete point group of the contour to generate a list of concave vertices.

[0039] ② Dynamic decomposition of ear incision method Ear tip selection rule: From the list of concave vertices, select the point closest to the center of the bounding box as the initial ear tip. Distance formula: , ( () is the center of the bounding box.

[0040] Triangular cut of the ear: for the selected ear apex point Cutting from its predecessor vertex , Successor vertices The triangle formed is quickly checked using the ray casting method to determine if there are no other vertices within the triangle and if the triangle's area is less than a set threshold, in order to verify the validity of the ear feature. If invalid, the next candidate concave vertex is selected; if valid, the triangle is used as a sub-contour. , , These are the contour points that constitute the sub-contour.

[0041] Recursive decomposition: Remove valid ear apex points from the list of concave vertices Repeat the above decomposition process until the remaining contour is a convex polygon.

[0042] ③ Tree-based storage The decomposed convex sub-contours are stored in a tree structure, with the root node representing the original contour and the child nodes representing the recursively generated convex parts. During interferometry detection, only the tree nodes need to be traversed, without the need for re-decomposition.

[0043] (2) Search direction guidance initialization Traditional GJK algorithms typically use random directions during iteration initialization, leading to highly unstable convergence speeds. For two separate, non-interfering contours, multiple iterations are required to determine the separation axis. This embodiment uses the geometric center vectors of the two contours as the initial search direction: , Indicates the initial search direction. C A and C B Let A and B be the geometric center coordinates of the two contours to be detected. The geometric center coordinates of a contour are equal to the average coordinates of the contour points in the three discrete sets of the contour. For adjacent contours, the direction of the center line is close to the true interference direction. For separated contours, the separation axis can be quickly located.

[0044] Example 2 Based on the above method, this embodiment provides a three-dimensional pipe surface contour interference detection system, such as... Figure 3 As shown, the system mainly includes the following modules: The contour information acquisition module is used to acquire the discrete point set of the contour of the machined hole on the pipe surface and its coordinates; The 2D contour mapping module is used to map a set of discrete points and their coordinates of a 3D contour to a 2D plane, and obtain the corresponding set of discrete points and their coordinates of the 2D contour. The dynamic mesh generation module is used to divide a plane containing each two-dimensional contour into several mesh units according to rows and columns, and to determine the correspondence between each contour and the mesh units it covers. The interference detection module is used to perform interference detection on contours whose coverage area contains the same or adjacent grid cells.

[0045] The interference detection module further includes a dynamic ear-cutting module and a GJK detection module. The dynamic ear-cutting module uses the ear-cutting method to transform the concave contour into a convex contour supported by the GJK algorithm. The GJK detection module uses the GJK algorithm to perform interference detection on the two contours to be detected.

[0046] The above system can execute the pipe surface contour interference detection method described in Embodiment 1, and has the corresponding functional modules and beneficial effects of the method. For technical details not described in detail in this embodiment, please refer to the pipe surface contour interference detection method provided in Embodiment 1 of the present invention.

[0047] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0048] In a nesting diagram containing 300 sets of contours and with a pipe length of 2000mm and an irregular closed curve in the circumferential cross section, the present invention takes significantly less time than the traditional Boolean operation method in completing the entire process of two-dimensional mapping unfolding, mesh construction and interference detection. The detection accuracy remains above 99%, and the system maintains a fast response when dynamically adjusting the contour drawing, verifying its high practicality and real-time advantages in industrial nesting.

[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A three-dimensional pipe surface contour interference detection method, characterized in that, Including the following steps: S1. Obtain the three-dimensional contour information of the machined holes on the surface of the pipe, including the set of discrete contour points and their coordinates; S2. Map the discrete point group of the contour and its coordinates to a two-dimensional plane to obtain the corresponding two-dimensional contour information; S3. Mesh the two-dimensional plane and determine the range of the mesh cells covered by each two-dimensional contour; S4. Based on the GJK algorithm, perform interference detection on contours whose coverage area contains the same or adjacent grid cells.

2. The pipe surface contour interference detection method as described in claim 1, characterized in that, In step S2: In the three-dimensional space XYZ, assuming the length direction of a horizontally placed pipe is the Y-axis, the vertical direction is the X-axis, and the Z-axis is perpendicular to the XY plane, then the cross-sections at different length positions of the pipe all lie within the XZ plane and are all single, fixed closed curves. Now, suppose the pipe surface is cut along a baseline parallel to the Y-axis and spread into the two-dimensional plane xy. Let the x-coordinate value of each point on the baseline in the xy plane be 0, and the y-coordinate value of each point on the baseline in the xy plane be consistent with its Y-axis coordinate in the XY plane. Then, for the spatial points in the discrete point set of the three-dimensional contour of the machined hole... Calculate its in The closed curve of the pipe section at the point of connection to the baseline The length of the arc at the point is taken as... The x-coordinate values ​​mapped to the xy-plane, while the y-axis coordinate values ​​remain unchanged. constant.

3. The pipe surface contour interference detection method as described in claim 1, characterized in that, Step S3 employs a dynamic mesh generation method, including the following steps: S301. Determine the grid cell size. Extract the bounding box of each 2D contour, and use the median of the bounding box's length and height as the length of the mesh cell. Gw and height Gh The plane containing each two-dimensional contour is divided into several grid units according to rows and columns; S302. Calculate the mesh cell coverage area of ​​each contour. Line range: ~ Column range: ~ , in, x min , y min , x max , y max These are the minimum and maximum x and y coordinates of the bounding box, respectively. and These represent rounding down and rounding up, respectively. Save the correspondence between each contour and the mesh cells it covers; S303, Dynamic Mesh Triggered Reconstruction When a new contour appears, if the size of the bounding box of the new contour is greater than the length and width threshold of the current grid cell, the grid reconstruction is triggered, the correspondence between the original contour and the grid cell is cleared, the grid cells are re-divided according to step S301, and the correspondence is re-determined according to step S302.

4. The pipe surface contour interference detection method as described in claim 3, characterized in that, In step S302, the correspondence between each contour and the grid cell it covers is stored based on a hash index: the row and column coordinates of the grid cell are encoded as hash keys, and the corresponding contour ID is stored in the hash table index position corresponding to the key value.

5. The pipe surface contour interference detection method as described in claim 1, characterized in that, In step S4, the concave contour is transformed into a convex contour supported by the GJK algorithm using the ear-cutting method, including the following steps: S401, For the discrete point group of the contour mapped to the two-dimensional plane Determine its concavity and convexity point by point. For contour points Calculate the predecessor edge vector, successor edge vector, and cross product of each: Predecessor edge vector: , Rear driver edge vector: , Cross product: cross= , If the contour is counterclockwise and cross < 0, or clockwise and cross > 0, then It is a concave vertex; Traverse all contour points in the discrete contour point group to generate a list of concave vertices; S402, Dynamic Decomposition of Ear Cutting Method Ear tip selection: From the list of concave vertices, select the point closest to the center of the bounding box as the initial ear tip. ; Triangular cut of the ear: for the selected ear apex point Cutting from its predecessor vertex , Successor vertices The triangle formed for the ear is considered valid if it has no other vertices and its area is less than a set threshold. This triangle is then used as a sub-contour. , , The contour points that constitute the sub-contour are then removed from the list of concave vertices. ; Otherwise, select the next concave vertex from the list of concave vertices as the ear tip point, repeat the cutting process until the remaining contour after cutting is a convex polygon, and also use the remaining contour as a sub-contour. S403. Perform GJK interference detection on each sub-contour and the target contour respectively. If no interference occurs, it indicates that the two-dimensional contour before decomposition does not interfere with the target contour.

6. The pipe surface contour interference detection method as described in claim 5, characterized in that, The sub-contours after dynamic decomposition by the ear-cutting method are stored in a tree structure. The root node stores the 2D contour before decomposition, and the child nodes store the sub-contours. During interferometry detection, the tree nodes are traversed without the need for re-decomposition.

7. The pipe surface contour interference detection method as described in claim 1, characterized in that, In step S4, when using the GJK algorithm to perform interference detection on the two contours, the directions of the geometric center vectors of the two contours are used as the initial search directions for the GJK algorithm: , Indicates the initial search direction. C A and C B Let A and B be the coordinates of the geometric center of the two contours to be detected. The coordinates of the geometric center of the contour are equal to the average coordinates of the contour points in the three discrete sets of the contour.

8. The pipe surface contour interference detection method as described in claim 1, characterized in that, The 3D contour discrete point set and its coordinates of the machined holes are obtained from the pipe model by calling the OCCT library; for each row or column of machined holes of the same type on the pipe surface, the 3D contour discrete point set and its coordinates of the first machined hole are saved, and for the contours of subsequent machined holes of the same type, only the position offset relative to the first machined hole is saved.

9. A pipe surface profile interference detection system based on the method of any one of claims 1 to 8, characterized in that, Includes the following modules: The contour information acquisition module is used to acquire the discrete point set of the contour of the machined hole on the pipe surface and its coordinates; The 2D contour mapping module is used to map a set of discrete points and their coordinates of a 3D contour to a 2D plane, and obtain the corresponding set of discrete points and their coordinates of the 2D contour. The dynamic mesh generation module is used to divide a plane containing each two-dimensional contour into several mesh units according to rows and columns, and to determine the correspondence between each contour and the mesh units it covers. The interference detection module is used to perform interference detection on contours whose coverage area contains the same or adjacent grid cells.

10. The pipe surface contour interference detection system as described in claim 9, characterized in that, The interference detection module also includes a dynamic ear-cutting module and a GJK detection module. The dynamic ear-cutting module uses the ear-cutting method to transform the concave contour into a convex contour supported by the GJK algorithm. The GJK detection module uses the GJK algorithm to perform interference detection on the two contours to be detected.

Citation Information

Patent Citations

  • Pipeline section three-dimensional space interference detection and shortest distance point acquisition algorithm

    CN113836674A

  • On-machine three-dimensional profiling machining device and method for complex-configuration composite material pipeline

    CN115930824A

  • Pipeline bending dimension reduction interference analysis method

    CN116227057A

  • Machining tool selecting device and method and program

    JP2005332000A

Cited By

  • Advanced anti-collision detection method and equipment for laser head of pipe machine and medium

    CN121423862A