Collision interference detection method based on binary tree LOD model and related equipment

By using spatial partitioning and dynamic optimization of the binary tree LOD model, the problem of low efficiency of the octree model in virtual CNC machine tools is solved, and efficient and real-time collision detection is achieved, which is suitable for the field of virtual machine tool processing.

CN121883387APending Publication Date: 2026-04-17XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XI AN JIAOTONG UNIV
Filing Date
2025-12-25
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, octree-based spatial segmentation models generate a large number of redundant bounding boxes when dealing with complex and irregular parts, resulting in low collision detection efficiency for virtual CNC machine tools and making it difficult to meet the requirements of high real-time simulation.

Method used

A binary tree LOD model is used for spatial segmentation. By acquiring bounding box overlap information, dynamic optimization is performed to reduce invalid calculations, optimize the detection path, and construct a hierarchical detail model to improve detection efficiency.

Benefits of technology

It significantly improves the real-time performance and efficiency of collision detection, meets the requirements of high real-time simulation, reduces redundant calculations, and improves the accuracy and stability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883387A_ABST
    Figure CN121883387A_ABST
Patent Text Reader

Abstract

The invention discloses a collision interference detection method based on a binary tree LOD model, belongs to the field of virtual machine tool processing, and aims to solve the technical problem of insufficient efficiency of a space segmentation model based on an octree in the prior art. The method comprises the following steps: obtaining a binary tree LOD model corresponding to a geometric model participating in collision interference detection, wherein the binary tree LOD model comprises a plurality of levels of bounding boxes; performing intersection detection based on the corresponding binary tree LOD model to obtain bounding box overlapping information of the binary tree LOD model; and according to the bounding box overlapping information, dynamically optimizing the intersection detection range and path of the subsequent hierarchy until an intersection detection completion condition is met, and outputting a collision interference detection result. According to the method, the hierarchical detail model of the binary tree structure is combined with the dynamic optimization strategy in the detection process, so that unnecessary bounding box traversal and calculation can be effectively reduced, and the real-time efficiency of collision interference detection is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtual machine tool processing, and specifically to a collision interference detection method and related equipment based on a binary tree LOD model. Background Technology

[0002] In the field of CNC machine tool machining simulation, real-time and accurate collision interference detection is a core technology for ensuring the safety and reliability of virtual machining. The core challenge lies in balancing the need for sufficiently fast detection to meet the requirements of real-time simulation with the need for sufficient accuracy to avoid missed detections.

[0003] To balance efficiency and accuracy, hierarchical bounding box methods have become the mainstream collision detection approach. The core idea is to wrap complex models layer by layer with simple geometric shapes (bounding boxes). By quickly eliminating non-intersecting bounding boxes, the number of geometric elements requiring detailed calculation is significantly reduced, thus dramatically improving detection efficiency. Commonly used bounding box types include axial bounding boxes (AABB) and directed bounding boxes (OBB).

[0004] Among these strategies, constructing a spatial hierarchy based on AABB bounding boxes is a common approach. The octree model is a typical spatial partitioning method, uniformly dividing space into eight sub-regions to organize the model. While existing techniques using this method to organize AABB models improve collision detection efficiency, their fixed and uniform spatial partitioning lacks flexibility. For irregularly shaped parts with large size variations in CNC machine tools, octrees may generate a large number of invalid empty bounding boxes or lead to excessive subdivision, resulting in unnecessary computational overhead during model construction and traversal detection, thus hindering further improvements in real-time performance.

[0005] Therefore, how to further optimize the efficiency of spatial segmentation and hierarchical traversal while ensuring detection accuracy, and reduce invalid bounding box intersection tests, has become a key technical problem that needs to be solved to meet the high real-time collision avoidance requirements of virtual CNC machine tools. Summary of the Invention

[0006] The purpose of this invention is to provide a collision interference detection method and related equipment based on a binary tree LOD model, so as to overcome the technical problem of insufficient efficiency of the existing octree-based spatial segmentation model.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a collision interference detection method based on a binary tree LOD model, comprising: Obtain the binary tree LOD model corresponding to the geometric model participating in collision interference detection, wherein the binary tree LOD model contains bounding boxes of multiple levels; Intersection detection is performed based on the corresponding binary tree LOD model to obtain the bounding box overlap information of the binary tree LOD model; Based on the bounding box overlap information, the intersection detection range and path of subsequent levels are dynamically optimized until the intersection detection completion condition is met, and the collision interference detection result is output.

