Three-dimensional geometry engine-oriented boundary representation model topology intersection method and device
Through top-down bounding box algorithm and intersection chart generation, the problem of inefficient topology interception in CAD software is solved, and an efficient and stable topology interception algorithm is realized, which is suitable for the three-dimensional geometry engine of complex models.
Patent Information
- Application Number
- CN202410958241.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-22
AI Technical Summary
The high computational complexity and time-consuming nature of topological interleaving algorithms in existing CAD software limit the improvement of software performance, especially when processing complex models and large-scale data, resulting in inefficiency and insufficient stability.
The top-down bounding box algorithm is used for interference inspection to determine whether topological elements intersect. If they do not intersect, the intersect operation will be skipped. High-level information will be used during the intersecting process, and the intersecting results will be integrated to generate the intersecting line diagram. , improve algorithm efficiency and flexibility.
It significantly improves the efficiency and stability of topological interception, reduces unnecessary computational volume, speeds up the Boolean operation of the three-dimensional geometry engine, and is suitable for solid models with complex boundaries.
Smart Images

Figure CN119004765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided design, and in particular to a topological intersection method and device for a boundary representation model oriented to a three-dimensional geometry engine. Background Art
[0002] In the field of computer graphics and computer-aided design (CAD), topological intersection has always been a crucial research topic. Topological intersection technology is not only used for accurate modeling and shaping of entities, but also plays a core role in Boolean operations of 3D geometry engines. With the rapid development of CAD technology, the requirements for topological intersection algorithms are also increasing, especially when dealing with complex models and high-precision data. Efficiency and stability have become important indicators for evaluating the performance of CAD software.
[0003] At present, mainstream CAD engines generally adopt the Boundary Representation (B-Rep) modeling method. The B-Rep model accurately describes the boundary information of geometric entities by defining topological elements such as points, edges, and faces and the connection relationships between them. Inside the computer, this topological information is organized into a hierarchical tree structure for easy storage and query. In the B-Rep model, geometric intersection and topological intersection are two basic intersection operations. Geometric intersection mainly focuses on the geometric properties of the topological elements themselves, while topological intersection needs to consider the boundary relationship between elements, so the calculation is more complicated.
[0004] Although the B-Rep model and the intersection algorithm based on this model have been widely used in the CAD field, the high computational complexity and time-consuming nature of the topological intersection operation are still the key factors restricting the performance improvement of CAD software. Since topological intersection needs to consider boundary information and often requires multiple geometric intersection calls, the efficiency of the algorithm is greatly challenged. Especially when dealing with large-scale data sets or complex models, the time-consuming problem of topological intersection is more prominent, becoming the main bottleneck restricting the efficient operation of CAD software. In addition, as CAD technology develops towards high precision and high efficiency, higher requirements are also placed on the stability and reliability of topological intersection algorithms. Therefore, developing an efficient and stable topological intersection algorithm has become an important issue that needs to be urgently addressed in the current CAD field. Summary of the invention
[0005] The present invention provides a method and device for topological intersection of a boundary representation model for a three-dimensional geometry engine, which is used to solve the defects of time-consuming and inefficient topological intersection in the prior art, realize an efficient and stable topological intersection algorithm, and speed up the Boolean operation of the three-dimensional geometry engine.
[0006] The present invention provides a topological intersection method for a boundary representation model of a three-dimensional geometry engine, comprising the following steps: Based on the topological tree of the boundary representation model, an interference check is performed on the boundary representation model from top to bottom by a bounding box algorithm to determine whether topological elements at each level of the boundary representation model intersect; If they intersect, then the topological elements of each level of the boundary representation model are intersected to obtain corresponding intersection information; The intersection information of each level of the boundary representation model is integrated to obtain an intersection line graph.
[0007] According to the topological intersection method of the boundary representation model for the three-dimensional geometry engine provided by the present invention, the boundary representation model is subjected to interference check through the bounding box algorithm to determine whether the topological elements of each level of the boundary representation model intersect; if they do not intersect, the non-intersecting topological elements are not subjected to topological intersection. Specifically, the method includes: obtaining the bounding boxes of the topological elements of each level in the boundary representation model; performing collision detection based on the bounding box on the topological elements of each level to determine whether the bounding boxes of the topological elements of each level intersect; if the bounding boxes of any level do not intersect, skipping the topological intersection operation of the corresponding level.
[0008] According to the topological intersection method of the boundary representation model for a three-dimensional geometry engine provided by the present invention, each level of the boundary representation model includes volume-volume intersection, face-face intersection, edge-face intersection and edge-edge intersection from top to bottom; the intersection of topological elements of each level of the boundary representation model is performed to obtain corresponding intersection information, specifically including: performing volume-volume intersection: intersecting all faces contained in an entity with all faces of another entity to obtain the intersection lines of each face; performing face-face intersection: obtaining the geometric description of two faces, and determining the intersection line of the two faces according to the geometric description; performing edge-face intersection: obtaining all intersecting vertices or intersection lines of an edge and a face; performing edge-edge intersection: obtaining all intersection points of two edges or intersection lines formed by the overlap of two edges.
[0009] According to the boundary representation model topological intersection method for a three-dimensional geometry engine provided by the present invention, each level of the boundary representation model includes volume-to-volume intersection, face-to-face intersection, edge-to-face intersection and side-to-side intersection from top to bottom; the intersection of topological elements at each level of the boundary representation model is performed to obtain corresponding intersection information, specifically including: performing volume-to-volume intersection, face-to-face intersection, edge-to-face intersection and side-to-side intersection; in the process of volume-to-volume intersection, face-to-face intersection, edge-to-face intersection and side-to-side intersection, the intersection information obtained at this level is transmitted to other levels; high-level intersection information is reused in the process of calculating the intersection of low-dimensional topological elements; and the intersection lines of high-dimensional topological elements are screened according to the low-level intersection information.
[0010] According to the topological intersection method of the boundary representation model for the three-dimensional geometry engine provided by the present invention, the intersection information of each level of the boundary representation model is integrated to obtain an intersection line graph, which specifically includes: obtaining the predecessor edge and the successor edge of each intersection line in the intersection information; based on the data structure of the graph, the intersection lines obtained by the intersection of each topological element are combined into a whole according to the predecessor edge and the successor edge to obtain the intersection line graph.
[0011] According to the topological intersection method of the boundary representation model for a three-dimensional geometry engine provided by the present invention, if the intersection line has multiple predecessor edges and successor edges, the data structure of the intersection line is constructed in the form of a circular linked list at the end point bifurcation of the intersection line.
[0012] According to the topological intersection method of the boundary representation model for a three-dimensional geometry engine provided by the present invention, in the intersection information, the intersection point is represented by an edge whose starting point and ending point are the same and whose geometric description is empty.
[0013] The present invention also provides a boundary representation model topology intersection device for a three-dimensional geometry engine, comprising the following modules: A bounding box interference check module is used to perform interference check on the boundary representation model from top to bottom through a bounding box algorithm based on the boundary representation model topological tree, and determine whether the topological elements of each level of the boundary representation model intersect. If they do not intersect, no topological intersection is performed on the non-intersecting topological elements; A topological element intersection module is used to intersect topological elements of each level of the boundary representation model if they intersect, and obtain corresponding intersection information; The intersection graph generation module is used to integrate the intersection information of each level of the boundary representation model to obtain an intersection graph.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the above-described methods for topological intersection of boundary representation models for a three-dimensional geometry engine.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for topological intersection of a boundary representation model for a three-dimensional geometry engine as described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned boundary representation model topology intersection methods for a three-dimensional geometry engine.
[0017] The present invention provides a method and device for topological intersection of a boundary representation model for a three-dimensional geometry engine. Through a top-down approach, combined with a bounding box algorithm, those topological elements that are obviously non-intersecting can be excluded at an earlier stage, thereby avoiding unnecessary intersection operations on them. In the process of topological intersection calling from top to bottom, the previous intersection information can be fully utilized, and more useful information can be transferred to the upper topology in the process of returning from bottom to top, reducing repeated calculations and improving the efficiency of the algorithm. At the same time, the processing of the topological intersection results of the present invention significantly improves the flexibility and versatility of topological intersection. Different from outputting separated intersection lines, the present invention generates an intersection line graph, converts the intersection lines into the form of a directed graph connected to each other, and combines discrete intersection lines into a whole, which is convenient for checking the correctness of topological intersection, facilitating the transmission of information between intersection lines, and making further use of intersection lines. The correct and efficient topological intersection algorithm designed by the present invention can be applied to entities with various complex boundaries. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is one of the flow charts of the B-Rep model topology intersection method for a three-dimensional geometry engine provided by the present invention.
[0020] Figure 2 It is a structural schematic diagram of a B-Rep model topology intersection device for a three-dimensional geometry engine provided by the present invention.
[0021] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] Some concepts involved in the present invention are described below.
[0024] Bounding box: The basic idea is to use a relatively simple closed space to completely contain the combination of objects. The bounding box of a topological entity is an algorithm for solving the optimal bounding space of a discrete point set. It uses a slightly larger but simpler geometric body (called a bounding box) to approximately replace complex geometric objects.
[0025] Predecessor: In topology, the predecessor of an element (such as an edge or vertex) is its previous adjacent element in some sequence or path. When describing the sequence of edges, the predecessor is the edge that points to the previous edge of the current edge.
[0026] Successor: In topology, the successor of an element is its next adjacent element in some sequence or path. When describing the sequence of edges, the successor is the next edge from the current edge.
[0027] Combine the following Figure 1-Figure 3 Embodiments of the present invention are described.
[0028] Figure 1 This is one of the flow charts of the B-Rep model topology intersection method for a three-dimensional geometry engine provided by the present invention, such as Figure 1 As shown, the method includes the following: S110: Based on the B-Rep model topology tree, the B-Rep model is subjected to interference check from top to bottom by using a bounding box algorithm to determine whether topological elements at each level of the B-Rep model intersect. If not, no topological intersection is performed on the non-intersecting topological elements.
[0029] According to the topological intersection method of the boundary representation model for the three-dimensional geometry engine provided by the present invention, the boundary representation model is checked for interference through a bounding box algorithm to determine whether the topological elements of each level of the boundary representation model intersect; if they do not intersect, no topological intersection is performed on the non-intersecting topological elements, specifically including: obtaining the bounding boxes of the topological elements of each level in the boundary representation model; performing bounding box-based collision detection on the topological elements of each level to determine whether the bounding boxes of the topological elements of each level intersect; if the bounding boxes of any level do not intersect, skipping the topological intersection operation of the corresponding level.
[0030] Specifically, the topological elements at each level are checked for interference based on bounding boxes, which can determine in advance which topological elements will not intersect without performing actual intersection operations. This strategy significantly reduces unnecessary calculations, thereby greatly improving the efficiency of the algorithm. Especially when dealing with large-scale or complex B-Rep models, this optimization can significantly reduce the use of computing resources and speed up processing.
[0031] Furthermore, by using the bounding boxes of topological entities (or topological elements) at each level, it is possible to quickly determine which topological entities do not intersect in geometric space, thereby avoiding unnecessary intersection operations. When it is found that the bounding boxes of a certain level do not intersect, the topological intersection of that level can be skipped directly, which not only reduces the amount of calculation, but also improves the response speed of the algorithm. For example, in the process of volume intersection, if the bounding boxes of two bodies do not intersect, the subsequent steps such as face-to-face intersection, edge-to-face intersection, and edge-to-edge intersection can be skipped directly; if the bounding boxes of two bodies intersect, they may also have several faces and several edges that do not intersect with each other. In this way, when intersecting the bodies, the topological entities whose bounding boxes do not collide can be skipped when traversing the faces and edges, which greatly improves the time efficiency of the algorithm.
[0032] S120: If they intersect, then the topological elements at each level of the B-Rep model are intersected to obtain corresponding intersection information.
[0033] According to the B-Rep model topology intersection method for a three-dimensional geometry engine provided by the present invention, each level of the B-Rep model includes volume-to-volume intersection, face-to-face intersection, edge-to-face intersection, and edge-to-edge intersection from top to bottom.
[0034] Specifically, in the B-Rep model topology intersection method for 3D geometry engines, a top-down intersection strategy for topological elements at each level of the B-Rep model is introduced based on the B-Rep model topology tree, and the topological boundary information of each dimension (point, line, and surface) is introduced to ensure accurate intersection results. This strategy starts with volume-volume intersection and is gradually refined to four main levels: face-face intersection, edge-face intersection, and edge-edge intersection. As the level increases from high to low, the boundary information included gradually increases, and the complexity of the implementation also increases accordingly.
[0035] Furthermore, since the boundary information of the high-level topology is composed of the low-level topology, the intersection between the high-level topologies will call the intersection of the low-level topology, and the low-level topology intersection will return the intersection information to the high-level topology. Topological intersection consists of four levels from top to bottom: volume-volume intersection, face-face intersection, edge-face intersection, and edge-edge intersection. The implementation of the lower-level topological intersection is relatively simple because it has less boundary information, while the higher-level topological intersection contains more boundary information and there are calls to the lower-level topological intersection, so the steps are relatively much more complicated. The entire topological intersection is implemented in a bottom-up order, that is, the edge-edge intersection is implemented first, and then the edge-face intersection is implemented based on this, and so on. The actual calling process is top-down, that is, the face-face intersection and other steps will be called in the volume-volume intersection, and the face-face intersection will call the lower-level edge-face intersection and other steps.
[0036] According to the boundary representation model topological intersection method for a three-dimensional geometry engine provided by the present invention, each level of the boundary representation model includes volume-volume intersection, face-face intersection, edge-face intersection, and edge-edge intersection from top to bottom; the topological elements of each level of the boundary representation model are intersected to obtain corresponding intersection information, specifically including: performing volume-volume intersection: intersecting all faces contained in an entity with all faces of another entity to obtain intersection lines of each face; performing face-face intersection: obtaining a geometric description of two faces, and determining the intersection line of the two faces based on the geometric description; performing edge-face intersection: obtaining all intersection vertices or intersection lines of an edge and a face; performing edge-edge intersection: obtaining all intersection points of two edges or intersection lines formed by the overlap of two edges.
[0037] According to the topological intersection method of the boundary representation model for a three-dimensional geometry engine provided by the present invention, in the intersection information, the intersection point is represented by an edge whose starting point and ending point are the same and whose geometric description is empty.
[0038] Specifically, in the body-body intersection, all faces contained in one B-Rep entity are intersected with all faces of another B-Rep entity one by one to obtain the intersection lines of each face.
[0039] For face-to-face intersection, for two input faces, their geometric descriptions are first extracted, and the intersection calculation between the surfaces is performed. In order to optimize the calculation process, the intersection of the bounding boxes of the two faces is used to eliminate the intersection results that obviously do not meet the conditions, thereby obtaining a series of valid intersection lines. It is worth noting that in order to maintain the uniformity of the expression form and facilitate the deduplication operation during the intersection process, the present invention regards the intersection point as a special edge with the same starting point and end point and an empty geometric description.
[0040] Edge-face intersection, the input is an edge and a face, and the output is all intersecting vertices or intersection lines; Edge-to-edge intersection, the input is two edges, and the output is all the intersection points between them or the intersection lines formed by the overlap of two edges.
[0041] In the whole intersection process, based on the top-down principle, we start from volume-volume intersection and gradually refine to face-face intersection, edge-face intersection, and edge-edge intersection. In this way, we can ensure the accuracy and consistency of the intersection results, providing strong support for subsequent topological analysis and processing.
[0042] According to the B-Rep model topological intersection method for a three-dimensional geometry engine provided by the present invention, each level of the boundary representation model includes volume-to-volume intersection, face-to-face intersection, edge-to-face intersection, and side-to-side intersection from top to bottom; the topological elements of each level of the boundary representation model are intersected to obtain corresponding intersection information, specifically including: performing volume-to-volume intersection, face-to-face intersection, edge-to-face intersection, and side-to-side intersection; in the process of volume-to-volume intersection, face-to-face intersection, edge-to-face intersection, and side-to-side intersection, the intersection information obtained at this level is transmitted to other levels; high-level intersection information is reused in the process of calculating the intersection of low-dimensional topological elements; and the intersection lines of high-dimensional topological elements are screened according to the low-level intersection information.
[0043] Specifically, in terms of the transmission of intersection information at each level, a top-down approach is used to ensure that the intersection information between levels can be transmitted accurately and timely. This includes reusing the information of high-dimensional topological intersection in the process of calculating the intersection of low-dimensional topological entities to avoid repeated calculations; at the same time, the intersection line information generated by the intersection of low-dimensional topological entities is used to screen the intersection lines of high-dimensional topological entities, quickly eliminating duplicate intersection lines, and further improving the efficiency of intersection.
[0044] Since the calling process of topological intersection is top-down, when calling the low-level topological intersection interface, some intersection information already obtained at the high level can be used to avoid some repeated calculations. Taking face-to-face intersection as an example, when several intersection lines between faces are obtained, they need to be clipped according to the boundaries of the faces, and the part of each intersection line that is inside the boundaries of both faces is retained. At this time, since the relationship between the intersection line and the two faces must be coplanar, and the curve where the intersection line is located must be located entirely within the surface where the face is located, the intersection calculation of the curve and the surface can be skipped, and the result of the geometric intersection can be directly obtained, and then subsequent calculations can be performed, thereby achieving the purpose of improving the intersection efficiency.
[0045] In addition to the top-down transmission of information, low-level topological intersection can also return relevant information of intersection lines to high-level topological intersection, thereby achieving the purpose of acceleration. Taking the deduplication of intersection lines in volume-to-volume intersection as an example, since the deduplication of intersection lines has been performed in face-to-face intersection, the overlapping intersection lines can only occur at the boundary of the face. Therefore, if the properties of each intersection line can be recorded in the low-level topological intersection, such as edge-face intersection, such as whether the intersection line coincides with a certain boundary of the face, and then this information is passed upward to the volume-to-volume intersection. When traversing the deduplication of intersection lines, skip all intersection lines that are not on the boundary. This situation accounts for a large proportion of the intersection lines. It is only necessary to determine whether there are duplicate intersection lines on the boundary.
[0046] By transmitting the intersection lines generated between different topological levels and the information obtained by intersection, unnecessary calculation steps are reduced and redundant calculations are avoided.
[0047] S130: Integrate the intersection information of each level of the B-Rep model to obtain an intersection graph.
[0048] According to the topological intersection method of the boundary representation model for the three-dimensional geometry engine provided by the present invention, the intersection information of each level of the boundary representation model is integrated to obtain an intersection line graph, which specifically includes: obtaining the predecessor edge and the successor edge of each intersection line in the intersection information; based on the data structure of the graph, the intersection lines obtained by the intersection of each topological element are combined into a whole according to the predecessor edge and the successor edge to obtain the intersection line graph.
[0049] According to the topological intersection method of the boundary representation model for a three-dimensional geometry engine provided by the present invention, if the intersection line has multiple predecessor edges and successor edges, the data structure of the intersection line is constructed in the form of a circular linked list at the end point bifurcation of the intersection line.
[0050] Specifically, the separated intersections are combined into a directed graph. Each edge stores its own predecessor and successor, so that the intersections obtained by the intersection of various topological elements are combined into a whole. If there are multiple predecessors and successors of an intersection, the intersections are organized in the form of a circular linked list at the bifurcation, so that each intersection only needs to remember at most one predecessor or successor to complete the traversal of a connected component of the entire intersection graph, thereby reducing storage overhead and facilitating subsequent maintenance and updates. At the same time, each intersection can easily obtain the adjacent intersection connected to it, which facilitates information transmission between intersections and makes the inspection and visualization of topological intersection results more efficient.
[0051] By combining the topological intersection results of the model based on a graph data structure, the intersection lines of the B-Rep model are integrated into a directed graph, which facilitates the correctness check of the topological intersection results and the transmission of information between intersection lines, as well as the visualization of the intersection results and the subsequent application of intersection lines in other scenarios.
[0052] The present invention designs a method for efficient topological intersection of B-Rep models. By utilizing the topological structure of the B-Rep model itself, quickly checking for interference, transmitting information of each dimension during the intersection process, and applying graphs, an accurate, easy-to-use, and conveniently expandable topological intersection result between two B-Rep models is ultimately generated efficiently and stably, thereby speeding up business processes such as Boolean operations and model modeling of a three-dimensional geometry engine, and having practical application significance.
[0053] The B-Rep model topology intersection device for a three-dimensional geometry engine provided by the present invention is described below. The B-Rep model topology intersection device for a three-dimensional geometry engine described below and the B-Rep model topology intersection method for a three-dimensional geometry engine described above can be referenced to each other.
[0054] The bounding box interference check module 210 is used to perform interference check on the B-Rep model from top to bottom based on the B-Rep model topology tree by using the bounding box algorithm to determine whether the topological elements of each level of the B-Rep model intersect. If they do not intersect, the topological intersection of the non-intersecting topological elements is not performed; A topological element intersection module 220 is used to intersect topological elements of each level of the B-Rep model if they intersect, and obtain corresponding intersection information; The intersection graph generation module 230 is used to integrate the intersection information of each level of the B-Rep model to obtain an intersection graph.
[0055] In one embodiment of the present invention, the topological element intersection module 220 also includes a data intersection line information transmission unit, which is used to transmit the intersection information obtained at this level to other levels in the process of intersection of each level from top to bottom; reuse high-level intersection information in the process of calculating the intersection of low-dimensional topological elements; and screen the intersection lines of high-dimensional topological elements according to low-level intersection information.
[0056] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the B-Rep model topology intersection method for the three-dimensional geometry engine, the method comprising: performing interference check on the boundary representation model from top to bottom through the bounding box algorithm based on the boundary representation model topology tree, and determining whether the topological elements of each level of the boundary representation model intersect; if they intersect, then intersecting the topological elements of each level of the boundary representation model to obtain corresponding intersection information; integrating the intersection information of each level of the boundary representation model to obtain an intersection line diagram.
[0057] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0058] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the B-Rep model topological intersection method for a three-dimensional geometric engine provided by the above methods. The method includes: performing interference checking on the boundary representation model from top to bottom through a bounding box algorithm based on the boundary representation model topological tree to determine whether the topological elements of each level of the boundary representation model intersect; if they intersect, intersecting the topological elements of each level of the boundary representation model to obtain corresponding intersection information; integrating the intersection information of each level of the boundary representation model to obtain an intersection line diagram.
[0059] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the B-Rep model topological intersection method for a three-dimensional geometric engine provided by the above-mentioned methods. The method includes: performing interference checking on the boundary representation model from top to bottom through a bounding box algorithm based on the boundary representation model topological tree to determine whether the topological elements of each level of the boundary representation model intersect; if they intersect, intersecting the topological elements of each level of the boundary representation model to obtain corresponding intersection information; integrating the intersection information of each level of the boundary representation model to obtain an intersection line diagram.
[0060] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0061] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A topological intersection method for a boundary representation model of a three-dimensional geometry engine, characterized in that: include: Based on the topological tree of the boundary representation model, an interference check is performed on the boundary representation model from top to bottom by a bounding box algorithm to determine whether topological elements at each level of the boundary representation model intersect; If they intersect, then the topological elements of each level of the boundary representation model are intersected to obtain corresponding intersection information; The intersection information of each level of the boundary representation model is integrated to obtain an intersection line graph.
2. The method for topological intersection of a boundary representation model for a three-dimensional geometry engine according to claim 1, characterized in that: The interference check of the boundary representation model is performed by the bounding box algorithm to determine whether the topological elements of each level of the boundary representation model intersect. If they do not intersect, the topological intersection of the non-intersecting topological elements is not performed, which specifically includes: Get the bounding box of each level of topological elements in the boundary representation model; Perform collision detection based on bounding boxes on topological elements at each level to determine whether the bounding boxes of topological elements at each level intersect; If the bounding boxes of any level do not intersect, the topological intersection operation of the corresponding level is skipped.
3. The boundary representation model topology intersection method for a three-dimensional geometry engine according to claim 1, characterized in that: The levels of the boundary representation model include volume-volume intersection, face-face intersection, edge-face intersection and edge-edge intersection from top to bottom; The intersecting topological elements of each level of the boundary representation model to obtain corresponding intersection information specifically includes: Perform body-body intersection: intersect all faces contained in a solid with all faces of another solid to obtain the intersection lines of each face; Performing face-to-face intersection: obtaining geometric descriptions of two faces, and determining the intersection line of the two faces according to the geometric descriptions; Perform edge-face intersection: obtain all intersecting vertices or intersection lines between an edge and a face; Perform edge-to-edge intersection: obtain all intersection points of two edges or the intersection lines formed by the coincidence of two edges.
4. The method for topological intersection of a boundary representation model for a three-dimensional geometry engine according to claim 1, characterized in that: The levels of the boundary representation model include volume-volume intersection, face-face intersection, edge-face intersection and edge-edge intersection from top to bottom; The intersecting topological elements of each level of the boundary representation model to obtain corresponding intersection information specifically includes: Perform body-body intersection, face-face intersection, edge-face intersection and edge-edge intersection; In the process of body-body intersection, face-face intersection, edge-face intersection and edge-edge intersection, the intersection information obtained at this level is transmitted to other levels; Reuse high-level intersection information in the process of computing the intersection of low-dimensional topological elements; The intersection lines of high-dimensional topological elements are screened based on low-level intersection information.
5. The method for topological intersection of a boundary representation model for a three-dimensional geometry engine according to claim 1, characterized in that: The step of integrating the intersection information of each level of the boundary representation model to obtain an intersection graph specifically includes: Get the predecessor edge and successor edge of each intersection line in the intersection information; Based on the data structure of the graph, the intersection lines obtained by intersecting various topological elements are combined into a whole according to the predecessor edge and the successor edge to obtain an intersection line graph.
6. The method for topological intersection of a boundary representation model for a three-dimensional geometry engine according to claim 5, characterized in that: If the intersection line has multiple predecessor edges and successor edges, the data structure of the intersection line is constructed in the form of a circular linked list at the end point bifurcation of the intersection line.
7. The method for topological intersection of a boundary representation model for a three-dimensional geometry engine according to claim 1, characterized in that: In the intersection information, the intersection point is represented by an edge whose start point and end point are the same and whose geometric description is empty.
8. A topological intersection device for a boundary representation model of a three-dimensional geometry engine, characterized in that: include: A bounding box interference check module is used to perform interference check on the boundary representation model from top to bottom through a bounding box algorithm based on the boundary representation model topological tree, and determine whether the topological elements of each level of the boundary representation model intersect. If they do not intersect, no topological intersection is performed on the non-intersecting topological elements; A topological element intersection module is used to intersect topological elements of each level of the boundary representation model if they intersect, and obtain corresponding intersection information; The intersection graph generation module is used to integrate the intersection information of each level of the boundary representation model to obtain an intersection graph.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the topological intersection method of the boundary representation model for a three-dimensional geometry engine is implemented as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the topological intersection method of the boundary representation model for a three-dimensional geometry engine as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Product three-dimensional model design method using GPU (Graphics Processing Unit) parallel processing
CN120219616A
