Method and system for expressing CAD geometric constraint system diagram based on ternary body

By representing the geometric elements and engineering constraints of the CAD geometric constraint system using ternary geometry, a directed graph is constructed, which solves the problems of inconsistent representation and inconvenient maintenance of redundant constraints in the existing technology, and achieves efficient CAD solving.

CN121365433APending Publication Date: 2026-01-20HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511280985.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Existing graph theory-based CAD geometric constraint systems suffer from problems such as insufficient decomposition, poor uniformity, difficulty in expressing multi-dimensional constraints, and inconvenience in maintaining redundant constraints when expressing geometric elements and engineering constraints.

Method used

The geometric elements and engineering constraints in the engineering drawing are represented by a ternary volume. By combining position volume, attitude volume and parameter volume, a directed graph of geometric constraints is constructed. The directed arcs between the vertices of the graph are formed by the basic constraints. Redundancy analysis and adjustment are performed to ensure that the remaining degrees of freedom of the graph vertices are non-negative.

Benefits of technology

It achieves a unified expression of geometric constraint systems, reduces the solution scale, improves solution efficiency, facilitates the lookup of parameter volumes and the maintenance of redundant constraints, and provides a unified CAD solution engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365433A_ABST
    Figure CN121365433A_ABST
Patent Text Reader

Abstract

The invention belongs to the related technical field of computer aided design, and particularly discloses a CAD geometric constraint system diagram expression method and system based on a ternary body, CAD system expression is divided into three layers, the top layer is geometric elements and engineering constraints; the middle layer adopts a ternary body which comprises a position body representing the positions of the geometric elements, a posture body representing the postures of the geometric elements, and a parameter body representing the measurement of the geometric elements or between the geometric elements; the geometric constraint directed graph of the bottom layer comprises graph vertexes and directed edges, the graph vertexes comprise five types: cube vertexes corresponding to a position body, sphere vertexes corresponding to an attitude body, and parameter vertexes or constrained vertexes corresponding to a parameter body, and the whole can be used as a composite vertex when the subgraphs of the directed graph are subjected to overall analysis or non-constrained vertexes form a directed ring; and the directed arc records the constraint relation between the vertexes of the graph. According to the method, two-dimensional and three-dimensional engineering constraints and geometric elements are uniformly expressed, the geometric elements are decomposed more thoroughly, and the solving scale is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field related to computer aided design, and more particularly, relates to a CAD geometric constraint system graph expression method and system based on triad. BACKGROUND

[0002] The generation and development of CAD technology have brought great changes to the field of drawing design, greatly improving the drawing efficiency, and closely linking the past separated design, simulation and manufacturing links, providing a digital and intelligent technical foundation for modern manufacturing. As the core component of CAD software, the geometric constraint solving engine mainly provides support in scenes such as two-dimensional sketch design, three-dimensional assembly, direct modeling, mechanism simulation, etc. which need to be solved by constraint, and is an important cornerstone of parametric design. For the geometric constraint solving engine, the key technologies mainly include the expression of geometric constraint system, redundancy analysis and solving, etc. Among them, the expression method of geometric constraint system determines the design of redundancy analysis and constraint solving method.

[0003] The expression method of geometric constraint system mainly includes numerical calculation based method, symbolic calculation based method, rule based method and graph theory based method. Among them, the graph theory based method can effectively reduce the size of the solving equation through decomposition, fully utilize the geometric information such as degree of freedom, and has high solving efficiency, so it is widely used. However, the graph theory based method currently mostly uses geometric elements as graph vertices and engineering constraints as edges to express the geometric constraint system, which has the problems of insufficient decomposition of geometric elements in geometric level, non-uniform expression of two-dimensional and three-dimensional geometric elements and engineering constraints, difficulty in expressing multi-element constraints, and inconvenience in maintaining redundant constraints. Therefore, in view of the above problems, a new efficient CAD geometric constraint system graph expression method is urgently needed. SUMMARY

[0004] In view of the above defects or improvement needs of the prior art, the present application provides a CAD geometric constraint system graph expression method and system based on triad, which aims to solve the problem of unified expression of engineering constraints and geometric elements and effectively reduce the size of geometric constraint solving.

[0005] To achieve the above purpose, according to one aspect of the present application, a CAD geometric constraint system graph expression method based on triad is provided, which comprises the following steps: The geometric elements and engineering constraints in the engineering drawing are represented by triad; the triad includes position body, attitude body and parameter body, the position body represents the position of the geometric element, the attitude body represents the attitude of the geometric element, and the parameter body represents the measurement of the geometric element itself or the constraint measurement between geometric elements; Among them, geometric elements correspond to ternary bodies, and engineering constraints are decomposed into combinations of several basic constraints, with each basic constraint corresponding to a parameter body; Based on the ternary form graph vertices, and based on the basic constraints form directed arcs between the vertices of the graph, a geometrically constrained directed graph is constructed. The graph vertices include the following five categories: position volume corresponds to cube vertices; attitude volume corresponds to sphere vertices; for parametric volumes formed by geometric elements, their corresponding parametric vertices are; for parametric volumes formed by basic constraints, their corresponding constraint vertices are; when several unconstrained vertices form a directed cycle on the graph or when it is necessary to analyze the entire directed graph subgraph, the entire graph is treated as a composite vertex.

[0006] As a further preferred approach, directed arcs are formed between graph vertices based on fundamental constraints. For each fundamental constraint, including: Initial matching: Establish directed arcs from each non-constrained vertex related to the basic constraint to the constrained vertex corresponding to that basic constraint; Constraint matching: Based on the initial matching, for each unconstrained vertex related to the basic constraints, if there is an unconstrained vertex with a residual degree of freedom greater than 0, then take that unconstrained vertex as the head vertex, and the remaining unconstrained vertices related to the basic constraints and the corresponding constrained vertices as the tail vertices, and modify the initial matching into a directed arc from the tail vertex to the head vertex; otherwise, keep the initial matching. Redundancy analysis: Based on constraint matching, if the basic constraints are redundant, the constraint matching is modified so that each non-constraint vertex related to the basic constraint points to the directed arc of the corresponding constraint vertex; otherwise, the constraint matching is maintained.

[0007] As a further preferred option, when constructing a geometrically constrained directed graph, it is ensured that the remaining degrees of freedom of all graph vertices are non-negative.