[0008] The binary tree LOD model is constructed using a binary tree spatial partitioning method, including the following steps: The initial axial bounding box is determined as the root bounding box based on the patch information of the geometric model involved in the collision interference detection; Iteratively divide the current bounding box into two sub-bounding boxes along its longest side; Intersection tests are performed between the sub-bounding boxes and the facets of the geometric model involved in collision interference detection. Intersecting sub-bounding boxes are retained to establish binary tree nodes, while non-intersecting sub-bounding boxes are discarded. Segmentation stops when the longest side of the bounding box is less than the set resolution.

[0009] The intersection detection is a binary tree LOD model of the geometric model participating in the collision interference detection. Starting from the bounding box of the root node, it performs a top-down hierarchical traversal and intersection judgment.

[0010] When performing the intersection judgment, if the geometric model corresponding to the bounding box has been rotated, the bounding box is treated as a directed bounding box, and at least one of the separating axis theorem, nominal radius method or vertex inclusion method is used for intersection judgment.

[0011] The dynamic optimization includes a model hierarchy tree simplification step: Based on the bounding box overlap information of the current level, overlapping bounding volumes are constructed in the local coordinate system of the geometric model participating in the collision interference detection. Using overlapping bounding volumes constructed in their respective coordinate systems, the child nodes of the next level in the corresponding binary tree LOD model are filtered out, and only the child nodes that intersect with the overlapping bounding volumes are retained for subsequent detection.

[0012] The dynamic optimization also includes an interlayer interference information transmission step: The identification information of the bounding box pairs that are determined to intersect in the current level is passed to their corresponding lower-level child nodes; In the next level of intersection detection, intersection is only determined for bounding box pairs of child nodes that carry the same identifier information.

[0013] The conditions for completing the intersection detection include: traversing to the bounding box of the leaf nodes of the binary tree LOD model and completing all necessary detection paths defined by dynamic optimization; The output collision interference detection results include: highlighting the geometric model or part thereof where interference occurs in the virtual simulation interface.

[0014] Secondly, the present invention provides a collision interference detection system based on a binary tree LOD model, comprising: The model acquisition module is used to acquire the binary tree LOD model corresponding to the geometric model participating in the collision interference detection. The binary tree LOD model contains bounding boxes of multiple levels. The intersection detection module is used to perform intersection detection based on the corresponding binary tree LOD model and obtain the bounding box overlap information of the binary tree LOD model; The determination module is used to dynamically optimize the intersection detection range and path of subsequent levels based on the bounding box overlap information until the intersection detection completion condition is met, and output the collision interference detection result.

[0015] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a collision interference detection method based on a binary tree LOD model as described above.

[0016] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a collision interference detection method based on a binary tree LOD model as described above.

[0017] Compared with the prior art, the present invention has the following beneficial technical effects: Firstly, this invention provides a collision interference detection method based on a binary tree LOD model. By employing a binary tree structure to construct a hierarchical detail model, it replaces the fixed and uniformly segmented octree model in existing technologies, thereby improving the flexibility of spatial partitioning from the root of the data structure. This method acquires and utilizes this model for hierarchical intersection detection, enabling rapid localization of bounding box overlap regions. Furthermore, based on this real-time acquired overlap information, it dynamically optimizes the subsequent detection range and traversal path, forming an iterative "detection-optimization" process. This mechanism effectively eliminates the large amount of redundant bounding box traversal and computation that may be generated by the octree model, concentrating computational power on regions where interference may occur, thus systematically improving the overall efficiency of collision detection and meeting the requirements of high real-time simulation.

[0018] Secondly, this invention provides a collision interference detection system based on a binary tree LOD model, which transforms the aforementioned efficient method into an executable system through a modular architecture. The model acquisition module provides the system with a preprocessed model based on binary tree segmentation, laying a solid foundation for efficient data. The intersection detection module is dedicated to performing rapid hierarchical traversal and intersection testing, outputting accurate overlap information in real time. The decision module serves as the core of intelligent control, using this information to dynamically adjust the breadth and depth of subsequent detections. These three modules work collaboratively, integrating a flexible binary tree model, directional detection computation, and adaptive process control. From a system implementation perspective, this overcomes the rigidity in model construction and detection processes of traditional octree-based systems, achieving a substantial breakthrough in detection efficiency.

[0019] Thirdly, the present invention provides a computer device that, through a processor executing a specific computer program, can efficiently implement the steps of the method of the present invention. When performing data processing tasks, the computer device can accurately perform numerical calculations and logical judgments, avoiding errors caused by human factors. At the same time, since the computer program has high stability and reliability, it can ensure the accuracy and consistency of the data processing results.

