CAD two-dimensional and three-dimensional constraint system diagram decomposition method and system and medium

By using the slit point slicing and SPQR decomposition methods of the constraint system diagram in the CAD constraint system, the large-scale constraint system is decomposed into a set of subsystems with good local structure, solving the problems of low efficiency and poor stability in the existing technology, and achieving rapid and stable decomposition and efficient solution.

CN120012186AInactive Publication Date: 2025-05-16CHONGQING NUOYUAN IND SOFTWARE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510486501.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing CAD constraint system solution method is inefficient and poorly stable when dealing with large-scale nonlinear equation systems, and the traditional graph decomposition method has circular dependence problems.

Method used

Through the slit point slicing of the constraint system graph combined with SPQR decomposition, the large-scale constraint system is decomposed into a collection of subsystems with good local structures, and the correlation between subsystems is decoupled.

Benefits of technology

It realizes rapid and stable decomposition of large-scale constraint systems, reduces the complexity of solutions, avoids circular dependence problems, and improves the solution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012186A_ABST
    Figure CN120012186A_ABST
Patent Text Reader

Abstract

The invention discloses a CAD two-dimensional and three-dimensional constraint system graph decomposition method and system and a medium, and relates to the CAD technology, and the method comprises the steps that a CAD constraint system is constructed, and the CAD constraint system comprises geometric primitives and constraint objects; geometric primitives and constraint objects in the CAD constraint system are stored by adopting an adjacency list, and the CAD constraint system is converted into a constraint adjacency graph structure; segmenting the constrained adjacent graph structure into a plurality of double-connected sub-graphs; and for each double-connected sub-graph, decomposing the double-connected sub-graph into SPQR three-connected sub-graphs. According to the embodiment of the invention, the large-scale constraint system is decomposed into a subsystem set with a good local structure through combination of cut point segmentation of the constraint system diagram and SPQR decomposition, and association between subsystems is effectively decoupled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of CAD technology, and in particular to a method, system and medium for decomposing CAD two-dimensional and three-dimensional constraint system diagrams. Background Art

[0002] The solution methods of CAD constraint systems can be roughly divided into: numerical solution methods, symbolic algebra methods, graph theory-based methods, rule-based methods, etc.

[0003] The most natural and direct way to solve the CAD constraint system is to convert it into a set of equations and solve them numerically. However, the constraint system in actual CAD design involves a large number of geometric primitives and constraint relationships, and the constraint system increases exponentially with the increase in the number of geometric primitives and constraints, which leads to a huge scale of the converted nonlinear equation system. At present, there is no efficient and stable algorithm for solving large-scale nonlinear equations, and they are generally solved through numerical calculations.

[0004] The graph theory-based method adopts a divide-and-conquer strategy to decompose a large-scale constraint system into a set of independently solvable sub-constraint systems for solution, and adopts numerical methods to solve subsystems that cannot be further decomposed. Traditional methods such as Owen's triangular decomposition method, which decomposes a large-scale constraint system from top to bottom into a set of triangular subsystems, or Hoffmann's bottom-up graph reduction construction mechanism, are based on the premise that general geometric primitives and the constraint relationships between primitives can be converted into basic primitives and constraints such as the distance and angle between points and lines. The essence of Owen and Hoffmann's methods is to use triangular sub-constraint systems as the basic configuration for solving constraint systems, but the types of geometric primitives and geometric constraints that can be processed by this method are relatively fixed. At the same time, there will be different sets of sub-constraint system decompositions due to different starting search primitives and constraints. In addition, because general geometric primitives and constraints need to be decomposed into processable basic primitives and constraints, and the final triangular subsystem granularity is too fine, it may cause circular dependencies between subsystems. Summary of the invention

[0005] The embodiments of the present application provide a method, system and medium for decomposing CAD two-dimensional and three-dimensional constraint system diagrams. By combining the cut point segmentation of the constraint system diagram with SPQR decomposition, a large-scale constraint system is decomposed into a set of subsystems with good local structures, thereby effectively decoupling the associations between the subsystems.

[0006] The present application embodiment provides a CAD two-dimensional and three-dimensional constraint system diagram decomposition method, comprising:

[0007] Constructing a CAD constraint system, wherein the CAD constraint system includes geometric primitives and constraint objects;

[0008] Adopting adjacency table to store geometrical primitives and constraint objects in CAD constraint system, converting CAD constraint system into constraint adjacency graph structure;

[0009] Splitting the constrained adjacency graph structure into a plurality of biconnected subgraphs;

[0010] For each biconnected subgraph, decompose it into SPQR triconnected subgraphs.