[0008] As a further optimization, the method for determining whether the basic constraints are redundant is as follows: First, change the degrees of freedom of the sphere vertices and cube vertices related to the world coordinate system from the default 0 to their degrees of freedom in the corresponding dimensions; Then, the subgraph formed by the set of graph vertices corresponding to the basic constraint and the related directed arcs is replaced with a composite vertex, which inherits all incoming arcs pointing to the corresponding subgraph. Then, we try to reverse the incoming arcs of the composite vertex so that the basic constraint represented by the incoming arc that was matched to the composite point is rematched to the graph vertices outside the composite vertex. Finally, it is determined whether there is an incoming arc at the composite vertex. If there is an incoming arc, it is considered redundant. If there is no incoming arc, the remaining degrees of freedom of the composite vertex are further determined relative to the degrees of freedom of the spanned space in the corresponding dimension. If it is less than the degree of freedom of the spanned space, it is considered redundant; otherwise, it is not redundant.

[0009] As a further preferred option, the formula for calculating the remaining degrees of freedom of the graph vertices is:

[0010] wherein, represents the free degree of the graph vertex ; represents the free degree of the graph vertex , inherited from the corresponding triad, expressed as the number of incoming arcs that can accommodate different basic constraints; represents the number of matching constraints of the graph vertex .

[0011] As a further preferred, when the geometric elements or engineering constraints are pruned, the geometric constraint directed graph is adjusted as follows: When a geometric element is deleted, the corresponding graph vertex and directed arc are deleted, and all the constraint vertices and related directed arcs corresponding to the basic constraints related to the geometric element are also deleted; When an engineering constraint is deleted, all the constraint vertices and related directed arcs corresponding to the basic constraints related to the engineering constraint are deleted.

[0012] As a further preferred, after the geometric constraint directed graph is adjusted corresponding to the geometric element or engineering constraint pruning, the geometric constraint directed graph is further maintained, including: determining whether the deleted basic constraint has a conflict of redundant basic constraints, if not, maintaining the original state; If so, all redundant basic constraints are re-constrained matched by sequentially using the process of creating new basic constraints; for each original redundant basic constraint: if the constraint matching is successful and it is determined to be non-redundant through redundancy analysis, the non-constraint vertex found by the constraint matching is taken as the head vertex, the remaining non-constraint vertices and the corresponding constraint vertices related to the basic constraint are taken as the tail vertices, and a directed arc from the tail vertex to the head vertex is established; otherwise, the original state is maintained.

[0013] As a further preferred, the triad expression of two-dimensional geometric elements is as follows: Point: expressed by a position body, the position body stores the coordinate position of the point, which is mapped to a cube vertex on the graph; Straight line: expressed by a position body and an attitude body, the position body represents the polar distance point of the straight line, and the attitude body represents the direction of the straight line; mapped to a cube vertex and a sphere vertex on the graph, and an arc from the sphere vertex to the cube vertex is added, representing a polar distance constraint; Circle: expressed by a position body and a parameter body, the position body represents the center of the circle, and the parameter body represents the radius of the circle, which is mapped to a cube vertex and a parameter vertex on the graph; Line segment: split a line segment into a straight line, two end points, and two engineering constraints of the end points on the straight line; where the straight line is represented as a cube vertex and a sphere vertex by the above method, and the two end points are mapped as two independent cube vertices; two constraint vertices are established, for the engineering constraint of the first end point on the straight line, three arcs are established respectively from the first constraint vertex, the straight line cube vertex, and the straight line sphere vertex to the first end point cube vertex; for the engineering constraint of the second end point on the straight line, three arcs are established respectively from the second constraint vertex, the straight line cube vertex, and the straight line sphere vertex to the second end point cube vertex; Arc: split an arc into a circle, two end points, and two engineering constraints of the end points on the circle; where the circle is represented as a cube vertex and a parameter vertex by the above method, and the two end points are mapped as two independent cube vertices; two constraint vertices are established, for the engineering constraint of the first end point on the circle, three arcs are established respectively from the first constraint vertex, the circle cube vertex, and the circle parameter vertex to the first end point cube vertex; for the engineering constraint of the second end point on the circle, three arcs are established respectively from the second constraint vertex, the circle cube vertex, and the circle parameter vertex to the second end point cube vertex.

[0014] As a further preferred, the ternary expression of three-dimensional geometric elements is as follows: Rigid body: expressed by a position body and an attitude body, the position body represents the position of the rigid body, and the attitude body represents the pose of the rigid body; mapped on the graph as a cube vertex and a sphere vertex; Point: expressed by a position body, the position body stores the coordinate position of the point; mapped on the graph as a cube vertex; Straight line: expressed by a position body and an attitude body, the position body represents the polar distance point of the straight line, and the attitude body represents the direction of the straight line; mapped on the graph as a cube vertex and a sphere vertex, and an arc from the sphere vertex to the cube vertex is added, representing a polar distance constraint; at the same time, an arc from the sphere vertex to itself is added, representing a spin constraint; Circle: expressed by a position body, an attitude body, and a parameter body, the position body represents the center of the circle, the attitude body represents the normal vector of the plane where the circle lies, and the parameter body represents the radius of the circle; mapped on the graph as a cube vertex, a sphere vertex, and a parameter vertex; Plane: expressed by a position body and an attitude body, the position body represents the polar distance point of the plane, and the attitude body represents the normal vector of the plane; mapped on the graph as a cube vertex and a sphere vertex, and two arcs from the sphere vertex to the cube vertex are added, representing two polar distance constraints; at the same time, an arc from the sphere vertex to itself is added, representing a spin constraint; Sphere: expressed by a position body and a parameter body, the position body represents the center of the sphere, and the parameter body represents the radius of the sphere; mapped on the graph as a cube vertex and a parameter vertex; Cylinder: a cylinder is composed of a line through the cylinder axis and a radius parameter, that is, a parameter body is added to the line trichotomy expression, and the parameter body stores the radius parameter of the cylinder; the cylinder mapping on the graph is equivalent to adding a parameter vertex to the line mapping on the graph; Line segment: a line segment is split into a line, two end points, and two end point engineering constraint expressions on the line; the line is expressed by a cube vertex and a sphere vertex according to the above method, and the two end points are mapped to two independent cube vertices; for the engineering constraint of the first end point on the line, two basic constraint combinations are expressed, two constraint vertices are established, for the first basic constraint, three arcs are established from the first constraint vertex, the line cube vertex, and the line sphere vertex to the first end point cube vertex; and three arcs are established from the other constraint vertex, the line cube vertex, and the line sphere vertex to the same end point cube vertex; and the engineering constraint of the other end point on the line is expressed in the same way; Arc: an arc is split into a circle, two end points, and two point engineering constraint expressions on the circle; the circle is expressed by a cube vertex, a sphere vertex, and a parameter vertex according to the above method, and the two end points are mapped to two independent cube vertices; for the engineering constraint of the first end point on the circle, two basic constraint combinations are expressed, two constraint vertices are established, for the first basic constraint, three arcs are established from the first constraint vertex, the circle cube vertex, and the circle sphere vertex to the first end point cube vertex; and three arcs are established from the other constraint vertex, the circle cube vertex, and the circle parameter vertex to the same end point cube vertex; and the engineering constraint of the other end point on the circle is expressed in the same way.