[0020] Fourthly, the present invention provides a computer-readable storage medium. By programming the steps of the method of the present invention into a computer program and storing it on the computer-readable storage medium, users can easily load these programs onto any compatible computer device and execute them without rewriting or converting the code, which greatly improves the convenience and flexibility of program execution. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of a collision interference detection method based on a binary tree LOD model in an embodiment of the present invention.

[0022] Figure 2 The following are schematic diagrams of binary tree LOD models with different levels of precision in the embodiments of the present invention: (a) is a CAD model, (b) is an 8-level precision model, and (c) is an 18-level precision model.

[0023] Figure 3 This is a schematic diagram of collision detection between different binary tree LOD models in an embodiment of the present invention.

[0024] Figure 4 In this embodiment of the invention, the child nodes of the model are updated in the overlapping area of ​​a certain layer by using two collision models to simplify the hierarchical tree of the model.

[0025] Figure 5 This is the algorithm flow for interference detection of two binary tree LOD models in an embodiment of the present invention.

[0026] Figure 6 This is a collision detection method for two binary tree LOD models in an embodiment of the present invention.

[0027] Figure 7 This is a diagram showing the relationships between various simulation model classes in this embodiment of the invention.

[0028] Figure 8 This is a software system framework structure diagram in an embodiment of the present invention.

[0029] Figure 9 This is the main startup interface of the system platform in this embodiment of the invention.

[0030] Figure 10 This describes the creation of the main interface for the machine tool model in this embodiment of the invention.

[0031] Figure 11 This is the machine tool system initialization interface in an embodiment of the present invention.

[0032] Figure 12 This is the collision model management interface in an embodiment of the present invention.

[0033] Figure 13 The collision interference results are shown in the embodiments of the present invention.

[0034] Figure 14 The following is a display of the multi-angle, all-around collision detection results in an embodiment of the present invention. (a) is the right-side view, (b) is the left-side view, (c) is the top-down view, and (d) is a magnified view of a portion of the object.

[0035] Figure 15 This is a schematic diagram of a collision interference detection system based on a binary tree LOD model in an embodiment of the present invention. Detailed Implementation

[0036] In the field of virtual CNC machine tool machining simulation, real-time and accurate collision and interference detection is crucial to ensuring simulation reliability. Current mainstream methods employ hierarchical bounding box techniques, with octree-based spatial segmentation models being widely used. However, octree models, using a fixed and uniform spatial segmentation strategy, tend to generate a large number of redundant bounding boxes when dealing with complex and irregular parts. This leads to efficiency bottlenecks in model construction and traversal detection, making it difficult to meet the stringent requirements of high real-time simulation. Therefore, a more efficient spatial segmentation and collision detection method is urgently needed to optimize the detection path and reduce unnecessary computation.

[0037] Based on the above background, this invention proposes a collision interference detection method and related equipment based on a binary tree LOD model. By using a binary tree structure to construct a hierarchical detail model, replacing the fixed-segmentation octree model, the flexibility of spatial partitioning is improved from the underlying data structure. The method first obtains a multi-level binary tree LOD model corresponding to the geometric model; then, it performs intersection detection based on this model to obtain bounding box overlap information; and finally, it optimizes the detection range and path of subsequent levels in real time and dynamically based on this information. Through the iterative process of detection and optimization, unnecessary bounding box traversal and intersection calculations are effectively reduced, thereby overcoming the efficiency bottleneck caused by redundant calculations in existing technologies and significantly improving the real-time performance of collision detection.

[0038] 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, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] The technical terms used in this invention are explained as follows: Level of Detail (LOD). Binary Space Partitioning (BSP); Axis-Aligned Bounding Box (AABB); Oriented Bounding Box (OBB); Bounding Volume (BV). Numerical Control System (NC system). Open Scene Graph (OSG).

[0040] Reference Figure 1 The image shows a specific implementation of the collision interference detection method based on a binary tree LOD model provided by the present invention, comprising: Obtain the binary tree LOD model corresponding to the geometric model participating in collision interference detection, wherein the binary tree LOD model contains bounding boxes of multiple levels; Intersection detection is performed based on the corresponding binary tree LOD model to obtain the bounding box overlap information of the binary tree LOD model; Based on the bounding box overlap information, the intersection detection range and path of subsequent levels are dynamically optimized until the intersection detection completion condition is met, and the collision interference detection result is output.

