Part model construction method and system based on semantic model and constraint relation directed graph
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
AI Technical Summary
Existing collaborative control device design software suffers from fragmented constraint management, disordered generation order, high coupling, poor coordination, weak conflict detection, and low automation, resulting in low efficiency in producing collaborative control device models and complex modifications.
The part model construction method based on semantic model and directed graph of constraint relationship obtains the basic features of the part and their constraint relationship, constructs the dimensional constraint matrix and geometric constraint matrix, and converts them into a directed graph to standardize the geometric element constraint order of the basic features, so as to realize the efficient construction and modification of the part model.
It enables efficient construction and modification of part models, simplifies the model generation process for complex parts, improves the automation level of collaborative design, and reduces the complexity of modifications.
Smart Images

Figure CN122241927A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and system for constructing part models based on semantic models and directed graphs of constraint relationships, belonging to the field of 3D model modeling. Background Technology
[0002] Existing collaborative control device design software suffers from drawbacks such as fragmented constraint management, disordered generation order, high coupling, poor coordination, weak conflict detection, and low automation. Currently, the collaborative control device design industry lacks targeted design software, resulting in low efficiency in producing collaborative control device models and complex and variable modifications, failing to meet the rapid response requirements of modern manufacturing. Summary of the Invention
[0003] This invention provides a method and system for constructing part models based on semantic models and directed graphs of constraint relationships, which solves the problems disclosed in the background art.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0005] A method for constructing part models based on directed graphs of semantic models and constraint relationships:
[0006] Obtain the basic features of the part and the constraint relationships between the basic features. The constraint relationships between the basic features include dimensional constraint relationships and geometric constraint relationships.
[0007] Construct a size constraint matrix based on the size constraint relationships;
[0008] Construct a geometric constraint matrix based on the geometric constraint relationships;
[0009] Treat the geometric elements with constraints in the size constraint matrix and geometric constraint matrix as nodes in a directed graph, and the constraints as edges in a directed graph, and construct a directed graph of geometric element constraints between basic features;
[0010] Construct part models based on directed graphs of geometric element constraints between basic features.
[0011] Furthermore, the basic features of the part are represented as follows: ;
[0012] A unique identifier for basic characteristics; Basic feature name; The constraint relationships between basic features; These are the basic parameters of the fundamental features, including the starting coordinates. , its own size .
[0013] Furthermore, methods for constructing a dimensional constraint matrix based on dimensional constraints and a geometric constraint matrix based on geometric constraints include:
[0014] If there are no constraints between the basic features, then the corresponding matrix elements are set to... When initializing the constraint matrix, all elements are... Subsequently, the matrix elements are updated based on the constraint relationships between the basic features; each element in the matrix represents a set of active constraint relationships between the basic features in the row of the element and the basic features in the column of the element.
[0015] Furthermore, methods for constructing a dimensional constraint matrix based on dimensional constraints and a geometric constraint matrix based on geometric constraints include:
[0016] Obtain the number of basic features The initial row and column sizes are both Basic feature size constraint matrix Initialize row and column sizes. Basic feature geometric constraint matrix For each constraint relation, analyze the underlying features of its mapping. and Add the basic feature names of the rows and columns corresponding to the constraint elements in the matrix; continue until all the row and column names corresponding to the constraint elements in the matrix are filled in.
[0017] Furthermore, a directed graph is represented as ;in, , is the set of edges. is a set of nodes; for any , This indicates that the two nodes are adjacent and Based on Constructed, for nodes number of in-degrees Representative building node Parameter considerations Constraints of each node; Node Number of out-degrees Then it means After that Constraints considered when constructing each node.
[0018] A second aspect of the present invention provides a part model construction system based on a semantic model and a directed graph of constraint relationships, comprising:
[0019] The basic feature module is used to obtain the basic features of the part and the constraint relationships between the basic features; the constraint relationships between the basic features include dimensional constraint relationships and geometric constraint relationships.
[0020] The dimension constraint matrix module is used to construct a dimension constraint matrix based on dimension constraint relationships.
[0021] The geometric constraint matrix module is used to construct a geometric constraint matrix based on geometric constraint relationships.
[0022] The constraint relationship directed graph module is used to treat geometric elements with constraint relationships in the size constraint matrix and geometric constraint matrix as nodes in a directed graph, and the constraint relationships as edges in a directed graph. Based on the nodes and edges of the directed graph, a directed graph of geometric element constraint relationships between basic features is constructed.
[0023] The part model building module is used to build part models based on a directed graph of geometric element constraints between basic features.
[0024] A third aspect of the present invention provides a computer-readable storage medium for storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform any of the methods described above.
[0025] A fourth aspect of the present invention provides a computing device, comprising:
[0026] One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing any of the methods described above.
[0027] The beneficial effects achieved by this invention are as follows: This invention constructs dimensional constraint matrices and geometric constraint matrices based on the constraint relationships between the basic features of a part, and standardizes the constraint order of the geometric elements of the basic features through a directed graph. By inputting key parameters, the model of a complex part can be constructed. When modifying the part model or constraint relationships, the relevant basic features can be directly selected to adjust the parameters and constraint relationships. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the part model construction method based on a directed graph of semantic model and constraint relationship according to the present invention.
[0029] Figure 2 This is a schematic diagram of the initialization size constraint matrix of the present invention;
[0030] Figure 3 This is a schematic diagram of the initialization geometric constraint matrix of the present invention;
[0031] Figure 4 This is a schematic diagram of the directed graph showing the geometric element constraint relationships of the present invention;
[0032] Figure 5 A schematic diagram of the three-dimensional model of the collaborative control device;
[0033] Figure 6 This is a schematic diagram of the geometric constraint matrix of the collaborative control device constructed according to the present invention;
[0034] Figure 7 This is a schematic diagram of the size constraint matrix of the collaborative control device constructed according to the present invention;
[0035] Figure 8 A schematic diagram of a three-dimensional model of the collaborative control device constructed according to the present invention;
[0036] Figure 9 This is a schematic diagram of the updated three-dimensional model of the collaborative control device constructed according to the present invention. Detailed Implementation
[0037] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0038] like Figure 1 As shown, this invention provides a method for constructing part models based on directed graphs of semantic models and constraint relationships, including the following steps:
[0039] S1. Define any part object as:
[0040] ;
[0041] in, It is the unique identifier of the part. Is with A set of parts with constrained relationships. To form The set of all fundamental features; fundamental features are the volumes within geometric elements. These are the constraint relationships between basic features, including dimensional constraints. Relationship with geometric constraints Therefore, it consists of:
[0042] ;
[0043] S2. Suppose a part object has... One basic feature, any right The number of active dimensional constraints is , right The number of active dimensional constraints is , right The number of active geometric constraints is , right The number of active dimensional constraints is Therefore, Expanded into the following formula:
[0044] ;
[0045] It is the sum of the constraints between this part and other parts that have constraints on it. These are the basic parameters of the part model, including the starting coordinates and dimensions of the part model;
[0046] .
[0047] S1-1. The part model is composed of numerous basic features and the constraints between them. At the 3D model level, each basic feature is a volume in BRep; therefore, the 3D model of each basic feature is relative to the 3D model of a volume. The object model of a single basic feature of the part is defined as follows:
[0048] ;
[0049] S1-2. The unique identifier for the basic feature is: control device identifier + part identifier + basic feature name + number, where the basic feature name is... The name, Based on their basic shape, the basic features within the control device can be categorized into three types: triangular prisms, square prisms, and cylinders. It can be represented as: , The content mainly includes the constraint relationships between this basic feature and other basic features. These are the basic parameters of the fundamental features, including the starting coordinates. , its own size , is an important parameter for updating basic features.
[0050] S1-3. In parametric modeling, complex basic features of parts are simplified, and irrelevant basic features are omitted. The simplification results all belong to... One approach to simplifying basic features is to follow three principles: retain features that constrain the relationships between parts; retain features that perform functions; and retain features that reflect the basic dimensions of the model.
[0051] S2-1. The constraints of basic features include dimensional constraints and geometric constraints. By traversing all basic feature parameters, the constraints between basic features and the two basic features corresponding to these constraints are obtained, and the corresponding matrices are constructed to establish the constraint relationships. The rules for constructing the constraint matrices are as follows:
[0052] like Figure 2 and Figure 3 As shown, if there are no constraints between the basic features, the corresponding matrix elements are set to... When initializing the constraint matrix, all elements are... Subsequently, the matrix elements are updated based on the constraint relationships between the basic features; each element in the matrix represents the set of active constraint relationships between the basic features in the row containing the element and the basic features in the column containing the element; the elements on the diagonal of the matrix must be... .
[0053] S2-2. The specific method for constructing the constraint matrix is as follows:
[0054] Iterate through all the basic feature parameters to obtain the number of basic features for this part. The constraints of each basic feature; the initial row and column sizes are... Basic feature size constraint matrix Initialize row and column sizes. Basic feature geometric constraint matrix For each constraint relation, analyze the underlying features of its mapping. and And add the basic feature names of the row and column corresponding to this constraint element in the matrix;
[0055] Repeat the above steps until all row and column names corresponding to all constraint elements in the matrix are filled in.
[0056] S2-3. Directed Graph The set representing a directed graph. in A non-empty node indicates that the entity object stores a data field. Edges that are connected to this object represent chain fields. It is a set of edges. It is a set of nodes. For any , This indicates that the two nodes are adjacent and Based on Constructed, for nodes number of in-degrees Representative building node The parameters need to be considered The constraints of each node, and similarly for each node. Number of out-degrees Then it means After that The constraints that need to be considered when constructing a node.
[0057] like Figure 4 As shown, for the two basic features and Size constraints can be viewed as being based on fundamental features. a certain point coordinates and a certain point Dimensional constraints exist in three directions along the coordinate system, while geometric constraints can be further subdivided into edge, line, and surface constraints. Therefore, points, edges, lines, and surfaces with constraints can be viewed as nodes in a directed graph, and specific constraints as edges. This allows for the construction of directed graph constraints between basic features, representing the geometric elements within the graph.
[0058] S3-1. The construction of a 3D model of a part, subdivided into its basic features, should follow the following order:
[0059] For parts without parent part constraints, the larger basic model volume should be modeled first; parts with subclass basic feature constraints should be built first; and basic feature parts with sub-part constraints should be built last.
[0060] S3-2. If a part has a parent part constraint relationship, the basic feature parts that have a constraint relationship with the parent part shall be constructed first; at the same time, the construction order principle of S3-1 shall be followed.
[0061] S3-3. The order of dividing feature regions based on S3-1 and S3-2 is generally as follows: Sorted generation.
[0062] Updating a part model without considering constraints involves updating its basic features, which typically includes: updating the starting coordinates, updating its own dimensional constraints, updating other dimensional constraints, and updating geometric constraints.
[0063] Example
[0064] like Figure 5 As shown, the three-dimensional model of the collaborative control device includes: modeling starting point 0, base platform 1, collaborative control device mounting hole 2, copper busbar mounting groove 3, copper busbar mounting hole 4, middle platform 5, upper platform 6, and switch 7.
[0065] This embodiment uses a collaborative control device as an example to provide a model construction method for the collaborative control device, including the following steps:
[0066] ,in This is the j-th related type of collaborative control device constructed.
[0067] include (Grassroots Station 1) (Middle platform 5) (Upper platform 6) (Switch 7) (Copper busbar mounting groove 3) (Copper busbar mounting hole 4) (Hole 2 for co-control device)
[0068] , , and Dimensional constraints at modeling starting point 0; , , dimensional constraints on the width between them; Width and Spacing dimensional constraints; Width and , Dimensional constraints on the spacing between them; Starting coordinates and Spacing dimensional constraints; Starting coordinates and Spacing constraints;
[0069] , , The overlapping position relationship, and Planar modeling angle.
[0070] like Figure 6 and Figure 7 As shown, the geometric constraint matrix and dimensional constraint matrix of the basic features of the collaborative control device are constructed, including the following constraint relationships:
[0071] : ; . This includes: dimensional constraints on the starting coordinates of all other basic features (the starting coordinates of other basic features vary with...). (Changed by starting coordinates), distance size constraints (all other basic features are related to) The modeling starting point 0 in the model has distance constraints; for , , Height dimension constraints (as (Height changes), length dimension constraint (starting point coordinates change) (Changed by length), in addition to There are also width constraints (as...) Width change); , , Width dimension constraints (the spacing between them will vary) The width changes), and the length dimension constraint (the mirror base point changes with the width). (changed by the length), in addition to There are also height dimensional constraints (and) (The height of the reverse change). , The central axis coincides, in direction The upper surface and The lower surface coincides with The lower surface is parallel. The upper surface and , , of The axis is perpendicular.
[0072] : ; ; Including: , Dimensional constraints for starting coordinates and height. The central axis coincides, in direction The upper surface and Their lower surfaces overlap.
[0073] : ; ; Including: Dimensional constraints for starting coordinates, height, and angle ( Modeling direction and (At a fixed angle).
[0074] : ; .
[0075] : ; ; This includes: dimensional constraints between slots, and dimensional constraints of the mirror base point (for the upper copper busbar mounting slot 3); Starting point coordinates, height (same height), width, length ( Changes in width and length lead to Dimensional constraints (starting coordinates) in direction and The central axes coincide.
[0076] : ; ; This includes: spacing constraints between holes, and dimensional constraints for mirrored points.
[0077] : ; ; This includes: spacing constraints between holes and size constraints of mirror base points.
[0078] like Figure 8 As shown, the three-dimensional model of the collaborative control device is constructed using the following methods:
[0079] NM1 modeling starting point 0 (0,0,0); , , , The width, length and height are respectively , , , ; exist and The distance is , exist and The distance is ,exist and The distance is , exist and The distance is ,exist and The distance is ; exist The stretching direction is perpendicular to ; exist The distances in the directions from the modeling starting point 0 of the collaborative control device are respectively Its own dimensions are ; exist The distances in the directions from the modeling starting point 0 of the collaborative control device are respectively Its own dimensions, radius and height are respectively ; exist The distances in the directions from the modeling starting point 0 of the collaborative control device are respectively Its own dimensions, radius and height are respectively Copper busbar mounting holes 4 spacing Spacing of positioning holes in the co-control device Copper busbar mounting groove spacing 3 .
[0080] :use The starting coordinates of the operation are (0,0, 0), and the stretching direction is (1,1,1).
[0081] :use The starting coordinates of the operation are (0, 75, 90), and the stretching direction is (1, 1, 1).
[0082] :use The starting coordinates of the operation are (60, 110, 100), and the stretching direction is (1, 1, 1).
[0083] :use The starting coordinates of the operation are (60, 110, 100), and the stretching direction is (1, 1, 1).
[0084] :use The starting coordinates are (75, 142.5, 110), and the stretching direction is (1, 1, 1). The reference groove is modeled based on its own dimensions. After modeling, it is then used... The reference slot is translated twice while preserving its original features. The spacing between the copper busbar mounting slots 3 is obtained by translating the reference slot twice. The direction of each translation is then determined. The translation distances are 60 and 120 respectively. Using... The method involves modeling the upper copper busbar mounting groove 3, with the mirror axis base point at (90, 150, 45) and the axis extension direction as follows. After all copper busbar mounting slots 3 are modeled, and... conduct operate.
[0085] :use The starting coordinates of the operation are (30, 25, 0), and the stretching direction is (1, 1, 1). The reference hole is modeled based on its own dimensions. After modeling, it is then used... The reference groove is translated while preserving its original features. The number of translations is: Next, obtain the spacing between the copper busbar mounting slots 3, then the direction of each translation is... The translation distances are 60 and 120. Using... The method involves modeling the upper copper busbar mounting hole 4, with the mirror axis base point at (90, 150, 45) and the axis extension direction as follows. After all copper busbar mounting holes 4 are modeled, and... conduct operate.
[0086] :use The starting coordinates of the operation are (60, 37.5, 0), and the stretching direction is (1, 1, 1). The reference hole is modeled based on its own dimensions. After modeling, it is then used... The reference groove is translated while preserving its original features. The number of translations is: Then the direction of each translation is The translation distance is 60. Using... The method involves modeling the mounting hole 2 of the upper control device, with the mirror axis base point at (90, 150, 45) and the axis extension direction as follows. After all the mounting holes 2 of the collaborative control devices are modeled, and... conduct operate.
[0087] like Figure 9 As shown, the three-dimensional model of the aforementioned collaborative control device is updated, and... of It becomes 250. If it changes to 80, then the change in size is: The starting coordinates become (0, 75, 80). The starting coordinates become (95, 110, 90). The starting coordinates become (110, 142.5, 100). The starting coordinates become (50, 0, 20). The starting coordinates become (95, 37.5, 0). The starting coordinates become (95, 110, 90). of It becomes 250. of It becomes 50. of It becomes 95.
[0088] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0089] A computer-readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform a part modeling method based on a directed graph of semantic models and constraint relationships.
[0090] A computing device includes one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for executing a part modeling method based on a directed graph of semantic models and constraint relationships.
[0091] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0092] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0095] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of the claims of the present invention pending approval.
Claims
1. A method for constructing part models based on semantic models and directed graphs of constraint relationships, characterized by: Obtain the basic features of the part and the constraint relationships between the basic features. The constraint relationships between the basic features include dimensional constraint relationships and geometric constraint relationships. Construct a size constraint matrix based on the size constraint relationships; Construct a geometric constraint matrix based on the geometric constraint relationships; Treat the geometric elements with constraints in the size constraint matrix and geometric constraint matrix as nodes in a directed graph, and the constraints as edges in a directed graph, and construct a directed graph of geometric element constraints between basic features; Construct part models based on directed graphs of geometric element constraints between basic features.
2. The method of claim 1, wherein the method further comprises: The basic features of a part are represented as follows: ; is a unique identifier of the base feature; is a base feature name; is a constraint relationship between base features; is a basic parameter of the base feature, including start point coordinates , and its own size .
3. The method of claim 2, wherein: Methods for constructing a dimensional constraint matrix based on dimensional constraints and a geometric constraint matrix based on geometric constraints include: If there are no constraints between the basic features, then the corresponding matrix elements are set to... When initializing the constraint matrix, all elements are... Subsequently, the matrix elements are updated based on the constraint relationships between the basic features; each element in the matrix represents the set of active constraint relationships between the basic features in the row of the element and the basic features in the column of the element.
4. The method for constructing part models based on directed graphs of semantic models and constraint relationships according to claim 3, characterized in that: Methods for constructing a dimensional constraint matrix based on dimensional constraints and a geometric constraint matrix based on geometric constraints include: Obtain the number of basic features The initial row and column sizes are both Basic feature size constraint matrix Initialize row and column sizes. Basic feature geometric constraint matrix For each constraint relation, analyze the underlying features of its mapping. and Add the basic feature names of the rows and columns corresponding to the constraint elements in the matrix; continue until all the row and column names corresponding to the constraint elements in the matrix are filled in.
5. The method for constructing part models based on directed graphs of semantic models and constraint relationships according to claim 4, characterized in that: A directed graph is represented as ;in, , is the set of edges. is a set of nodes; for any , This indicates that the two nodes are adjacent and Based on Constructed, for nodes number of in-degrees Representative building node Parameter considerations Constraints of each node; Node Number of out-degrees Then it means After that Constraints considered when constructing each node.
6. A part model construction system based on a semantic model and a directed graph of constraint relationships, characterized in that, include: The basic feature module is used to obtain the basic features of the part and the constraint relationships between the basic features; The constraints between basic features include dimensional constraints and geometric constraints; The dimension constraint matrix module is used to construct a dimension constraint matrix based on dimension constraint relationships. The geometric constraint matrix module is used to construct a geometric constraint matrix based on geometric constraint relationships. The constraint relationship directed graph module is used to treat geometric elements with constraint relationships in the size constraint matrix and geometric constraint matrix as nodes in a directed graph, and the constraint relationships as edges in a directed graph. Based on the nodes and edges of the directed graph, a directed graph of geometric element constraint relationships between basic features is constructed. The part model building module is used to build part models based on a directed graph of geometric element constraints between basic features.
7. A computer-readable storage medium for storing one or more programs, characterized in that: The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any of the methods according to claims 1 to 5.
8. A computing device, characterized in that, include: One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods according to claims 1 to 5.