[0015] According to another aspect of the present application, a trichotomy-based CAD geometric constraint system is provided, which adopts the above trichotomy-based CAD geometric constraint system graph expression method.

[0016] Overall, compared with the prior art, the above technical solutions conceived by the present application mainly have the following technical advantages: 1. The CAD system is layered, the geometric elements of the geometric constraint system are decomposed according to the trichotomy, and are mapped to the geometric constraint directed graph, so that any geometric constraint system can be converted into a geometric constraint directed graph expressed by trichotomy graph vertices. The top layer is used for user interaction, the middle layer records data information, and the lowest layer performs graph-related operations, so that the expression level is clear, the high-dimensional geometric elements are changed into one-dimensional graph expressions, and the decomposition on the geometric level is more detailed, so that the solving scale is reduced and the constraint solving difficulty is reduced.

[0017] 2. The unified abstract model based on triad and directed graph provides a non-discriminatory expression paradigm for two-dimensional and three-dimensional geometric constraint systems, and is beneficial to construct a unified CAD solving engine.

[0018] 3. The parameter body records all information of the constraint, so that for the introduction of the parameter body, it is more convenient to find the related geometric elements corresponding to the engineering constraint, and whether the constraint is redundant can be directly obtained from the type of the constraint vertex, and the maintenance of the redundant engineering constraint is facilitated. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A layered table display diagram of the CAD geometric constraint system of the embodiment of the present application is shown; Figure 2 A triad graph mapping diagram of the basic constraint of the embodiment of the present application is shown; Figure 3 A triad graph mapping diagram of the two-dimensional point, straight line and circle of the embodiment of the present application is shown; Figure 4 A triad graph mapping diagram of the two-dimensional line segment of the embodiment of the present application is shown; Figure 5 A triad graph mapping diagram of the two-dimensional circular arc of the embodiment of the present application is shown; Figure 6 A triad graph mapping diagram of the three-dimensional point, circle and rigid body of the embodiment of the present application is shown; Figure 7 A triad graph mapping diagram of the three-dimensional straight line of the embodiment of the present application is shown; Figure 8 A triad graph mapping diagram of the three-dimensional plane of the embodiment of the present application is shown; Figure 9 A triad graph mapping diagram of the three-dimensional circle of the embodiment of the present application is shown; Figure 10 A triad graph mapping diagram of the three-dimensional cylindrical surface of the embodiment of the present application is shown; Figure 11 A triad graph mapping diagram of the three-dimensional line segment of the embodiment of the present application is shown; Figure 12 A triad graph mapping diagram of the three-dimensional circular arc of the embodiment of the present application is shown; Figure 13 A flow chart of adding an engineering constraint in the embodiment of the present application is shown; Figure 14 A flow chart of maintaining a redundant engineering constraint in the embodiment of the present application is shown. DETAILED DESCRIPTION

[0020] In order to make the objects, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application, and are not used to limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0021] The embodiment of the present application provides a CAD geometric constraint system graph expression method based on a triad, which aims to serve as a bottom technology support for a CAD geometric constraint solving engine. The method expresses a CAD geometric constraint system in the form of a geometric constraint directed graph, each geometric element and engineering constraint in the system is expressed by corresponding triad graph vertices and directed arcs therebetween, and the geometric constraint directed graph formed by the method is a basis for geometric constraint solving.

[0022] As shown in Figure 1 , the expression of a CAD system is divided into three layers, the top layer is geometric elements that can be perceived by users, such as points, straight lines, circles, circular arcs, planes, cylindrical surfaces and the like, and engineering constraints added to the geometric elements, such as straight line horizontal, straight line vertical, line-line collinear, line-circle tangent and the like, which are combined to form a geometric constraint system. The middle layer is a triad expression of geometric elements and engineering constraints, which represents the decomposition of the geometric layer. The lowermost layer is a geometric constraint directed graph composed of triad graph vertices, and finally the geometric elements and engineering constraints in the top layer are expressed by the combination of triad graph vertices, and the directed arcs in the directed graph represent the constraint relationship between the geometric elements.

[0023] Under this architecture, the modeling process of the CAD system is converted into the construction process of the directed graph. In the upper CAD system, each newly added geometric element or engineering constraint corresponds to the construction of a subgraph representing the object in the directed graph. Specifically: (1) For the middle layer, the triad includes a position body, a posture body and a parameter body, wherein the position body represents the position of the geometric element, the posture body represents the posture of the geometric element, and the parameter body represents the measurement of the geometric element itself or between the geometric elements. Each geometric element can be expressed in the form of a triad by decomposition. Each engineering constraint can be decomposed into a combination of basic constraints, and the basic constraint represents the constraint measurement between the geometric elements and belongs to a special parameter. Each basic constraint corresponds to a parameter body, and the basic constraint information is recorded through the parameter body.

[0024] Based on the ternary expression of the intermediate layer, the two-dimensional and three-dimensional geometric constraint system is mapped into a one-dimensional geometric constraint directed graph. The ternary records the detailed information in the geometric layer, and the directed graph is used for the specific graph algorithm operations such as redundancy analysis and solution sequence acquisition. For the intermediate layer, each geometric element is characterized by position, pose, and parameter, which are three independent components in the geometric layer. The smaller the size of the solving equation is, the smaller the size of the solving equation is. The ternary has degrees of freedom, which are used to represent the minimum number of independent variables of the ternary. For a geometric element, the degrees of freedom are the number of independent parameters required to determine the pose and shape of the geometric element. The ternary expression of the geometric element should satisfy the corresponding equality of the degrees of freedom.

[0025] (2) For the bottom layer directed graph, it is divided into graph vertices and directed arcs.