[0041] In this specific embodiment, the acquired binary tree hierarchical detail model provides a pre-constructed spatial data structure foundation with multiple levels of detail for collision detection. The multiple bounding boxes contained in this model enable the detection process to be refined step by step from macroscopic to microscopic, creating conditions for subsequent efficient traversal.

[0042] Intersection detection based on this model is the core process of collision determination. By traversing the hierarchical structure of the model and performing intersection tests between bounding boxes, the overlap information of bounding boxes representing the potential interference region between two geometric models can be quickly obtained. This step transforms the complex geometric interference problem into a computation of structured data.

[0043] Subsequently, based on the real-time bounding box overlap information, the intersection detection range and path of subsequent levels are dynamically optimized. This optimization mechanism is not fixed but relies on the intermediate results of the previous detection round, adaptively reducing the set of bounding boxes to be detected and planning efficient detection paths. By iteratively executing the "detection-optimization" loop, the system can discard a large amount of obviously collision-free redundant computation and concentrate computational resources on regions where interference may occur.

[0044] The entire method achieves a systematic improvement in collision detection efficiency through the synergistic effect of the above steps: the hierarchical detail model provides multi-resolution data representation; intersection detection quickly generates key state information on this structure; and dynamic optimization uses this information to guide and simplify subsequent calculations in real time. The three form an organic whole, enabling the algorithm to significantly reduce computation time while ensuring detection accuracy, until all necessary levels have been traversed and the final collision interference determination result is output.

[0045] In another specific embodiment of the present invention, a collision interference detection method based on a binary tree LOD model is provided. The binary tree LOD model is obtained by performing binary tree spatial partitioning on AABB bounding boxes. Its data structure includes a basic attribute table, a patch attribute table, and a binary tree attribute table. The basic attribute table is used to store the model's identification information, name, partitioning accuracy, and the size of the root bounding box. The patch attribute table is used to store the model's original geometric data, including vertex coordinates, normal vectors, and patch indices. The binary tree attribute table is used to store a list of all bounding boxes generated through spatial partitioning, as well as a binary tree structure representing the parent-child hierarchical relationship between these bounding boxes.

[0046] The binary hierarchical tree stores binary tree nodes, each containing one parent node and two child nodes. Each binary tree node corresponds one-to-one with a bounding box. A bounding box contains several faces, and each face contains several vertices and normal vectors. The entire query and indexing process uses ID numbers as identification information.

[0047] In a simulation environment, any simulated object requiring interference detection must have a corresponding collision model. The collision model is constructed from the geometric model corresponding to the simulation model, and each geometric model is a polygonal model.

[0048] The process of generating a binary tree LOD model from a polygonal model includes: S101, establish a tree structure and set a decomposition precision ε, which is relative to the side length of the least binary tree LOD model. The selection of precision depends on the needs of the simulation.

[0049] S102: Obtain the largest AABB bounding box in the model coordinate system based on the patch information, use it as the root bounding box, add it to the bounding box linked list, and create the corresponding binary tree node.

[0050] S103: Obtain the bounding box in the linked list and check if the longest side length of the bounding box is less than the decomposition accuracy ε; if so, the model generation ends; otherwise, continue to the next step.

[0051] S104, bisect the bounding box along its longest side to obtain two equal bounding boxes.

[0052] S105, perform an intersection check between the segmented bounding box and the model face. If the face does not intersect with the bounding box, discard the bounding box; if they intersect, retain the bounding box, create the corresponding binary tree node, and add it to the bounding box linked list.

[0053] S106, check if all bounding boxes in the bounding box list have been checked. If so, this process ends; otherwise, call S102 to continue execution.

[0054] Reference Figure 2 The image shows the result of generating a binary tree LOD model for a polygonal model. Figure 2 (a) in the text is a CAD model. Figure 2 (b) in the model represents an 8-level accuracy model. Figure 2 (c) in the model is the 18-level accuracy model.

[0055] Through the above steps, a binary tree LOD model has been established. Collision detection between models in a scene is essentially collision detection between these binary tree LOD models. The following steps, based on the established binary tree LOD model, optimize the collision detection process to improve efficiency. We will now use two binary tree LOD models, A and B, as examples to demonstrate collision detection. Figure 3 As shown, the root bounding box of model A is B1. 0 The child node under the root bounding box is B1. 1 and B1 2 The root bounding box of model B is B2. 0 The child node under the root bounding box is B2. 1 and B2 2 .