[0011] An embodiment of the present application also provides a CAD two-dimensional and three-dimensional constraint system drawing decomposition system, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the aforementioned CAD two-dimensional and three-dimensional constraint system drawing decomposition method are implemented.

[0012] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the aforementioned CAD two-dimensional and three-dimensional constraint system diagram decomposition method are implemented.

[0013] The embodiment of the present application decomposes a large-scale constraint system into a set of subsystems with good local structures by combining cut point segmentation of the constraint system graph with SPQR decomposition, thereby effectively decoupling the associations between the subsystems.

[0014] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0016] Figure 1 The basic process diagram of the CAD two-dimensional and three-dimensional constraint system diagram decomposition method according to the embodiment of the present application is shown;

[0017] Figure 2 A schematic diagram of the geometric primitive structure of an embodiment of the present application;

[0018] Figure 3 This is a schematic diagram of the constraint structure of an embodiment of the present application;

[0019] Figure 4 A constrained sketch diagram of an embodiment of the present application is shown;

[0020] Figure 5 This is a schematic diagram of the constraint adjacency graph of an embodiment of the present application;

[0021] Figure 6 This is a schematic diagram of dividing the constrained adjacency graph of an embodiment of the present application into two biconnected subgraphs A and B;

[0022] Figure 7 Schematic diagram of a three-connected component node in an SPQR tree in an embodiment of the present application;

[0023] Figure 8 A constrained sketch diagram of an embodiment of the present application is shown;

[0024] Fig. 9 This is a schematic diagram of the constraint adjacency graph of an embodiment of the present application;

[0025] Fig.10 The three sub-graphs of the decomposition of the constraint adjacency graph of the embodiment of the present application are shown;

[0026] Fig.11 It is a schematic diagram of the SPQR nodes corresponding to the decomposed subgraphs of the embodiment of the present application. DETAILED DESCRIPTION

[0027] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0028] In solving the CAD constraint system, geometric primitives are mapped to variables, and the constraint relationships between primitives are mapped to algebraic equations, thereby mapping the constraint system to a set of algebraic equations. Although this mapping is more intuitive, the structural information between the geometric primitives contained in the original constraint system is lost, resulting in the constraint system lacking good interpretability in a geometric sense. The present application embodiment provides a CAD two-dimensional and three-dimensional constraint system graph decomposition method, such as Figure 1 As shown, the following steps are included:

[0029] In step S101, a CAD constraint system is constructed, and the CAD constraint system includes geometric primitives and constraint objects. The CAD constraint system is characterized by using a graph structure, which maps geometric primitives and constraint relationships between primitives into objects, and constructs the constraint system in an object-based manner. In some embodiments, the constructed CAD constraint system includes a constraint adjacency graph and a constraint association graph, wherein:

[0030] In the constrained adjacency graph, the vertices As objects, used to describe different types of geometric primitives, edges As a connection relationship between objects, it is used to express constraint relationships;

[0031] In the constraint association diagram, both geometric primitives and constraints between primitives are treated as objects. The vertices in To indicate that Represents the association and reference relationship between geometric entities and constraints between entities. The constraint association diagram can be further represented as: ,in, ,vertex is the system geometry, vertex Constraints between entities.

[0032] Whether it is a constraint adjacency graph or a constraint association graph, it is only a logical expression of the constraint system, and there is no essential difference in their structure. In the subsequent embodiments of this application, the constraint adjacency graph is used to represent the constraint system for illustration.

[0033] In step S102, the geometrical primitives and constraint objects in the CAD constraint system are stored in an adjacency list, and the CAD constraint system is converted into a constraint adjacency graph structure. The constraint system can be easily converted into a constraint adjacency graph structure through the constraint adjacency linked list structure in the constraint system.

[0034] In step S103, the constrained adjacency graph structure is divided into a plurality of biconnected subgraphs. The cut point search algorithm in the graph may adopt Tarjan's Algorithm for Finding Articulation Points.

[0035] In step S104, each biconnected subgraph is decomposed into SPQR triconnected subgraphs.

[0036] The embodiment of the present application decomposes a large-scale constraint system into a set of subsystems with good local structures through cut point segmentation of the constraint system graph combined with SPQR decomposition, which can effectively decouple the associations between the subsystems.

[0037] In some embodiments, using an adjacency list to store geometric primitives and constraints in a CAD constraint system includes:

[0038] The corresponding data structures are defined to store the geometric primitive structure and constraint objects between primitives of the CAD constraint system, where:

[0039] like Figure 2As shown, the data structure of the geometric primitive structure includes: geometric primitive type, parameter list, number of constraints and constraint list head pointer, and the constraint list head pointer points to the linked list head pointers of all constraints associated with the geometric primitive.

[0040] like Figure 3 As shown in the figure, the data structure of the constraint object between primitives includes: constraint type, constraint value, number of geometric primitives, geometric primitive list head pointer and constraint linked list pointer, wherein the geometric primitive list head pointer points to the linked list head pointer of all geometric primitives associated with the constraint. Depending on the constraint type, the number of geometric primitives associated with the constraint may be different, and may be 1, 2, 3 or 4. The constraint linked list pointer points to the next constraint in the constraint system.

[0041] In some embodiments, partitioning the constrained adjacency graph structure into a plurality of biconnected subgraphs comprises:

[0042] Determine that the constrained adjacency graph is a connected graph;

[0043] Find all the cut points in the constrained adjacency graph, where the point set of all the cut points is is a subset of the set of vertices in the constrained adjacency graph: ,satisfy Will Split into multiple biconnected subgraphs.

[0044] As an example, Figure 4 A dimensioned sketch is shown. Figure 4 The sketch surface contains 8 points and 8 line segments, and there are 16 implicit point-on-line constraints between these entities (the distance from the point to the line is 0), 4 point-to-point distance constraints, 8 line-to-line angle constraints, and 1 line-to-line distance constraint. Figure 5 It corresponds to Figure 4 By decomposing the constraint graph at the cut points (nodes L3 and L5), we get Figure 6 The two-part biconnected subgraph shown.

[0045] In some embodiments, for each biconnected subgraph, decomposing it into SPQR triconnected subgraphs includes:

[0046] For each biconnected subgraph, based on the implementation algorithm of Carsten and Petra, it is decomposed into SPQR three-connected subgraphs, and the decomposed SPQR three-connected subgraphs include four different types of three-connected component nodes: S nodes, P nodes, Q nodes and R nodes. In a specific example, for each biconnected subgraph, it is decomposed into SPQR three-connected subgraphs. In some examples, if the number of nodes in the biconnected subgraph to be decomposed is less than or equal to 10, the decomposition is stopped, and if it is greater than 10, the SPQR decomposition is continued. The SPQR decomposition of the constrained adjacency graph can be based on the implementation algorithm of Carsten and Petra: A Linear Time Implementation of SPQR-Trees, where:

[0047] like Figure 7 As shown in Figure 1, the SPQR tree is a decomposition of a biconnected graph, which is used to decompose the graph into a series of three-connected components. The tree consists of four different types of three-connected component nodes: S nodes, P nodes, Q nodes, and R nodes. Two adjacent nodes in the SPQR tree share a virtual edge, which represents the connection between two vertices. The connection exists in the original graph, but it is not necessarily an actual edge in the original graph.

[0048] S (Serial) node: a ring of at least 3 points. Each edge in the ring can be an edge in the original graph or a virtual edge;

[0049] P (Parallel) node: a dipole graph with at least 3 edges. The multiple edges can be edges of the original graph or virtual edges;

[0050] Q (Trivial) node: a graph with 2 points and a pair of heavy edges. One of the edges is an edge in the original graph, and the other is a virtual edge;

[0051] R (Rigid) node: a three-connected subgraph, where each edge can be an edge in the original graph or a virtual edge.

[0052] The SPQR tree can be represented as ,in Represents the set of all three-connected node components, and the node types can be divided into the above four types of nodes. Currently only They can be merged if they have common virtual edges.

[0053] The SPQR decomposition of constrained adjacency graphs can be based on the implementation algorithm of Carsten and Petra: A LinearTime Implementation of SPQR-Trees. Figure 8 A dimensioned sketch is shown. Figure 8The sketch contains 6 points and 4 line segments. There are 8 implicit point-on-line constraints between these primitives (the distance from the point to the line is 0), 2 point-to-line distance constraints, 3 line-line angle constraints, and 4 point-to-point distance constraints. Fig. 9 It corresponds to Figure 8 By SPQR decomposition of the constraint graph, we can get Fig.10 The three subgraphs shown are Fig.11 It corresponds to Fig.10 The SPQR node representation.