[0026] Graph vertices: according to different geometric meanings, they are divided into the following types, position body corresponding to cubic vertex ; pose body corresponding to spherical vertex . Parameter body is more complex, when representing the measurement of the shape parameters of geometric elements such as radius and diameter, it corresponds to parameter vertex ; when the parameter body represents the constraint measurement between geometric elements, it corresponds to constraint vertex , and according to whether it is redundant, the constraint vertex can be divided into measurement vertex and control vertex ; in addition, vertices and directed arcs can form subgraphs, which can be replaced by a composite vertex to represent this situation, which often occurs when the directed graph is linearized, and is used to replace the directed ring formed by cubic vertex, spherical vertex, and parameter vertex on the graph, or in any graph algorithm that needs to analyze the whole subgraph.

[0027] Therefore, the geometric constraint directed graph based on ternary is composed of five types of graph vertices :

[0028] Directed arc: is a directed edge from one graph vertex to another graph vertex, here the graph vertex being pointed to is called the head vertex of the directed arc, which is its in-arc, the vertex pointing to the other vertex is called the tail vertex of the directed arc, which is its out-arc. The directed arc records the constraint relationship between the graph vertices, which is convenient to find the constraint information. The basic constraint of the three-element graph expression includes the constraint vertex and the directed arc formed between the constraint vertex and the constraint related vertex (cube vertex, sphere vertex, parameter vertex). For the directed arc on the constraint vertex, when the constraint is not redundant, the constraint vertex is the control vertex, and the directed arc is from the control vertex to a certain constraint matching vertex in the constraint related vertex; when the constraint is redundant, the constraint vertex is the measurement vertex, and the directed arc points to the measurement vertex. When the redundant constraint becomes a non-redundant constraint, the directed arc is adjusted to the form in the non-redundant state, that is, the maintenance of the redundant constraint is completed.

[0029] Specifically, when establishing a directed arc, after completing the initial matching based on the basic constraint, constraint matching is performed: as shown in Figure 2 For a non-redundant (regular) basic constraint, that is, for each non-constraint vertex related to the basic constraint, the remaining degrees of freedom of the non-constraint vertex are greater than 0, and the non-constraint vertex is the matching vertex; usually find a non-constraint vertex type vertex in the vertex set related to the constraint as the head vertex of the directed arc, and the remaining vertices in the set as the tail vertices, to form multiple directed arcs with the tail vertices pointing to the head vertex. This process is called graph matching of the constraint, simply called constraint matching, and the graph vertex pointed by the directed arc is called the matching vertex of the basic constraint.

[0030] Further redundancy analysis: if the basic constraint is not redundant, maintain the constraint matching. If the constraint is redundant, take the constraint vertex (which is the measurement vertex at this time) as the head vertex, and the other vertices in the constraint related vertex set as the tail vertices, to form multiple directed arcs. The constraint degree of the basic constraint is 1 in two and three dimensions, so the remaining degrees of freedom of the pointed vertex are reduced by 1. It should be noted that any graph vertex must satisfy the premise that the remaining degrees of freedom are greater than or equal to 0. Therefore, on the geometric constraint directed graph, each graph vertex can have unlimited out-arc pointing to other vertices, but the number of matching basic constraints on the in-arc cannot exceed the vertex degrees of freedom. The direction of the directed arc constitutes a partial order relation, representing the influence of the predecessor vertex on the successor vertex, and lays the foundation for subsequent geometric constraint solving. It should be noted that in fact, the constraint matching is also a simple redundancy judgment, that is, if a matching vertex can be found, the constraint is not redundant; the subsequent redundancy analysis is a further judgment of the redundancy of the constraint.

[0031] Further, it is necessary to ensure that the remaining degrees of freedom of all graph vertices are greater than or equal to 0. The degrees of freedom of the graph vertex are inherited from the corresponding three-element, which is represented on the graph as the number of in-arc that can accommodate different basic constraints. is the vertex degree of freedom, and the number of vertex matching constraints is , is the vertex of the remaining degrees of freedom:

[0032] two-dimensional geometric space ; three-dimensional geometric space , ; control vertex There are only two states, the measurement vertex with 1 degree of freedom and the control vertex with 0 degree of freedom . Compound vertex The degree of freedom is equal to the overall degree of freedom of the subgraph.

[0033] Further, the redundancy analysis of the basic constraint can be performed in the prior art manner, or the following method can be used: First, the degrees of freedom of the sphere vertex and the cube vertex representing the world coordinate system are modified from the default 0 (the world coordinate system is used as the reference for positioning and pose determination, and the default is similar to the control vertex, which can only have an entry arc and cannot be pointed to by other vertices) to the normal value in the corresponding dimension (i.e., the degree of freedom of the cube vertex is 2 in two dimensions and 3 in three dimensions, and the degree of freedom of the sphere vertex is 1 in two dimensions and 3 in three dimensions). The subgraph formed by the vertex set corresponding to the basic constraint and the related directed arc is replaced by a compound vertex, which inherits all the entry arcs pointing to the subgraph corresponding to the basic constraint outside; the degree of freedom of the compound vertex is augmented, i.e., the entry arcs of the compound vertex are reversed, so that the external matching represented by the entry arcs is re-matched to the vertices outside the compound vertex. Finally, it is judged whether there is an entry arc to the compound vertex, and if there is an entry arc, it is redundant, otherwise, the internal remaining degree of freedom of the compound vertex is compared with the degree of freedom of the space spanned in the corresponding dimension, and if it is less than the degree of freedom of the space spanned in the corresponding dimension, it is redundant, otherwise it is not redundant. Specifically, the degree of freedom of the space spanned by the basic constraint refers to the remaining degree of freedom of the vertex set related to the basic constraint without involving other basic constraints. If it is greater than the degree of freedom of the space in which it is located (2 in two dimensions and 6 in three dimensions), the degree of freedom of the space spanned is equal to the degree of freedom of the space in which it is located, and if it is less than or equal to the degree of freedom of the space in which it is located, the degree of freedom of the space spanned is equal to the remaining degree of freedom. After the redundancy analysis is completed, the sphere vertex and the cube vertex representing the world coordinate system need to be augmented in degree of freedom, and the corresponding degree of freedom needs to be restored to the default value of 0.

[0034] The following describes the ternary expression and graph mapping method in more detail.

[0035] (1) Ternary expression and graph mapping method of basic geometric elements: Two-dimensional geometric elements: Point: as shown in Figure 3 , expressed by a single position body, which stores the coordinate position of the point ; mapped onto the graph as the vertices of a cube. It has 2 degrees of freedom.