[0056] The specific method for collision detection between two binary tree LOD models is as follows: S201, AABB bounding box intersection detection. A hierarchical tree model is generated using AABB bounding boxes, and the intersection of the two models is determined. S2011, firstly, the root bounding boxes B10 and B20 of the two models are intersected. If the bounding boxes do not intersect, it can be considered that there is no collision between the models; if the bounding boxes intersect, it is necessary to continue to judge downwards. S2012, take B1 0 Any sub-boundary box B1 i (i=1,2) and B2 0 B2 j (j=1,2) Perform intersection checks one by one. If no intersecting bounding boxes are found, it is considered that there is no collision; if an intersecting bounding box pair is found (let's say B1), then the collision is considered to be non-collision. i and B2 j Then record it; S2013, retrieve the intersecting bounding box pair (B1) found in S2012. i B2 j Repeat process S2012 to perform intersection judgment until the judgment termination condition is met.

[0057] S2014, this step requires a final judgment. If intersecting bounding box pairs are still found, then a collision is determined between models A and B; otherwise, no collision is determined between models A and B.

[0058] S202, OBB bounding box intersection detection. As seen in S201, intersection detection between bounding boxes is the foundation of collision detection between models. This invention uses AABB bounding boxes to generate a hierarchical tree of model bounding boxes. However, if the object subsequently rotates, the bounding box becomes an OBB bounding box in the virtual environment coordinate system. Therefore, intersection detection of AABB bounding boxes becomes intersection detection of OBB bounding boxes. S2021 first uses a simple incomplete method (nominal radius method): if the distance between the geometric centers of two bounding boxes is greater than half the sum of the diagonals of the bounding boxes, it indicates no interference; if it is less than half the sum of the minimum side lengths, it indicates interference. To speed up the process, the geometric center coordinates, side lengths, diagonal lengths, and other information of the bounding boxes can be stored in the bounding box data structure.

[0059] S2022, and then use another fast but incomplete method (vertex containment method): calculate whether any vertex of the bounding box is contained within the bounding box of the other bounding box. If so, it is determined that interference has occurred. This only requires transforming the vertex to a coordinate system and determining whether the vertex falls within the three coordinate intervals of the AABB bounding box.

[0060] S2023, If none of the above methods can make a judgment, then use the complete method.

[0061] Through S201 and S202, two commonly used bounding box collision detection methods have been obtained. However, in addition to speeding up the interference judgment speed between two binary tree LOD hierarchical models, the collision detection between two bounding boxes should also minimize the number of interference calculations. The following steps focus on reducing the number of judgments and optimizing the detection path to further improve the collision detection efficiency. The specific methods are as follows: S301, Simplified Model Hierarchy Tree. This simplifies the model hierarchy tree by updating the child nodes of two colliding models in the overlapping region of a certain layer. Taking models A and B as an example... Figure 4 As shown.

[0062] First, calculate the overlapping portion of the bounding boxes of models A and B at a certain layer. If there is no overlap, it is determined that the two do not interfere with each other, and the calculation process ends. If there is an overlapping portion, calculate the overlapping area and construct one or more "overlapping bounding volumes" according to the local coordinate systems of A and B respectively, and the process continues.

[0063] like Figure 4 As shown, models A and B are modified using "overlapping bounding bodies". For lower-level nodes of the model, if the node's bounding box interferes with the overlapping bounding body, it is retained; otherwise, it is deleted (the node's subtree is also deleted). This yields the updated hierarchical model of model A. The same modification is performed on model B using the "overlapping bounding body" in the B coordinate system to obtain the updated model B.

[0064] S302, Inter-layer interference information transmission. If models A and B interfere with each other at a certain layer, it is necessary to detect the nodes below them. In fact, the lower-layer child nodes of A only need to calculate the lower-layer child nodes of B that are currently interfering with it. To this end, the interference between the current layer node and the nodes of the other model at the current layer is transmitted to their lower-layer nodes, which can reduce the number of judgments and time.

[0065] Next, a detailed collision detection process between bounding box hierarchical models is designed. Based on the S301 and S302 methods mentioned above, a detection calculation process between binary tree LOD models is constructed, as follows: Figure 5 As shown, suppose model A has M layers and model B has N layers, where M > N. The calculation process includes: S401, Obtain the lower bounding box linked list. First, obtain the linked list of the i-th level binary tree LOD model corresponding to model A, and determine whether i is greater than N. If yes, obtain the linked list of the N-th level binary tree LOD model corresponding to model B; otherwise, obtain the linked list of the i-th level binary tree LOD model corresponding to model B. S402 inherits interference information. The linked list obtained in S401 inherits the collision relationship of its parent layer.