[0054] The complexity of the cut point segmentation and SPQR decomposition of the constraint system graph of the solution of the present application is linear, and rapid decomposition can be achieved for large-scale constraint systems. The cut point segmentation and SPQR decomposition of the constraint system graph are based on the connectivity properties of the graph, and can achieve stable decomposition of large-scale constraint systems without ambiguity. The cut point segmentation and SPQR decomposition of the constraint system graph in the embodiment of the present application well maintain the local double / triple connected structural properties of the constraint subsystem. Through the cut point segmentation of the constraint system graph combined with SPQR decomposition, the large-scale constraint system is decomposed into a set of subsystems with good local structures, and the associations between the subsystems are effectively decoupled, avoiding the decomposition of the local double / triple connected subsystems into smaller subsystems, and the circular dependency problem in the subsystem solution caused by reducing the complexity of solving large-scale constraint systems and improving the solution efficiency.

[0055] An embodiment of the present application also provides a CAD two-dimensional and three-dimensional constraint system drawing decomposition system, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the aforementioned CAD two-dimensional and three-dimensional constraint system drawing decomposition method are implemented.

[0056] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the aforementioned CAD two-dimensional and three-dimensional constraint system diagram decomposition method are implemented.

[0057] It should be noted that in the various embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0058] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0059] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0060] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for decomposing CAD two-dimensional and three-dimensional constraint system diagrams, characterized in that: include: Constructing a CAD constraint system, wherein the CAD constraint system includes geometric primitives and constraint objects; Adopting adjacency table to store geometrical primitives and constraint objects in CAD constraint system, converting CAD constraint system into constraint adjacency graph structure; Splitting the constrained adjacency graph structure into a plurality of biconnected subgraphs; For each biconnected subgraph, decompose it into SPQR triconnected subgraphs.

2. The CAD two-dimensional and three-dimensional constraint system diagram decomposition method according to claim 1, characterized in that: Adjacency tables are used to store geometric primitives and constraints in CAD constraint systems, including: The corresponding data structures are defined to store the geometric primitive structure and constraint objects between primitives of the CAD constraint system, where: The data structure of the geometric primitive structure includes: geometric primitive type, parameter list, constraint number and constraint list head pointer, wherein the constraint list head pointer points to the linked list head pointer of all constraints associated with the geometric primitive; The data structure of the constraint object between primitives includes: constraint type, constraint value, number of geometric primitives, geometric primitive list head pointer and constraint linked list pointer, and the geometric primitive list head pointer points to the linked list head pointers of all geometric primitives associated with the constraint.

3. The CAD two-dimensional and three-dimensional constraint system diagram decomposition method according to claim 1, characterized in that: Splitting the constrained adjacency graph structure into a plurality of biconnected subgraphs comprises: Determine that the constrained adjacency graph is a connected graph; Find all the cut points in the constrained adjacency graph, where the point set of all the cut points is is a subset of the set of vertices in the constrained adjacency graph: ,satisfy Will Split into multiple biconnected subgraphs.

4. The CAD two-dimensional and three-dimensional constraint system diagram decomposition method as claimed in claim 3, characterized in that: For each biconnected subgraph, decomposing it into SPQR triconnected subgraphs includes: For each biconnected subgraph, based on the implementation algorithm of Carsten and Petra, it is decomposed into a SPQR three-connected subgraph. The decomposed SPQR three-connected subgraph includes four different types of three-connected component nodes: S nodes, P nodes, Q nodes and R nodes, where: The S node is a ring consisting of at least 3 points, and each edge in the ring is an edge of the original graph or a virtual edge; The P node is a dipole graph including at least 3 edges, wherein the multiple edges of the dipole graph are edges of the original graph or virtual edges; Q node is a graph consisting of 2 points and a pair of heavy edges, one edge is an edge of the original graph and the other is a virtual edge; The R node is a three-connected subgraph, and each edge is an edge of the original graph or a virtual edge.

5. The CAD two-dimensional and three-dimensional constraint system diagram decomposition method according to claim 1, characterized in that: The constructed CAD constraint system includes a constraint adjacency graph and a constraint association graph, where: In the constrained adjacency graph, the vertices As objects, used to describe different types of geometric primitives, edges As a connection relationship between objects, it is used to express constraint relationships; In the constraint association diagram, both geometric primitives and constraints between primitives are treated as objects. The vertices in To indicate that Represents the association and reference relationship between geometric entities and constraints.

6. A CAD two-dimensional and three-dimensional constraint system diagram decomposition system, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the CAD two-dimensional and three-dimensional constraint system diagram decomposition method as claimed in any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the CAD two-dimensional and three-dimensional constraint system diagram decomposition method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Modeling expression method and system of two-dimensional CAD geometric constraint system

    CN117556485A

  • Assembly state determination method and device, equipment and storage medium

    CN117648730A

Cited By

  • Design intention-based building engineering geometric constraint solving method and system

    CN120408823A