[0036] Straight line: such as Figure 3 As shown, the equation is represented by a position volume and an attitude volume. The position volume represents the polar distance point of the line (the intersection of the perpendicular line drawn from the origin to the line), and the attitude volume represents the direction of the line. The position volume stores the coordinates of the polar distance point. The attitude volume stores a unit vector representing the direction of a straight line. A straight line has 2 degrees of freedom in two dimensions, and is mapped to the vertex of a cube on a graph. and a sphere vertex There are a total of 3 degrees of freedom. Therefore, we add an arc from the vertex of the sphere to the vertex of the cube, representing a polar moment constraint, which means that the vector from the origin to the polar moment point must be perpendicular to the unit vector in the direction of the line. The polar moment constraint is a basic constraint and also a topological constraint, which is automatically satisfied and has no redundancy, so no constraint vertices are introduced. Thus, the total degree of freedom of the graph vertices of the line is 2.

[0037] Circle: as Figure 3 As shown, the circle is represented by a position volume and a parameter volume. The position volume represents the center of the circle, and the parameter volume represents the radius of the circle. The cube stores the coordinates of the center. The parameter body stores the radius value r of the circle. It is mapped to a cube vertex on the graph. A parameter vertex It has 3 degrees of freedom.

[0038] Line segment: such as Figure 4 As shown, the line segment is divided into a straight line, two endpoints, and two engineering constraints on the line. The straight line is represented by a cube vertex using the method described above. A sphere vertex representation The two endpoints are mapped to two independent cube vertices. , and the coordinates of the endpoints , Store them on their respective position volumes. Establish two constraint vertices. For the constraint that the first point is on the line, three arcs are created, one from the first constraint vertex, one from the line cube vertex, and one from the line sphere vertex, pointing to the first endpoint cube vertex, respectively. These arcs represent the basic constraint corresponding to the engineering constraint that the first endpoint is on the line. The constraint that the other endpoint is on the line is expressed in the same way, ultimately forming a ternary graph vertex representation of the line segment with 4 degrees of freedom.

[0039] Arc: such as Figure 5As shown, the arc is decomposed into a circle, two endpoints, and two engineering constraints on the circle; the circle is represented by a cube vertex using the above method. A parameter vertex The expression maps the two endpoints to two independent cube vertices. , and the coordinates of the endpoints , Store them on their respective position volumes. Establish two constraint vertices. For the first constraint that the point is on the circle, three arcs are created, each originating from the first constraint vertex, the vertex of the circular cube, and the vertex of the circular parameter, pointing to the vertex of the first endpoint cube, respectively, to represent the basic constraint corresponding to the engineering constraint that the point is on the circle. The constraint that the other endpoint is on the circle is expressed in the same way, ultimately forming a ternary graph vertex representation of the circular arc, with 5 degrees of freedom.

[0040] 3D geometric elements: Rigid body: such as Figure 6 As shown, the rigid body is represented by a position volume and an attitude volume. The position volume represents the position of the rigid body, and the attitude volume represents its pose. The position volume stores the origin of the rigid body's local coordinate system. The coordinate position is stored in a sphere, which contains a local coordinate system, including the unit vector. f and two with f Unit vectors that are perpendicular and mutually perpendicular h and g A rigid body is mapped onto a graph as the vertices of a cube. and the vertex of the sphere The degree of freedom is 6 Point: such as Figure 6 As shown, it is represented by a single position volume, which stores the coordinates of the point. ; mapped onto the graph as the vertices of a cube. It has 3 degrees of freedom.

[0041] Straight line: such as Figure 7 As shown, a two-dimensional straight line is represented by a position volume and an attitude volume. The cube stores the coordinates of the polar distance point. A sphere stores a unit vector representing the direction of a line. f and two with f Unit vectors that are perpendicular and mutually perpendicular h and g A straight line has 4 degrees of freedom in 3D, which is mapped to the vertex of a cube on a graph. and a sphere vertex Since the line has a total of 6 degrees of freedom, an arc is added from the vertex of the sphere to the vertex of the cube, representing a polar moment constraint. This constraint states that the vector from the origin to the polar moment point must be perpendicular to the unit vector in the direction of the line. Simultaneously, an arc is added from the vertex of the sphere to itself, representing a spin constraint. This constraint states that the degree of freedom of the line decreases by 1 when it rotates in space along its own direction. Like the polar moment constraint, the spin constraint is a topological constraint and is not redundant. Thus, the total degree of freedom of the graph vertices of the line is 4.

[0042] Circle: as Figure 6 As shown, the circle is represented by a position volume, an attitude volume, and a parameter volume. The position volume represents the center of the circle, the attitude volume represents the normal vector of the plane containing the circle, and the parameter volume represents the radius of the circle. The position volume stores the coordinates of the circle's center. The attitude volume stores the unit vector representing the normal vector of the circular plane. f and two with f Unit vectors that are perpendicular and mutually perpendicular h and g The parameter body stores the radius value r of the circle. The circle is mapped to the vertices of a cube on the graph. Vertex of the sphere and parameter vertex It has 7 degrees of freedom.

[0043] Plane: such as Figure 8 As shown, it is represented by a position volume and an attitude volume, where the position volume represents the polar point of the plane. (The point where the perpendicular lines drawn from the origin to the plane intersect) represents the normal vector of the plane. The position volume stores the coordinates of the polar distance point, and the attitude volume stores the unit vector representing the normal vector of the plane. f and two with f Unit vectors that are perpendicular and mutually perpendicular h and g A plane has 3 degrees of freedom in 3D, which is mapped to the vertices of a cube on a graph. and a sphere vertex There are a total of 6 degrees of freedom. Therefore, we add an arc from the vertex of the sphere to the vertex of the cube, representing a polar distance constraint. This constraint means that the vector from the origin to the polar distance must satisfy the condition of the unit vector. h Perpendicular. Similarly, add a polar moment constraint, which states that the vector from the origin to the polar moment point must satisfy the condition of a unit vector. g Perpendicular. Simultaneously, an arc pointing from the vertex of the sphere towards itself is added, representing a spin constraint, indicating that the degree of freedom of the plane rotating in space along the normal direction is reduced by 1. Thus, the total degree of freedom of the plane's graph vertices is 3.

[0044] Sphere: such as Figure 9As shown, the sphere is represented by a position volume and a parameter volume. The position volume represents the center of the sphere, and the parameter volume represents the radius of the sphere. The position volume stores the coordinates of the sphere's center. The parameter body stores the radius value r of the sphere. The sphere is mapped onto the graph as the vertices of a cube. and parameter vertex It has 4 degrees of freedom.