[0066] S403, Calculate the interference between bounding boxes (BV). Based on the obtained linked lists and their inherited collision relationships, identify the bounding box pairs that need to be judged in the two linked lists, and determine their positional relationship.

[0067] S404, Calculate the overlapping bounding box. If the positions overlap, record the ID of the overlapping binary tree LOD model, store it in two linked lists, pass it to the next level node, and calculate the overlapping bounding box in the coordinate systems of the two models respectively.

[0068] S405, Model Update. Update the hierarchical tree below layer i of the two collision models using overlapping bounding boxes.

[0069] Interference between spatial convex polygons involves three processes: constructing collision detection pairs, collision detection, and collision response. The construction of collision detection pairs is primarily based on specific collision detection objects; in the online motion collision avoidance process of CNC machine tools, these objects can be manually specified. The collision detection process employs a fast detection method based on a binary tree LOD model and returns the collision detection results. Based on the collision detection results, a collision response is generated, displayed using color highlighting, as shown in the image. Figure 6 As shown.

[0070] To clarify the collision interference detection method based on a binary tree LOD model and its beneficial effects provided in this specific embodiment, an application scenario will be used to illustrate it further. In this specific embodiment, the simulation object classes involved in the provided CNC machine tool online collision avoidance system mainly include machine tool model classes (sharing a class with components), kinematic pair model classes, moving part model classes, fixture model classes, part model classes, workpiece model classes, point model classes, line model classes, and surface model classes. The fixture model class is derived from the machine tool model class, and the workpiece model class is derived from the part model class. The part model class and the point, line, and surface model classes are used to display the models; the other simulation objects do not have geometric information. The relationships between the simulation model classes are as follows: Figure 7 As shown.

[0071] See Figure 8 The system provided in this specific embodiment mainly consists of five modules: interface module (IF), simulation module (SM), communication module (CM), input interface module (IN), and output interface module (OT).

[0072] The Interface Module (IF) contains all the system's operation interfaces, including the main interface, various dialog boxes, property pages, and prompts. The system uses these interfaces to perform various operations, including setting the system itself and calling various simulation and auxiliary functions.

[0073] The Simulation Scene Module (SM) is the core module of this system. It provides all simulation application functions, including machine tool management, parts management, virtual scene management, collision scene management, and user management. The virtual scene management function can directly handle specific user inputs, such as mouse / keyboard signals during operation and external input signals.

[0074] The communication module (CM) is a shared functional module that provides various communication encoding, message sending and receiving, and message decoding functions. Each other first-level module contains a communication submodule, which is independent of this module but can utilize its related functions.

[0075] The input interface module (IN) is responsible for communication with the CNC machine tool system, including functions such as connection, disconnection, status setting, signal reception, signal preprocessing, and initialization of the virtual machine tool machining environment.

[0076] The Output Interface Module (OT) is also responsible for communication with the CNC machine tool system, including functions such as connection, disconnection, and signal transmission.

[0077] The system provided in this specific embodiment uses OSG as its underlying graphics engine. As a 3D visualization collision avoidance software, the machine tool motion simulation scene must be displayed in real time for user observation; therefore, it is necessary to set up and display the scene. Currently, commonly used graphics display engines in software development include Direct3D and OpenGL. Their common feature is good underlying extensibility. Among them, OpenGL, compared to Direct3D, is open-source, therefore more software developers choose to use OpenGL as their graphics engine.

[0078] OSG (Open Scene Graph) is a 3D graphics development library based on OpenGL technology and the C++ platform. It is widely used in visualization simulation, games, virtual reality, high-end technology research and development, and modeling. Due to OSG's excellent encapsulation, this platform uses OSG as its underlying graphics engine.

[0079] A case study was conducted using a machining center as the actual research model.

[0080] The experimental environment was as follows: Visual C++ 2005 was used as the development tool, OSG as the graphics display engine, and SOLID as the collision detection development kit. An online motion anti-collision software system for CNC machine tools was built for instance verification.

[0081] See Figure 9 The main interface of the collision avoidance system provided in this article is shown in the figure. It mainly includes three sub-interfaces: the machine tool model creation interface, the machine tool system initialization interface, and the collision model management interface. The machine tool model creation interface allows for the rapid creation of kinematic models of CNC machine tools, including defining the motion hierarchy model tree, creating kinematic pairs and moving parts, and setting their kinematic properties. Combined with the corresponding machine tool parts, components, and kinematic pairs addition dialog boxes, users can quickly create CNC machine tool models of any form. The machine tool initialization interface allows for the addition of fixtures and workpieces to the machine tool system, forming a complete virtual machining environment. The collision model management interface mainly includes a collision model management dialog box and a collision detection pair dialog box. The collision detection pair dialog box allows users to perform collision interference monitoring only on the machine tool parts they need to detect. The sub-interfaces are shown below. Figures 10 to 12 As shown, Figure 10 To create the main interface for the machine tool model, Figure 11 Initialize the interface for the machine tool system. Figure 12 This is the interface for managing collision models. Figure 13 The results of the collision interference show that Figure 14 This is a display of multi-angle, all-around collision detection results.