[0045] Cylindrical surface: such as Figure 10 As shown, it consists of a straight line passing through the axis of symmetry of the cylinder and a radius parameter. That is, it adds a parameter body to the linear ternary representation, which stores the radius parameter *r* of the cylinder. Mapping the cylinder on the graph is equivalent to adding a parameter vertex to the graph mapping of the straight line. The total degrees of freedom are 5.

[0046] Line segment: such as Figure 11 As shown, the line segment is divided into a straight line, two endpoints, and two points representing engineering constraints on the line; the straight line is represented by a cube vertex using the method described above. and a sphere vertex The expression maps the two endpoints to two independent cube vertices. , and the coordinates of the endpoints , These are stored on their respective position volumes. For the first point's line constraint, two basic constraints need to be combined to express it; first, two constraint vertices are established. For the first basic constraint, three arcs are constructed, each originating from the first constraint vertex, the vertex of the linear cube, and the vertex of the linear sphere, pointing towards the vertex of the first endpoint cube, to represent the distance between that endpoint and the polar point of the linear orientation volume stored in the linear orientation volume. g The projection of the direction vector is 0; then, starting from another constrained vertex, the vertex of the linear cube, and the vertex of the linear sphere, three arcs are established pointing to the same endpoint vertex of the cube, to represent the distance between that endpoint and the linear polar distance point stored in the linear attitude volume. h The projection onto the direction vector is 0. These two basic constraints constitute the first engineering constraint with the endpoint on the straight line. The engineering constraint with the other endpoint on the straight line is expressed in the same way, ultimately forming the vertex representation of the three-element graph of the straight line segment, with 6 degrees of freedom.

[0047] Arc: such as Figure 12 As shown, the arc is decomposed into a circle, two endpoints, and two engineering constraints on the circle; the circle is represented by a cube vertex using the above method. A vertex of a sphere and a parameter vertex The expression maps the two endpoints to two independent cube vertices. , and the coordinates of the endpoints , These are stored on their respective position volumes. For the constraint that the first endpoint is on a circle, it also requires a combination of two basic constraints. First, two constraint vertices are established. For the first fundamental constraint, three arcs are constructed from the first constraint vertex, the cuboid vertex, and the sphere vertex, pointing towards the first endpoint cuboid vertex, respectively. These arcs represent the normal vector between that endpoint and the center of the circle in the plane containing the circle. f The projection upwards is 0. Then, starting from another constraint vertex, the cuboid vertex, and the circular parameter vertex, three arcs are established pointing to the same endpoint cuboid vertex to express that the distance from the endpoint to the center of the circle is equal to the circle radius r. These two basic constraints form the first engineering constraint of the endpoint on the circle. The engineering constraint of the other endpoint on the circle is expressed in the same way, ultimately forming the ternary graph vertex representation of the circular arc, with 9 degrees of freedom.

[0048] (2) Vertex representation of ternary graph with engineering constraints: Engineering constraints are expressed by combinations of basic constraints, which in turn are expressed by combinations of vertices in the relevant graph and directed arcs between vertices. The process of adding engineering constraints is as follows: Figure 13 As shown, the details are as follows: Engineering constraints are decomposed into basic constraint expressions. Each basic constraint corresponds to a constraint vertex and can restrict one degree of freedom. For specific decomposition methods, please refer to patent CN117574644A, which describes a method for decomposing two-dimensional engineering constraints into basic constraints and expressing them in a directed graph. The expression of each basic constraint is stored in the corresponding parameter body, and the geometric element information related to the basic constraint is also stored in the parameter body.

[0049] The vertex representation of a ternary graph for engineering constraints is composed of the ternary graph representations of its constituent basic constraints. This involves the constraint vertices corresponding to each basic constraint and the directed arcs between these constraint vertices and the graph vertices corresponding to the relevant geometric elements. Whether an engineering constraint is redundant depends only on the graph matching method; the set of vertices related to the constraint remains unchanged.

[0050] Adding an engineering constraint is transformed into adding each of its constituent basic constraints sequentially, with constraint redundancy analysis performed as each basic constraint is added. When adding a basic constraint, it's necessary to create and initialize the constraint vertices: find the set of vertices related to the basic constraint, using the constraint vertex as the head vertex and the other vertices in the related vertex set as tail vertices, and establish multiple directed arcs. At this point, the constraint vertex's degree of freedom is set to 1, and the remaining degrees of freedom are 0.

[0051] Then find and traverse the basic constraint corresponding graph vertex set, according to the degree of freedom of the graph vertex minus the number of matched basic constraint, the remaining degree of freedom of the vertex is calculated, the first remaining degree of freedom is not zero graph vertex as the vertex of constraint matching related directed arc construction; If no graph vertex exists remaining degree of freedom, try to increase the degree of freedom of the graph vertex in the set one by one, that is, under the premise of ensuring that the remaining degree of freedom of the graph vertex is not less than 0, the incoming arc on the graph vertex due to other basic constraints is reversed as much as possible, and all other incoming arcs of the same basic constraint are re-directed to the graph vertex pointed by the reversed incoming arc, increasing the remaining degree of freedom of the originally pointed vertex. As long as a graph vertex successfully increases a remaining degree of freedom, the vertex is taken as the matching vertex of the basic constraint to construct the related directed arc. After the matching is successful, the basic constraint is analyzed for redundancy, and if it is not redundant, the degree of freedom of the newly created parameter vertex is set to 0 as a control vertex, which represents that it can only point to other vertices and constrain the pointed graph vertex.

[0052] If the graph matching process of the basic constraint fails, or the graph matching is successful but the basic constraint is identified as redundant through redundancy analysis, it means that the basic constraint conflicts with the existing constraints. At this time, the conflicting basic constraint set is recorded in the constraint vertex, and the information of the conflict set in the corresponding constraint vertex in the set is synchronized, and the initialized graph matching form is returned. A plurality of directed arcs are established with the constraint vertex as the head vertex and the other vertices in the related vertex set as the tail vertex. The degree of freedom of the constraint vertex is set to 1, that is, the constraint vertex becomes a measurement vertex controlled by other vertices and does not have a constraint effect. The specific value is calculated by other vertices.

[0053] The addition of an engineering constraint may involve multiple basic constraints. According to the order, the graph matching of each basic constraint constituting the engineering constraint is performed. As long as there is a basic constraint corresponding to a control vertex type constraint vertex, it means that the engineering constraint is not redundant.