[0082] In the experiment, a collision detection test was conducted on a virtual prototype of the machining center. If collision interference was detected, the system would highlight the affected components for easy identification by the user. The verification results are as follows: Figure 6 As shown, the collision detection results during the machine tool simulation process are presented, indicating that the tool and the fixture collided.

[0083] Users can also dynamically and freely choose a specified viewpoint to observe the collision detection results from multiple angles and in all directions, such as Figure 8 As shown.

[0084] The above-described specific implementation method was verified using a machining center as the actual research model. The collision interference detection method based on a binary tree LOD model provided in this specific implementation method addresses the existing octree LOD model by using a binary tree instead of an octree for spatial segmentation of the AABB model. It then performs fast interference analysis between convex polygons based on the binary tree LOD model. This achieves the research on collision interference algorithms in online motion collision avoidance for CNC machine tools, further improving collision detection efficiency. Considering the characteristics of multi-object collision detection in CNC machining, a method for updating the hierarchical tree in overlapping areas was designed, simplifying the model hierarchical tree, effectively reducing unnecessary segmentation and intersection tests, and significantly improving detection efficiency. For bounding box hierarchical tree interference detection, an inter-layer interference information transmission method was designed, effectively reducing the number of interference judgments between bounding boxes and saving considerable time.

[0085] Reference Figure 15 As shown in the figure, a collision interference detection system based on a binary tree LOD model is also provided in a specific embodiment of the present invention, comprising: The model acquisition module is used to acquire the binary tree LOD model corresponding to the geometric model participating in the collision interference detection. The binary tree LOD model contains bounding boxes of multiple levels. The intersection detection module is used to perform intersection detection based on the corresponding binary tree LOD model and obtain the bounding box overlap information of the binary tree LOD model; The determination module is used to dynamically optimize the intersection detection range and path of subsequent levels based on the bounding box overlap information until the intersection detection completion condition is met, and output the collision interference detection result.

[0086] In this specific embodiment, the described collision interference detection system implements the core steps of the aforementioned method through a modular architecture. The model acquisition module, as the system's data preprocessing unit, is responsible for constructing or loading a corresponding binary tree hierarchical detail model with a multi-level bounding box structure for the input geometric model, providing a standardized spatial index data foundation for the entire detection process. The intersection detection module, as the core computational unit, receives the output from the model acquisition module and executes an efficient hierarchical bounding box traversal and intersection testing algorithm. Its function is to quickly locate and output the potential interference region between two geometric models, specifically manifested as bounding box overlap information.

[0087] The decision module acts as the control and optimization center of the system. It receives real-time data from the intersection detection module, namely bounding box overlap information, and dynamically decides and adjusts subsequent detection strategies based on this information. By implementing real-time optimization of the detection range and path of subsequent levels, this module can significantly reduce unnecessary computation. Its internal iterative control mechanism ensures that the "detection-optimization" cycle continues until the preset detection completion conditions are met, ultimately generating and outputting a clear collision interference decision result.

[0088] The three modules described above constitute a complete processing pipeline. The model acquisition module provides structured input for intersection detection; the analysis results from the intersection detection module provide a basis for the optimization decisions of the decision module; and the optimization instructions from the decision module can in turn provide feedback and guide the intersection detection module to execute subsequent calculations more efficiently. This collaborative working mechanism enables the system to transform complex geometric collision problems into a series of structured data operations. While ensuring detection accuracy, it effectively improves overall computational efficiency through a dynamic optimization mechanism, thereby meeting the needs of high real-time application scenarios such as virtual machining simulation.

[0089] In a specific embodiment of the present invention, a computer device is also provided. Specifically, the computer device includes a processor and a memory. The memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, and is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function. The processor described in this embodiment of the invention can be used to obtain the binary tree LOD model corresponding to the geometric model participating in collision interference detection. The binary tree LOD model contains multiple levels of bounding boxes. Intersection detection is performed based on the corresponding binary tree LOD model to obtain the bounding box overlap information of the binary tree LOD model. According to the bounding box overlap information, the intersection detection range and path of subsequent levels are dynamically optimized until the intersection detection completion condition is met, and the collision interference detection result is output.

[0090] This invention also provides a storage medium, specifically a computer-readable storage medium, which is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the methods in the above embodiments. One or more instructions in the computer-readable storage medium are loaded and executed by the processor to perform the following steps: obtaining a binary tree LOD model corresponding to the geometric model participating in collision interference detection, wherein the binary tree LOD model contains multiple levels of bounding boxes; performing intersection detection based on the corresponding binary tree LOD model to obtain the bounding box overlap information of the binary tree LOD model; dynamically optimizing the intersection detection range and path of subsequent levels according to the bounding box overlap information until the intersection detection completion condition is met, and outputting the collision interference detection result.

[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0095] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0096] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art. The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A method for detecting collision interference based on a binary tree LOD model, characterized in that, include: Obtain the binary tree LOD model corresponding to the geometric model participating in collision interference detection, wherein the binary tree LOD model contains bounding boxes of multiple levels; Intersection detection is performed based on the corresponding binary tree LOD model to obtain the bounding box overlap information of the binary tree LOD model; Based on the bounding box overlap information, the intersection detection range and path of subsequent levels are dynamically optimized until the intersection detection completion condition is met, and the collision interference detection result is output.

2. The collision interference detection method based on the binary tree LOD model according to claim 1, characterized in that, The binary tree LOD model is constructed using a binary tree spatial partitioning method, including the following steps: The initial axial bounding box is determined as the root bounding box based on the patch information of the geometric model involved in the collision interference detection; Iteratively divide the current bounding box into two sub-bounding boxes along its longest side; Intersection tests are performed between the sub-bounding boxes and the facets of the geometric model involved in collision interference detection. Intersecting sub-bounding boxes are retained to establish binary tree nodes, while non-intersecting sub-bounding boxes are discarded. Segmentation stops when the longest side of the bounding box is less than the set resolution.

3. The collision interference detection method based on a binary tree LOD model according to claim 2, characterized in that, The intersection detection is a binary tree LOD model of the geometric model participating in the collision interference detection. Starting from the bounding box of the root node, it performs a top-down hierarchical traversal and intersection judgment.

4. The collision interference detection method based on a binary tree LOD model according to claim 3, characterized in that, When performing the intersection judgment, if the geometric model corresponding to the bounding box has been rotated, the bounding box is treated as a directed bounding box, and at least one of the separating axis theorem, nominal radius method or vertex inclusion method is used for intersection judgment.

5. The collision interference detection method based on binary tree LOD model according to claim 1, characterized in that, The dynamic optimization includes a model hierarchy tree simplification step: Based on the bounding box overlap information of the current level, overlapping bounding volumes are constructed in the local coordinate system of the geometric model participating in the collision interference detection. Using overlapping bounding volumes constructed in their respective coordinate systems, the child nodes of the next level in the corresponding binary tree LOD model are filtered out, and only the child nodes that intersect with the overlapping bounding volumes are retained for subsequent detection.

6. The collision interference detection method based on a binary tree LOD model according to claim 5, characterized in that, The dynamic optimization also includes an interlayer interference information transmission step: The identification information of the bounding box pairs that are determined to intersect in the current level is passed to their corresponding lower-level child nodes; In the next level of intersection detection, intersection is only determined for bounding box pairs of child nodes that carry the same identification information.

7. The collision interference detection method based on a binary tree LOD model according to claim 1, characterized in that, The conditions for completing the intersection detection include: traversing to the bounding box of the leaf nodes of the binary tree LOD model and completing all necessary detection paths defined by dynamic optimization; The output collision interference detection results include: highlighting the geometric model or part thereof where interference occurs in the virtual simulation interface.

8. A collision interferometry detection system based on a binary tree LOD model, characterized in that, include: The model acquisition module is used to acquire the binary tree LOD model corresponding to the geometric model participating in the collision interference detection. The binary tree LOD model contains bounding boxes of multiple levels. The intersection detection module is used to perform intersection detection based on the corresponding binary tree LOD model and obtain the bounding box overlap information of the binary tree LOD model; The determination module is used to dynamically optimize the intersection detection range and path of subsequent levels based on the bounding box overlap information until the intersection detection completion condition is met, and output the collision interference detection result.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the collision interference detection method based on a binary tree LOD model as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the collision interference detection method based on a binary tree LOD model as described in any one of claims 1 to 7.