[0054] When the engineering constraint is redundant, the design intention should be preserved and the constraint should be maintained, rather than being directly deleted. Therefore, the redundant basic constraint is expressed in the form of a measurement vertex, which will not cause redundancy to the existing constraints, and also preserves the relevant constraint information, providing help for subsequent maintenance.

[0055] (3) Maintenance of redundant constraints in geometric constraint directed graph For a geometric constraint system, not only the increase of geometric elements and engineering constraints, but also the deletion of geometric elements and engineering constraints exist in the design process. When the deletion occurs, the geometric constraint digraph has the change of vertex and directed arc. To adapt to this change and meet the prerequisite that the remaining degree of freedom of each vertex is not less than 0, the digraph can be adjusted and maintained so that the redundant constraint is restored to control the effect as an effective constraint. After the introduction of the parameter body, this process of redundant constraint maintenance can be more convenient. Specifically: 1) When the geometric element is deleted, the corresponding graph vertex and directed arc are deleted together, and the engineering constraint related thereto is also deleted at the same time. In the graph, all basic constraints constituting the engineering constraint are deleted at the same time, that is, all constraint vertices and basic constraint related directed arcs are deleted.

[0056] 2) When the engineering constraint is deleted, all related basic constraints are directly deleted, that is, all related constraint vertices and basic constraint corresponding arcs are deleted.

[0057] In 1) the deletion of the geometric element associated with the non-redundant engineering constraint and 2) the direct deletion of the non-redundant engineering constraint, there is a situation that the deletion of the engineering constraint makes the previously redundant engineering constraint no longer conflict. Therefore, for the above case, a judgment is added. First, it is judged whether the deleted basic constraint has a conflict redundant constraint through the information of the constraint vertex. If there is no conflict redundant basic constraint, the maintenance operation of the digraph is directly ended. If there is a conflict redundant basic constraint, all redundant measurement vertices are matched with constraints in the order of the process of newly creating a basic constraint. If it is successful and it is judged that it is non-redundant through the redundancy analysis, it means that the basic constraint does not exist conflict with the existing constraint. At this time, the parameter vertex is naturally restored to the control vertex from the measurement vertex, which is represented as finding a new constraint matching vertex in the vertex set related to the original redundant basic constraint. The directed arc is established from the original redundant measurement vertex and other associated graph vertices to it. If the graph matching is unsuccessful or the redundancy analysis is redundant, the graph vertex and the directed arc remain unchanged. And as long as one measurement vertex corresponding to the basic constraint becomes a control vertex, the corresponding engineering constraint is non-redundant on the upper layer of the CAD system.

[0058] The above process is shown in Figure 14 , which is called automatic maintenance of redundant constraints, also called truth maintenance. The automatic maintenance of redundant constraints is very efficient, and the previous redundant constraints can be utilized instead of being excluded as redundant information.

[0059] In summary, the present application solves the problem of unified expression of two-dimensional and three-dimensional engineering constraints and geometric elements, and more thoroughly decomposes the geometric elements on the graph, effectively reduces the solving scale, and provides convenience for the management and maintenance of redundant constraints.

[0060] It is to be understood that the above description is intended to be illustrative and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the application should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.

Claims

1. A method for representing a CAD geometric constraint system graph based on triplets, characterized in that, The method comprises the following steps: Expressing a geometric element and an engineering constraint in an engineering drawing by a triad; the triad comprises a position body, a posture body and a parameter body, the position body represents the position of the geometric element, the posture body represents the posture of the geometric element, and the parameter body represents a metric of the geometric element itself or a constraint metric between geometric elements; Wherein, the geometric element corresponds to the triad, and the engineering constraint is decomposed into a combination of a plurality of basic constraints, and each basic constraint corresponds to a parameter body; Forming a graph vertex based on the triad and forming a directed arc between the graph vertices based on the basic constraints, thereby constructing a geometric constraint directed graph; Wherein, the graph vertex comprises the following five types: the position body corresponds to a square vertex; the posture body corresponds to a spherical vertex; the parameter body formed for the geometric element corresponds to a parameter vertex; the parameter body formed for the basic constraint corresponds to a constraint vertex; when a plurality of non-constraint vertices form a directed ring on the graph or the whole analysis of a directed graph subgraph is needed, the whole is taken as a composite vertex.

2. The triad-based CAD geometry constraint system graph representation method of claim 1, wherein, Forming a directed arc between the graph vertices based on the basic constraint, for each basic constraint, comprising: Initial matching: establishing a directed arc from each non-constraint vertex related to the basic constraint to the constraint vertex corresponding to the basic constraint; Constraint matching: based on the initial matching, for each non-constraint vertex related to the basic constraint, if the remaining degrees of freedom of the non-constraint vertex are greater than 0, taking the non-constraint vertex as a head vertex, the remaining non-constraint vertices and the corresponding constraint vertex related to the basic constraint as tail vertices, modifying the initial matching to a directed arc from the tail vertex to the head vertex; otherwise, keeping the initial matching; Redundancy analysis: based on the constraint matching, if the basic constraint is redundant, modifying the constraint matching to a directed arc from each non-constraint vertex related to the basic constraint to the corresponding constraint vertex; otherwise, keeping the constraint matching.

3. The triad-based CAD geometry constraint system graph representation method of claim 2, wherein, When constructing the geometric constraint directed graph, the remaining degrees of freedom of all graph vertices are ensured to be non-negative.

4. The triad-based CAD geometry constraint system graph representation method of claim 3, wherein, The judgment method of whether the basic constraint is redundant is as follows: Firstly, the degrees of freedom of the spherical vertex and the square vertex related to the world coordinate system are modified from the default 0 to the degrees of freedom in the corresponding dimension; Then, the subgraph formed by the graph vertex set corresponding to the basic constraint and the related directed arc is replaced by a composite vertex, the composite vertex inherits all the incoming arcs pointing to the corresponding subgraph from the outside; the incoming arcs of the composite vertex are reversed, so that the external matching represented by the incoming arcs is re-matched to the graph vertices outside the composite vertex; Finally, whether the composite vertex has an incoming arc is judged, if there is an incoming arc, it is judged to be redundant, if there is no incoming arc, the remaining degrees of freedom of the composite vertex are further judged, if it is smaller than the degrees of freedom of the space spanned in the corresponding dimension, it is judged to be redundant, otherwise, it is not redundant.

5. The triad-based CAD geometry constraint system graph representation method of claim 4, wherein, The calculation formula of the remaining degrees of freedom of the graph vertex is as follows: wherein, the remaining degrees of freedom of the graph vertex ; the degrees of freedom of the graph vertex , inherited from the corresponding triad, expressed as the number of incoming arcs that can accommodate different elementary constraints; the number of matching constraints of the graph vertex .

6. The triple-based CAD geometry constraint system graph representation method of claim 2, wherein, When the geometric element or the engineering constraint is deleted, the geometric constraint directed graph is adjusted as follows: When a geometric element is deleted, the corresponding graph vertex and directed arc are deleted, and the constraint vertex and related directed arc corresponding to all basic constraints related to the geometric element are also deleted; When an engineering constraint is deleted, the constraint vertex and related directed arc corresponding to all basic constraints are deleted.

7. The triad-based CAD geometry constraint system graph representation method of claim 6, wherein, When the geometric element or the engineering constraint is deleted, the corresponding geometric constraint directed graph is adjusted, and further maintenance is performed on the geometric constraint directed graph, including: determining whether the deleted basic constraint has a conflict with a redundant basic constraint, if not, maintaining the original state; if so, re-performing constraint matching on all redundant basic constraints in sequence by using the process of creating a new basic constraint; for each original redundant basic constraint: if the constraint matching is successful and it is determined to be non-redundant through redundancy analysis, establishing a directed arc from the tail vertex to the head vertex, wherein the non-constraint vertex found by the constraint matching is the head vertex, and the remaining non-constraint vertices and the corresponding constraint vertices related to the basic constraint are the tail vertices; otherwise, maintaining the original state.

8. The triad-based CAD geometric constraint system graph representation method of any one of claims 1-7, wherein, The ternary expression of a two-dimensional geometric element is as follows: point: expressed by a position body, the position body stores the coordinate position of the point, and is mapped to a cube vertex on the graph; straight line: expressed by a position body and an attitude body, the position body represents the polar distance point of the straight line, and the attitude body represents the direction of the straight line; mapped to a cube vertex and a sphere vertex on the graph, and an arc from the sphere vertex to the cube vertex is added, representing a polar distance constraint; circle: expressed by a position body and a parameter body, the position body represents the center of the circle, and the parameter body represents the radius of the circle; mapped to a cube vertex and a parameter vertex on the graph; line segment: the line segment is divided into a straight line, two end points, and engineering constraints of the two end points on the straight line; wherein the straight line is expressed by a cube vertex and a sphere vertex according to the above method, and the two end points are mapped to two independent cube vertices; two constraint vertices are established, for the engineering constraint of the first end point on the straight line, three arcs from the first constraint vertex, the straight line cube vertex, and the straight line sphere vertex to the end point cube vertex are established; for the engineering constraint of the second end point on the straight line, three arcs from the second constraint vertex, the straight line cube vertex, and the straight line sphere vertex to the end point cube vertex are established; arc of a circle: the arc of a circle is divided into a circle, two end points, and engineering constraints of the two end points on the circle; wherein the circle is expressed by a cube vertex and a parameter vertex according to the above method, and the two end points are mapped to two independent cube vertices; two constraint vertices are established, for the engineering constraint of the first end point on the circle, three arcs from the first constraint vertex, the circle cube vertex, and the circle parameter vertex to the end point cube vertex are established; for the engineering constraint of the second end point on the circle, three arcs from the second constraint vertex, the circle cube vertex, and the circle parameter vertex to the end point cube vertex are established. The ternary expression of a three-dimensional geometric element is as follows:

9. The triad-based CAD geometric constraint system graph representation method according to any one of claims 1-7, wherein, rigid body: expressed by a position body and an attitude body, the position body represents the position of the rigid body, and the attitude body represents the pose of the rigid body; mapped to a cube vertex and a sphere vertex on the graph; point: expressed by a position body, the position body stores the coordinate position of the point; mapped to a cube vertex on the graph; ​ Line: expressed by a position body and a pose body, the position body represents the pole point of the line, the pose body represents the direction of the line; mapped as a cube vertex and a sphere vertex on the graph, and an arc from the sphere vertex to the cube vertex is added, representing a pole constraint; Circle: expressed by a position body, a pose body and a parameter body, the position body represents the center of the circle, the pose body represents the normal vector of the plane where the circle lies, the parameter body represents the radius of the circle; mapped as a cube vertex, a sphere vertex and a parameter vertex on the graph; Plane: expressed by a position body and a pose body, the position body represents the pole point of the plane, the pose body represents the normal vector of the plane; mapped as a cube vertex and a sphere vertex on the graph, and two arcs from the sphere vertex to the cube vertex are added, representing two pole constraints; an arc from the sphere vertex to itself is also added, representing a spin constraint; Sphere: expressed by a position body and a parameter body, the position body represents the center of the sphere, the parameter body represents the radius of the sphere; mapped as a cube vertex and a parameter vertex on the graph; Cylinder: expressed by a line through the symmetry axis of the cylinder and a radius parameter, that is, a parameter body is added to the expression of the line in the three-body, the parameter body stores the radius parameter of the cylinder; the mapping of the cylinder on the graph is equivalent to adding a parameter vertex to the mapping of the line; Line segment: the line segment is split into a line, two end points, and two engineering constraints of the end points on the line; the line is expressed by a cube vertex and a sphere vertex as described above, and the two end points are mapped as two independent cube vertices; for the engineering constraint of the first end point on the line, two basic constraints are combined to express two constraint vertices, for the first basic constraint, three arcs are established from the first constraint vertex, the cube vertex of the line, and the sphere vertex of the line to the cube vertex of the end point; and three arcs are established from the other constraint vertex, the cube vertex of the line, and the sphere vertex of the line to the cube vertex of the end point; and the engineering constraint of the other end point on the line is expressed in the same way; Arc: the arc is split into a circle, two end points, and two engineering constraints of the end points on the circle; the circle is expressed by a cube vertex, a sphere vertex and a parameter vertex as described above, and the two end points are mapped as two independent cube vertices; for the engineering constraint of the first end point on the circle, two basic constraints are combined to express two constraint vertices, for the first basic constraint, three arcs are established from the first constraint vertex, the cube vertex of the circle, and the sphere vertex of the circle to the cube vertex of the end point; and three arcs are established from the other constraint vertex, the cube vertex of the circle, and the parameter vertex of the circle to the cube vertex of the end point; and the engineering constraint of the other end point on the circle is expressed in the same way. The three-body based CAD geometric constraint system graph expression method according to any one of claims 1-9. ​ 10. A ternary-based CAD geometric constraint system, characterized by, ​