Parametric driving method, device and medium for fusing constraint solving and associated update

By integrating dynamic directed graph grouping and solution order with constraint solving and correlation updates, the problem of low computational efficiency and limited flexibility of existing CAD technology in complex design scenarios is solved, and efficient and stable parametric driving is achieved.

CN121580499BActive Publication Date: 2026-06-02ZHEJIANG HUADONG ENG DIGITAL TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG HUADONG ENG DIGITAL TECH CO LTD
Filing Date
2026-01-21
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

When dealing with parametric-driven design scenarios in complex design scenarios, existing CAD technologies have their own advantages and disadvantages in constraint solving and correlation update mechanisms. They are difficult to fully meet complex design requirements, have low computational efficiency and limited design flexibility, especially in large-scale, highly complex constraint networks where model updates are difficult.

Method used

Dynamic directed graphs are used to represent the dependencies between features in the model. The solution order is determined by grouping features into directed graphs and directed graphs of feature groups. Constraint solving and correlation update mechanisms are integrated to achieve efficient parameter-driven processing.

Benefits of technology

It improves the efficiency and accuracy of model solving, can handle complex constraint networks, supports rapid design iteration, ensures accurate reflection of design intent and model stability, and enhances design flexibility and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121580499B_ABST
    Figure CN121580499B_ABST
Patent Text Reader

Abstract

The application discloses a parameterized driving method, equipment and medium for fusion constraint solving and association updating, and the method comprises the following steps: constructing a feature directed graph based on features and feature constraint relationships; grouping features based on the feature directed graph, feature constraint relationships and function association to obtain feature groups; constructing a feature group directed graph based on the feature groups; determining a solving sequence for the feature groups based on the feature group directed graph; performing constraint solving and association updating based on the solving sequence; and updating the feature directed graph, the feature groups and the feature group directed graph to perform constraint solving and association updating in response to a model change event. The application has the advantages that a dynamic directed graph is applied to a constraint solving and association updating mechanism, a complex dynamic change dependency relationship between model features is represented through the dynamic directed graph, a solving sequence is determined based on a dynamic directed graph topology structure, constraint solving and association updating are parameterized and driven in fusion, and the model solving efficiency and accuracy are improved, and the performance of processing a complex constraint network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design technology, specifically to a parametrically driven method, device, and medium that integrates constraint solving and correlation updating. Background Technology

[0002] Parametric modeling and constraint solving are core technologies of modern Computer-Aided Design (CAD) software. With the accelerating digital transformation of the manufacturing industry and the increasing complexity of product designs, parametric modeling technology, based on parameter-driven geometric models, significantly improves design efficiency and flexibility. Designers only need to modify relevant parameters, and the system can automatically update the entire model, effectively avoiding a large amount of repetitive modeling work and providing crucial digital support for modern manufacturing, engineering design, and architectural design.

[0003] Constraint solving, as a key technological foundation of parametric modeling, is responsible for ensuring that the model can be accurately updated and modified while satisfying various design constraints. Design constraints typically include geometric constraints (such as parallelism, perpendicularity, and tangency) and dimensional constraints (such as length, angle, and radius). Through constraint solving mechanisms, CAD systems can automatically adjust the geometry and spatial position of the model to ensure that it always conforms to preset design rules.

[0004] In existing CAD technologies, typical implementation schemes mainly fall into two categories: one is to unify all geometric and engineering relationships into constraints and algebraic equations, relying entirely on constraint solving techniques to achieve parametric driving, such as the "CAD 3D Model Variable Modeling Method, Device, Electronic Equipment and Medium" disclosed in patent CN 120032066A. Although this scheme achieves parametric driving to a certain extent, it depends on the historical sequence of features, has difficulty handling circular dependencies, and is mainly applicable to dimension-driven scenarios. It cannot effectively express complex engineering constraints (such as displacement deformation), resulting in limited design flexibility and difficulties in system updates.

[0005] Another approach avoids constraint solving techniques and instead links the relationships between parameters through expressions and association update mechanisms. It then uses a structure tree to achieve overall, coordinated updates of the model, as exemplified by the "Method and Device for Linked Updates of Railway Engineering Entity Chains Based on Parameter Constraints" proposed in patent CN 116975073A. This approach organizes the relationships and constraint parameters between components, stores the structure tree in data form during the modeling phase, and matches structure tree nodes based on parameter attributes during updates. This achieves automatic parameter transfer and linked updates, thus avoiding the problems of manual searching and omissions.

[0006] However, the aforementioned existing technologies still have significant limitations in practical applications. First, both constraint solving and correlation update mechanisms have their advantages and disadvantages, and neither can fully address the parametric-driven requirements of complex design scenarios when used alone. For example, constraint solving techniques struggle to handle complex dependencies that cannot be expressed by algebraic equations, such as the geometric reference of a wall model to a path line (when the path line changes from a straight line to an arc or spline curve, the wall needs to automatically adapt to the change). Such scenarios are more suitable for correlation update mechanisms. Conversely, correlation update mechanisms are less efficient when handling complex sketch constraints with local cyclic dependencies (such as constraints with no clear order, such as parallelism, perpendicularity, and tangency between multiple line segments), where constraint solving techniques are more advantageous. Second, traditional parametric-driven algorithms are computationally inefficient when dealing with large-scale, highly complex constraint networks. With the exponential growth of the number of constraints and correlation references in the product structure, traditional methods often require a significant amount of time for model updates, severely impacting design efficiency and user experience.

[0007] feature

[0008] A geometric object or set of geometric objects that can participate in constraint solving as a whole is called a feature, including reference planes, reference lines, sketches, solids, and component instances. Reference planes serve as modeling reference surfaces to determine the position and orientation of geometric elements; reference lines assist in positioning and dimensioning; sketches are planar graphics composed of two-dimensional graphics and constraints, forming the basis for generating three-dimensional solids; solids are three-dimensional geometric objects with volume and shape; component instances are reusable model objects created based on parametric component templates. Summary of the Invention

[0009] The technical problem to be solved by this invention is to provide a method, device, and medium for integrating constraint solving and correlation updating parameterized driving mechanisms by applying dynamic directed graphs to both constraint solving and correlation updating. This method uses dynamic directed graphs to clearly and accurately represent the complex and dynamically changing dependencies between features in the model, and determines the solution order based on the topology of the dynamic directed graph. This integrates constraint solving and correlation updating parameterized driving mechanisms, improves the efficiency and accuracy of model solving, and enhances the performance of handling complex constraint networks.

[0010] To address the aforementioned technical problems, the present invention provides a parameterized driving method that integrates constraint solving and correlation updating, comprising at least the following steps:

[0011] Based on the features in the model and the constraints of the features, a directed feature graph is constructed to represent the first dependency relationship between the features in the model, where nodes represent features and directed edges represent the direction of the first dependency relationship between features.

[0012] Based on the first dependency relationship in the directed graph of the features, as well as the constraint relationship and functional association of the features, the features are grouped to obtain feature groups;

[0013] Based on the feature groups, a directed graph of feature groups is constructed to represent the second dependency relationship between feature groups, where nodes represent feature groups and directed edges represent the direction of the second dependency relationship between feature groups.

[0014] Based on the topological structure of the directed graph of the feature groups, the feature groups are sorted to determine the solution order;

[0015] Based on the solution order, constraints are solved sequentially for each feature group, and correlation updates are performed based on the results of the constraint solutions, until all feature groups have been solved.

[0016] In response to the change event of the model, the directed graph of features, the feature group, and the directed graph of the feature group are updated sequentially. The above steps are repeated to solve the constraints and update the associations of the feature group.

[0017] In a preferred embodiment, the step of constructing a directed feature graph representing the first dependency relationship between features in the model, based on the features in the model and the constraints of the features, specifically includes the following steps:

[0018] Traverse the features in the model and treat each feature as a node in the directed graph of the features;

[0019] Based on the creation command or modeling history of the feature, determine the parent feature corresponding to the current feature, and construct the first directed edge from the parent feature to the current feature;

[0020] Based on the constraint relationship of the aforementioned features, a second directed edge is constructed pointing from the referenced feature to the referencing feature;

[0021] Based on the nodes, the first directed edge, and the second directed edge, a feature directed graph is constructed.

[0022] In a preferred embodiment, the step of dividing the features into feature groups based on the first dependency relationship in the directed graph of the features, as well as the constraint relationship and functional association of the features, specifically includes the following steps:

[0023] Based on the first dependency relationship in the directed graph of features, multi-level dependency chains connected by the first dependency relationship are identified, and features located on the multi-level dependency chains are divided into the same feature group.

[0024] Based on the aforementioned constraint relationships, the constraint correlation degree between feature pairs is obtained, specifically using the following calculation method:

[0025] ;

[0026] in, The constraint correlation degree between feature a and feature b. Let be the number of direct constraints between feature a and feature b. The total number of constraints for feature a. The total number of constraints for feature b;

[0027] If the constraint correlation degree is greater than a preset first threshold, the feature pairs are divided into the same feature group. For features that are not divided, the features are assigned to the feature group where the feature with the highest constraint correlation degree is located.

[0028] If the feature is divided into different feature groups by multiple partitioning rules, the partitioning result of the multi-level dependency chain shall be followed first.

[0029] The partitioning results are updated based on the functional correlation of the aforementioned features, specifically including:

[0030] If there are cross-functional features in the feature group, the feature group is split according to the functional boundary; if multiple feature groups have the same function, the corresponding multiple features are combined into one feature group.

[0031] In a preferred embodiment, the step of constructing a directed graph of feature groups to represent the second dependency relationship between feature groups specifically includes the following steps:

[0032] Using the feature groups obtained after partitioning as nodes, if the features in feature group A depend on the features in feature group B, then establish directed edges from feature group B to feature group A, and construct a directed graph of feature groups.

[0033] Based on the topological structure of the directed graph of feature groups, if there is a feature group dependency chain with a closed loop structure, then any feature located in the feature group of the closed loop structure is split into a new feature group, forming a feature group dependency chain with an open loop structure.

[0034] If the number of features in the feature group is greater than a preset second threshold, and there are relatively independent sub-constraint groups within the feature group, then the feature group is divided into multiple feature groups according to the sub-constraint groups, and the feature group and the directed graph of the feature group are updated.

[0035] In a preferred embodiment, the step of sorting the feature groups based on the topological structure of the directed graph and determining the solution order specifically includes the following steps:

[0036] Step S401: Based on the directed graph topology of the feature group, construct an adjacency list and an in-degree array. The adjacency list includes the downstream feature group pointed to by each feature group and the dependency weight between the corresponding feature groups. The in-degree array records the number of preceding feature groups that each feature group depends on.

[0037] Step S402: Add the feature group with an in-degree of 0 to the priority queue. Based on the dependency weight, obtain the total dependency weight corresponding to the feature group. Specifically, the following calculation method is used:

[0038] ;

[0039] in, For G i With G i The downstream feature group G it points to j Dependency weights between them;

[0040] Based on the total dependency weight, the feature groups located in the priority queue are sorted in batches, the feature group corresponding to the largest total dependency weight is added to the topology sequence, and the in-degree of the corresponding downstream feature group is updated.

[0041] Step S403: Repeat step S402 until all feature groups are added to the topology sequence to determine the solution order.

[0042] In a preferred embodiment, step S402 further includes the following steps:

[0043] Based on the priority queue, a sliding window clustering method is used to divide feature groups with no second dependency intersection within the window into the same parallel solution batch. The window size is ≥1 and ≤ the number of system CPU cores.

[0044] In a preferred embodiment, the dependency weight is determined by the first dependency relationship and the number between the features in the feature group and the features in the downstream feature group, wherein different types of first dependency relationships between the features are assigned different base weights, and the dependency weight is set as the sum of the base weights corresponding to all first dependency relationships;

[0045] The different types of first dependencies between features include geometric constraints, size constraints, and reference relationships, wherein the base weight of the geometric constraint is greater than the base weight of the size constraint, and the base weight of the size constraint is greater than the base weight of the reference relationship.

[0046] In a preferred embodiment, the real-time update of the directed feature graph in response to a change event in the model specifically includes the following steps:

[0047] Detect change events of the model, including the addition, deletion, and modification of features, and / or the addition and deletion of constraints between features;

[0048] Based on the change event, the feature directed graph is updated by adding or deleting corresponding nodes and / or directed edges.

[0049] The present invention also provides an apparatus including a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the methods as described in any of the preceding claims.

[0050] The present invention also provides a medium including a computer program / instructions that, when executed by a processor, implement the parameterized driven method for fusion constraint solving and correlation updating as described above.

[0051] The parameterized driven method of the present invention, which integrates constraint solving and correlation updating, has the following advantages compared with the prior art:

[0052] (1) The parameterized driven method for integrating constraint solving and correlation updating of the present invention includes at least the following steps: constructing a directed graph of features to represent the first dependency relationship between features in the model based on the features and the constraint relationship between the features; grouping features into feature groups based on the first dependency relationship in the directed graph of features, as well as the constraint relationship and functional correlation of the features; and constructing a directed graph of feature groups to represent the second dependency relationship between feature groups based on the feature groups. On the one hand, this clarifies the dependency relationship between features and feature groups in the model, providing a clear structural framework for the subsequent integration of constraint solving and correlation updating mechanism, enabling accurate identification of the dependency characteristics of different features and feature groups in different scenarios; on the other hand, it uses the directed graph of feature groups to quickly locate the source feature group of constraint conflict, providing clear clues for debugging and reducing the time for troubleshooting. Feature grouping is not only based on constraint relationship, but also considers functional correlation, so that the feature group is consistent with the design logic. For example, in the building model, the "door opening function group" includes door opening sketch, door opening entity, etc., which together realize the "wall opening" function, making it easier for designers to understand and maintain.

[0053] Based on the directed graph topology of feature groups, the feature groups are sorted to determine the solution order. This decomposes the complex global constraint network into multiple feature groups, reducing the dimensionality of constraint solution and lowering computational complexity. Especially when dealing with large-scale, highly complex constraint networks where the number of constraints grows exponentially, grouped solution avoids the computational bottleneck of global solution in traditional methods. The constraint relationships within each feature group are relatively concentrated, reducing the amount of computation and thus improving overall computational efficiency. On the other hand, topological sorting ensures the logical correctness of the solution order, avoiding solution errors or duplicate calculations caused by chaotic dependencies.

[0054] Based on the solution order, constraints are solved sequentially for each feature group, and the results of the constraint solutions are used for correlation updates until the feature group is solved. This approach, organically integrating constraint solving and correlation update mechanisms, fully leverages the advantages of both. On one hand, constraint solving handles complex sketch constraints with local cyclic dependencies within feature groups (such as parallel, perpendicular, and tangent constraints between multiple line segments without a clear order), ensuring accurate solution of the local constraint network. On the other hand, for complex non-algebraic dependencies that constraint solving cannot handle, the correlation update mechanism addresses geometric references and dynamic changes between features. This achieves collaborative work between the two mechanisms, jointly addressing diverse and complex parametric-driven requirements. It utilizes constraint solving to ensure the accuracy of constraint satisfaction while using correlation updates to handle dynamic references and complex dependencies, thus comprehensively covering diverse design scenarios and enhancing design flexibility.

[0055] In response to model change events, the system sequentially updates the directed feature graph, feature groups, and directed feature group graph, repeating the above steps. The feature groups undergo constraint solving and correlation updates. This overcomes the limitation of existing technologies where fixed solution sequences cannot adapt to design changes. The dynamic directed graph can perceive changes in dependencies in real time and automatically adjust grouping and solution sequences, ensuring the model accurately reflects the design intent at any design stage. Furthermore, the system automatically triggers the update process after a change, eliminating the need for designers to manually adjust constraints or rebuild the model, thus avoiding model errors or update failures caused by changes in traditional methods. The directed feature graph, feature groups, and directed feature group graph employ efficient incremental updates, recalculating only the affected feature groups, avoiding global recalculation, significantly reducing waiting time, and supporting rapid design iteration.

[0056] (2) The parameterized driving method of the present invention, which integrates constraint solving and correlation updating, divides features into feature groups based on the first dependency relationship in the directed graph of features, as well as the constraint relationship and functional correlation of features. Specifically, it includes identifying multi-level dependency chains connected by the first dependency relationship in the directed graph of features, and dividing features located on the multi-level dependency chains into the same feature group, thus solving the problem of solution failure caused by the breakage of dependency chains in traditional methods. For example, dividing the complete dependency chain of "doorway sketch → doorway entity → wall Boolean operation" into the same feature group ensures the consistency of the solution process and avoids the inconsistency of intermediate states caused by unreasonable feature group division, thereby improving the stability and reliability of parameterized driving. On the other hand, it ensures the integrity of the design logic for feature structures with complex parent-child relationships.

[0057] Based on constraint relationships, the constraint correlation degree between feature pairs is obtained. If the constraint correlation degree is greater than a preset first threshold, the feature pair is divided into the same feature group. For features that are not divided, they are assigned to the feature group containing the feature with the highest constraint correlation degree. On the one hand, quantitative evaluation based on the ratio of the number of direct constraints to the total number of constraints can accurately identify feature combinations with close constraint relationships, forming highly cohesive feature groups, reducing inter-group dependencies, and thus reducing the complexity of subsequent constraint solving. On the other hand, adaptive grouping is achieved by setting a preset first threshold, which can ensure reasonable clustering of closely related features while avoiding an explosion in the number of groups caused by over-grouping.

[0058] If a feature is partitioned into different feature groups by multiple partitioning rules, the partitioning result of the multi-level dependency chain is prioritized. Based on the functional relevance of the features, the partitioning results are updated. Specifically, if a feature group contains cross-functional features, the feature group is split according to the functional boundary; if multiple feature groups have the same function, the corresponding features are combined into one feature group. This approach addresses the potential grouping conflicts that may arise when multiple rules are used in parallel, establishing clear priority rules and ensuring the priority protection of key dependencies, especially the intrinsic dependencies that have the greatest impact on model stability. Furthermore, it splits cross-functional feature groups according to functional boundaries and merges multiple feature groups with the same function, ensuring that technical grouping aligns with design intent, improving the model's understandability and maintainability, avoiding the "functional fragmentation" problem that may result from purely technically driven grouping, and ensuring centralized management of features with the same function.

[0059] (3) The parameterized driving method of the present invention, which integrates constraint solving and correlation update, is based on feature groups and constructs a directed graph of feature groups to represent the second dependency relationship between feature groups. Specifically, it takes the feature groups obtained after partitioning as nodes. If the feature in feature group A depends on the feature in feature group B, then a directed edge is established from feature group B to feature group A, and a directed graph of feature groups is constructed. This improves the complex feature-level dependency network to a more manageable group-level dependency network, greatly simplifies the system topology, and avoids the problem of computational complexity explosion caused by directly processing a large number of dependency relationships between features.

[0060] Based on the topological structure of the directed graph of feature groups, if a closed-loop feature group dependency chain exists, then any feature located in the closed-loop feature group is split into a new feature group, forming an open-loop feature group dependency chain. Compared to traditional methods that passively discover circular dependencies during the solution process, this scheme actively eliminates the problem in the preprocessing stage, ensuring that the logical correlation of features is maintained to the maximum extent while breaking the cycle, thus improving the solution success rate and solving the problem that constraint-solving methods struggle to handle circular dependencies.

[0061] If the number of features in a feature group exceeds a preset second threshold, and there are relatively independent sub-constraint groups within the feature group, then the feature group is divided into multiple feature groups according to the sub-constraint groups, and the feature groups and their directed graphs are updated. This solves the bottleneck problem of computational efficiency caused by large-scale feature groups. By controlling the scale, the computational complexity of each feature group is ensured to be within a controllable range. While maintaining functional relevance, the potential for parallel computing is improved through appropriate partitioning, making full use of multi-core processing capabilities.

[0062] (4) The parameterized driving method of the present invention, which integrates constraint solving and correlation updating, is based on a priority queue and uses a sliding window clustering method to divide feature groups with no second dependency intersection within the window into the same parallel solution batch. The window size is ≥1 and ≤ the number of CPU cores in the system. On the one hand, by precisely matching the window size with the number of CPU cores, it ensures that all computing cores can be fully utilized, avoiding the problem of resource idleness or competition in traditional methods. Parallel processing distributes the computing load evenly, improving the solution speed under large-scale complex models. On the other hand, only feature groups with no second dependency intersection are assigned to the same parallel batch, avoiding race conditions and data inconsistency problems caused by parallel processing of feature groups with dependencies. While pursuing parallel efficiency, it strictly adheres to the dependency order between feature groups, ensuring the reliability of parameterized driving. Attached Figure Description

[0063] Figure 1 This is a schematic diagram of the technical process of a first embodiment of the parameterized driving method for fusion constraint solving and correlation updating of the present invention;

[0064] Figure 2 This is a schematic diagram of a three-dimensional building structure of a door-wall-ceiling structure, representing an embodiment of the parametrically driven method for integrating constraint solving and correlation updating of the present invention.

[0065] Figure 3 This is a schematic diagram of the characteristic directed graph structure of an embodiment of the parameterized driving method for fusion constraint solving and correlation updating of the present invention;

[0066] Figure 4 This is a schematic diagram of the directed graph structure of the feature group, which is an embodiment of the parameterized driving method for fusion constraint solving and correlation updating of the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0068] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0069] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, an integral connection, or a detachable connection; they can refer to the internal connection of two components; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0070] Example 1

[0071] To better understand and illustrate the technical solution of the parameterized driving method that integrates constraint solving and associative updates in this embodiment, this embodiment uses a "3D model of a door-wall-ceiling building structure" as an example to explain how a dynamic directed graph is applied to both constraint solving and associative updates as parameterized driving mechanisms. The solution order is determined based on the topology of the dynamic directed graph, thereby integrating the two parameterized driving mechanisms. It should be noted that other models can also refer to the method of this embodiment to achieve the integration of constraint solving and associative updates as parameterized driving mechanisms.

[0072] The first dependency represents the dependency between features in the model, and the directed edges in the directed graph of features indicate the direction of the first dependency. The second dependency represents the dependency between groups of features, and the directed edges in the directed graph of feature groups indicate the direction of the second dependency.

[0073] This embodiment uses a parameterized driven method that integrates constraint solving and correlation updates, such as... Figure 1 As shown, it includes at least the following steps:

[0074] Step S1: Based on the features in the model and the constraints between the features, construct a directed feature graph to represent the first dependency relationship between the features in the model, where nodes represent features and directed edges represent the direction of the first dependency relationship between features.

[0075] It should be noted that the "3D model of the building structure of door-wall-ceiling" is as follows: Figure 2As shown, four reference planes F1-F4 define the front, back, left, and right boundaries of four walls. Each of the four reference planes has two sets of distance constraints, determining the length and width of the room enclosed by the four walls, providing a spatial positioning reference for the entire building structure. Wall sketch F5 is aligned to the four reference planes through constraints, and wall entity F6 is extruded from wall sketch F5 through an associative update mechanism. A door instance F7 is placed on one of the wall entities F6. The door instance has alignment constraints with the wall entity, and its placement on the wall is determined by distance constraints from reference plane F1. Corresponding to the position of the door instance is a doorway sketch F8, which is linked to the size and position of door instance F7 through constraints. Doorway entity F9 is extruded from doorway sketch F8 through an associative update mechanism and undergoes a Boolean subtraction operation with wall entity F6 to subtract the opening for the door instance from the wall. Simultaneously, a suspended ceiling surrounds the top of the wall entity, with the suspended ceiling path sketch F10 referencing the inner edge of the top of wall entity F6 and linked to the position of the wall entity through associative updates. The ceiling outline sketch F11 is perpendicular to the ceiling path sketch. The ceiling solid F12 is created by sweeping the path sketch and the outline sketch.

[0076] Step S1 specifically includes the following steps:

[0077] Step S101: Traverse the features in the model and treat each feature as a node in the directed graph of the features.

[0078] Traverse the features in the "door-wall-ceiling building structure 3D model", collect the features and the constraint relationships of the features, and establish a "constraint-feature mapping table", as shown in Table 1:

[0079] Table 1, Constraint-Feature Mapping Table

[0080] Feature ID Feature Name Feature type Internal constraints External constraints F1 Reference plane 1 Reference plane none none F2 Reference plane 2 Reference plane none F1 (Distance constraint: Room length) F3 Reference plane 3 Reference plane none F1 (Distance constraint: Room width) F4 Reference plane 4 Reference plane none F2 (parallel constraint), F3 (parallel constraint) F5 Wall sketch sketch Line length constraint, closure constraint F1 (alignment constraint), F2 (alignment constraint), F3 (alignment constraint), F4 (alignment constraint) F6 solid wall entity Tensile height constraint (3m) F5 (Tension Reference Constraint) F7 Gate instance Component Examples Door width constraint (0.9m), door height constraint (2.1m) F6 (Alignment constraint: flush with wall) F1 (Distance constraint: 2m from F1) F8 Doorway sketch sketch Rectangular dimension constraint (0.9m × 2.1m) F7 (Alignment constraint: aligns with the center of the gate instance) F9 Doorway solid entity Tensile depth constraint (wall thickness) F8 (Tension Datum Constraint), F6 (Boolean Subtraction Datum Constraint) F10 Ceiling path sketch sketch Closed constraints F6 (Reference constraint: Inner edge of top of wall entity) F11 Ceiling outline sketch sketch Rectangular dimension constraint (0.2m × 0.1m) none F12 Suspended ceiling solid entity Sweep length constraint F10 (Sweep Path Constraint), F11 (Sweep Profile Constraint)

[0081] It should be noted that the constraint relationships of a feature include internal and external constraints. Internal constraints are those inherent to the feature itself, including parallel constraints of lines within the sketch and dimensional constraints of the solid. External constraints are the relational constraints between the feature and other features, including constraints aligning the sketch to a reference plane and assembly constraints between a solid and another solid. In this embodiment, geometric constraints (parallel, perpendicular, and alignment constraints) and dimensional constraints (distance, angle, and length) are resolved through a constraint-solving mechanism, allowing the system to automatically adjust the geometry and spatial position of the model to always conform to preset design rules. Relational constraints include assembly constraints (assembly relationships between components) and reference constraints (reference relationships between dependent geometric elements during feature creation). These are linked through expressions and an association update mechanism, and the overall model is updated in a coordinated manner using a structure tree.

[0082] The "3D model of the door-wall-ceiling building structure" includes 12 features: Reference Plane 1, Reference Plane 2, Reference Plane 3, Reference Plane 4, Wall Sketch, Wall Solid, Door Instance, Door Opening Sketch, Door Opening Solid, Ceiling Path Sketch, Ceiling Outline Sketch, and Ceiling Solid. Figure 3 As shown, 12 features are used as nodes in the directed feature graph.

[0083] Step S102: Based on the feature creation command or modeling history, determine the parent feature corresponding to the current feature, and construct the first directed edge from the parent feature to the current feature.

[0084] In this embodiment, based on the modeling history and feature creation order of the "door-wall-ceiling building structure 3D model", the following inherent dependency relationships (parent-child relationships) are identified:

[0085] 1. The inherent dependency chain of the wall system

[0086] The wall solid (F6) is created from the wall sketch (F5) through an extrusion operation, constructing the first directed edge: F5 → F6 (wall sketch → wall solid).

[0087] 2. The inherent dependency chain of the doorway system

[0088] The doorway solid (F9) is created from the doorway sketch (F8) by an extrusion operation, constructing the first directed edge: F8 → F9 (doorway sketch → doorway solid).

[0089] 3. The inherent dependency chain of the ceiling system

[0090] The ceiling solid (F12) is created by sweeping the ceiling path sketch (F10) and the ceiling outline sketch (F11) to construct the first directed edge: F10 → F12 (ceiling path sketch → ceiling solid); F11 → F12 (ceiling outline sketch → ceiling solid).

[0091] 4. Intrinsic Dependencies of the Base Reference System

[0092] Using planes F1, F2, F3, and F4 as the base features (with no parent features), create the wall sketch (F5), door instance (F7), doorway sketch (F8), ceiling path sketch (F10), and ceiling outline sketch (F11) as the base features (with no parent features).

[0093] Step S103: Based on the constraint relationship of the features, construct a second directed edge from the referenced feature to the referencing feature.

[0094] Based on the external constraint information in Table 1, the following external dependencies are identified:

[0095] 1. Constraints of a reference planar system

[0096] Given that there is a distance constraint between reference planes F2 and F1, construct a second directed edge: F1 → F2 (reference plane 1 → reference plane 2).

[0097] Given that there is a distance constraint between reference planes F3 and F1, construct a second directed edge: F1 → F3 (reference plane 1 → reference plane 3).

[0098] Since reference plane F4 has parallel constraints with F2 and F3, construct the second directed edge: F2 → F4 (reference plane 2 → reference plane 4); F3 → F4 (reference plane 3 → reference plane 4).

[0099] 2. External constraints of the wall system

[0100] The wall sketch (F5) has alignment constraints with the four reference planes. Construct the second directed edge: F1 → F5 (reference plane 1 → wall sketch); F2 → F5 (reference plane 2 → wall sketch); F3 → F5 (reference plane 3 → wall sketch); F4 → F5 (reference plane 4 → wall sketch).

[0101] 3. External constraints of gate systems

[0102] The door instance (F7) has an alignment constraint with the wall entity (F6) and a distance constraint with the reference plane F1. Construct a second directed edge: F6 → F7 (wall entity → door instance); F1 → F7 (reference plane 1 → door instance); The door opening sketch (F8) has an alignment constraint with the door instance (F7). Construct a second directed edge: F7 → F8 (door instance → door opening sketch).

[0103] 4. External constraints of the doorway structure

[0104] The doorway solid (F9) has an extrusion datum constraint with the doorway sketch (F8) and a Boolean subtraction datum constraint with the wall solid (F6). Construct the second directed edge: F8 → F9 (doorway sketch → doorway solid); F6 → F9 (wall solid → doorway solid).

[0105] 5. External constraints of the suspended ceiling system

[0106] The ceiling path sketch (F10) and the wall solid (F6) have a reference constraint, so a second directed edge is constructed: F6 → F10 (wall solid → ceiling path sketch). The ceiling solid (F12) has a sweep constraint with both the ceiling path sketch (F10) and the ceiling outline sketch (F11), so a second directed edge is constructed: F10 → F12 (ceiling path sketch → ceiling solid); F11 → F12 (ceiling outline sketch → ceiling solid).

[0107] Step S103: Construct a feature-directed graph based on the nodes, the first directed edge, and the second directed edge.

[0108] Step S2: Based on the first dependency relationship in the directed feature graph, as well as the constraint relationship and functional correlation of the features, the features are grouped to obtain feature groups.

[0109] Step S2 specifically includes the following steps:

[0110] Step S201: Based on the first dependency relationship in the directed feature graph, identify multi-level dependency chains connected by the first dependency relationship, and group features located on the multi-level dependency chains into the same feature group. This solves the problem of solution failure caused by broken dependency chains in traditional methods. For example, dividing the complete dependency chain "doorway sketch → doorway entity → wall Boolean operation" into the same feature group ensures the consistency of the solution process, avoids inconsistencies in intermediate states caused by unreasonable feature group division, and improves the stability and reliability of parameter-driven methods. Furthermore, for feature structures with complex parent-child relationships, it guarantees the integrity of the design logic.

[0111] In this embodiment, based on the intrinsic dependencies identified in step S102, the following multi-level dependency chains are identified:

[0112] 1. Wall system dependency chain

[0113] Identify the dependency chain: wall sketch (F5) → wall entity (F6), and classify F5 and F6 into the same feature group (wall function group).

[0114] 2. Doorway System Dependency Chain

[0115] Identify the dependency chain: doorway sketch (F8) → doorway entity (F9), and classify F8 and F9 into the same feature group (doorway function group).

[0116] 3. Ceiling system dependency chain

[0117] Identify the dependency chain: ceiling path sketch (F10) + ceiling outline sketch (F11) → ceiling entity (F12), and divide F10, F11 and F12 into the same feature group (ceiling function group).

[0118] Step S202: Based on the constraint relationship, obtain the constraint correlation degree between feature pairs, specifically using the following calculation method:

[0119] ;

[0120] in, The constraint correlation degree between feature a and feature b. Let be the number of direct constraints between feature a and feature b. The total number of constraints for feature a. Let be the total number of constraints for feature b.

[0121] In this embodiment, the constraint correlation degree is calculated as follows:

[0122] F1 and F2: correlation degree = 1 (1 distance constraint) / (0+1) = 1;

[0123] F5 and F6: Correlation = 1 (1 stretching datum constraint) / (2+1) = 0.33;

[0124] F7 and F8: Relevance = 1 (1 alignment constraint) / (2+1) = 0.33;

[0125] F10 and F12: Correlation = 1 / (1+1) = 0.5;

[0126] F11 and F12: correlation degree = 1 / (1+1) = 0.5.

[0127] Step S203: If the constraint correlation degree is greater than a preset first threshold, the feature pairs are divided into the same feature group. For features that are not divided, they are assigned to the feature group containing the feature with the highest constraint correlation degree. On the one hand, quantitative evaluation based on the ratio of the number of direct constraints to the total number of constraints can accurately identify feature combinations with close constraint relationships, forming highly cohesive feature groups, reducing inter-group dependencies, and thus reducing the complexity of subsequent constraint solving. On the other hand, adaptive grouping is achieved by setting a preset first threshold, which can ensure reasonable clustering of closely related features and avoid an explosion in the number of groups caused by excessive grouping.

[0128] In this embodiment, the first threshold is set to 0.3. Based on the above calculation results, F1 and F2, F5 and F6, F7 and F8, F10 and F12, and F11 and F12 are divided into a feature group.

[0129] Step S204: If a feature is divided into different feature groups by multiple partitioning rules, the partitioning result of the multi-level dependency chain shall be followed first.

[0130] The partitioning results are updated based on the functional correlation of features, specifically including:

[0131] If a feature group contains cross-functional features, the feature group is split according to the functional boundary. If multiple feature groups have the same function, the corresponding features are combined into one feature group. On the one hand, this solves the grouping conflict problem that may occur when multiple rules are implemented in parallel, establishes clear priority rules, and ensures the priority protection of key dependencies, especially the intrinsic dependencies that have the greatest impact on model stability. On the other hand, splitting cross-functional feature groups according to functional boundaries and merging multiple feature groups with the same function ensures that technical grouping is consistent with the design intent, improves the understandability and maintainability of the model, avoids the "functional fragmentation" problem that may be caused by purely technical grouping, and ensures centralized management of features with the same function.

[0132] In this embodiment, the functional relationships of the building model include:

[0133] Basic references: F1, F2, F3, F4.

[0134] Walls: F5, F6.

[0135] Doorways: F7, F8, F9.

[0136] Ceiling: F10, F11, F12.

[0137] Check the consistency between the initial grouping and the functional modules. Adjust F7 to the doorway functional group and merge it with F8 and F9. Confirm that the boundaries of each feature group and functional module are consistent, and no further splitting or merging is required. The final feature grouping result is obtained.

[0138] Basic reference feature group G1: F1, F2, F3, F4;

[0139] Wall feature group G2: F5, F6;

[0140] Doorway feature group G3: F7, F8, F9;

[0141] Ceiling feature group G4: F10, F11, F12.

[0142] Step S3: Based on the feature groups, construct a directed graph of feature groups to represent the second dependency relationship between feature groups, where nodes represent feature groups and directed edges represent the direction of the second dependency relationship between feature groups.

[0143] Step S3 specifically includes the following steps:

[0144] Step S301: Using the feature groups obtained after partitioning as nodes, if the features in feature group A depend on the features in feature group B, then establish a directed edge from feature group B to feature group A, construct a directed graph of feature groups, and elevate the complex feature-level dependency network to a more manageable group-level dependency network. This greatly simplifies the system topology and avoids the problem of computational complexity explosion caused by directly processing a large number of dependency relationships between features.

[0145] In this embodiment, four feature groups are used as nodes in the directed graph of feature groups:

[0146] G1: Basic reference feature group (including F1, F2, F3, F4);

[0147] G2: Wall feature group (including F5 and F6);

[0148] G3: Doorway feature group (including F7, F8, F9);

[0149] G4: Ceiling feature group (including F10, F11, and F12).

[0150] Among them, such as Figure 4 As shown, the wall sketch (F5, belonging to G2) is aligned to four reference planes (F1-F4, belonging to G1), creating a directed edge: G1 → G2. The door instance (F7, belonging to G3) is aligned to the wall solid (F6, belonging to G2), creating a directed edge: G2 → G3. The door instance (F7, belonging to G3) has a distance constraint with reference plane 1 (F1, belonging to G1), creating a directed edge: G1 → G3. The ceiling path sketch (F10, belonging to G4) references the top inner edge of the wall solid (F6, belonging to G2), creating a directed edge: G2 → G4.

[0151] Step S302: Based on the topological structure of the directed graph of feature groups, if a closed-loop feature group dependency chain exists, then any feature located in the closed-loop feature group is split into a new feature group, forming an open-loop feature group dependency chain. Compared to traditional methods that passively discover circular dependencies during the solution process, this scheme actively eliminates the problem in the preprocessing stage, ensuring that the logical correlation of features is maintained to the maximum extent while breaking the cycle, improving the solution success rate, and solving the problem that constraint-solving methods struggle to handle circular dependencies.

[0152] In this embodiment, there is no closed-loop structure, so there is no need to split the feature groups.

[0153] Step S303: If the number of features in a feature group is greater than a preset second threshold, and there are relatively independent sub-constraint groups within the feature group, then the feature group is divided into multiple feature groups according to the sub-constraint groups, and the feature groups and the directed graph of the feature groups are updated. This solves the bottleneck problem of computational efficiency caused by large-scale feature groups. By controlling the scale, the computational complexity of each feature group is ensured to be within a controllable range. While maintaining functional relevance, the potential for parallel computing is improved through appropriate partitioning, making full use of multi-core processing capabilities.

[0154] In this embodiment, the second threshold is set to 10. The number of features in each feature group is as follows: G1 has 4 features, G2 has 2 features, G3 has 3 features, and G4 has 3 features. The number of features in all feature groups is within a reasonable range (≤ the preset second threshold), and the features within each group are highly related. There are no independent sub-constraint groups that need to be split, therefore feature group splitting is unnecessary. On the one hand, the dependencies between features and feature groups in the model are clarified, providing a clear structural framework for subsequent constraint solving and correlation update mechanisms, enabling accurate identification of the dependency characteristics of different features and feature groups in different scenarios. On the other hand, the directed graph of feature groups is used to quickly locate the source feature group of constraint conflicts, providing clear clues for debugging and reducing troubleshooting time. Feature grouping is not only based on constraint relationships but also considers functional relevance, ensuring that feature groups are consistent with the design logic. For example, in the architectural model, the "doorway function group" includes doorway sketches, doorway entities, etc., jointly realizing the "wall opening" function, making it easier for designers to understand and maintain.

[0155] Step S4: Based on the topological structure of the directed graph of feature groups, sort the feature groups to determine the solution order. Decomposing the complex global constraint network into multiple feature groups reduces the dimensionality of constraint solving and lowers computational complexity. Especially when dealing with large-scale, highly complex constraint networks where the number of constraints grows exponentially, grouped solving avoids the computational bottleneck of global solving in traditional methods. The constraint relationships within each feature group are relatively concentrated, reducing the amount of computation and thus improving overall computational efficiency. On the other hand, topological sorting ensures the logical correctness of the solution order, avoiding solution errors or duplicate calculations caused by chaotic dependencies.

[0156] Step S4 specifically includes the following steps:

[0157] Step S401: Based on the directed graph topology of the feature group, construct an adjacency list and an in-degree array. The adjacency list includes the downstream feature groups pointed to by each feature group and the dependency weights between the corresponding feature groups. The in-degree array records the number of preceding feature groups that each feature group depends on.

[0158] In this embodiment, the dependency weight is determined by the first dependency relationship and the number between the features in the feature group and the features in the downstream feature group. Different basic weights are set for different types of first dependency relationships between features, and the dependency weight is set as the sum of the basic weights corresponding to all first dependency relationships.

[0159] The first type of dependency relationship between features includes geometric constraints, size constraints, and reference relationships. Among them, the basic weight of geometric constraints is greater than the basic weight of size constraints, and the basic weight of size constraints is greater than the basic weight of reference relationships.

[0160] In this embodiment, based on the directed graph of feature groups constructed in step S3, an adjacency list and an in-degree array are constructed, wherein the adjacency list is:

[0161] {'G1': {'G2': 3, 'G3': 2}, 'G2': {'G3': 3, 'G4': 2}, 'G3': {}, 'G4':{}}.

[0162] The dependency weights for G1→G2 are set to 3, G1→G3 ​​are set to 2, G2→G3 are set to 3, and G2→G4 are set to 2.

[0163] The in-degree array is: { 'G1': 0, 'G2': 1, 'G3': 2, 'G4': 1}.

[0164] Step S402: Add feature groups with an in-degree of 0 to the priority queue. Based on the dependency weights, obtain the total dependency weights corresponding to the feature groups. The specific calculation method is as follows:

[0165] ;

[0166] in, For G i With G i The downstream feature group G it points to j Dependency weights between them;

[0167] Based on the total dependency weight, the feature groups in the priority queue are sorted in batches. The feature group corresponding to the largest total dependency weight is added to the topology sequence, and the in-degree of the corresponding downstream feature group is updated.

[0168] In this embodiment, (1) the priority queue is initialized, and the feature group G1 with an in-degree of 0 is calculated to calculate the total dependency weight of G1:

[0169] Σw(G1→Gj) = w(G1→G2) + w(G1→G3) = 3 + 2 = 5;

[0170] Add G1 to the priority queue and sort it in descending order of total dependency weight.

[0171] (2) In the first round of processing, G1 (total dependency weight 5, highest priority) is taken out from the priority queue, added to the topological sequence [G1], and the in-degree of the downstream feature group of G1 is updated:

[0172] G2 in-degree minus 1: 1-1=0;

[0173] G3 in-degree minus 1: 2-1=1;

[0174] Calculate the total dependency weights for the feature set (G2) with a new in-degree of 0:

[0175] Σw(G2→Gj) = w(G2→G3) + w(G2→G4) = 3 + 2 = 5;

[0176] Add G2 to the priority queue.

[0177] (3) In the third round of processing, G2 (total dependency weight 5) is taken out from the priority queue, added to the topological sequence [G1, G2], and the in-degree of the downstream feature group of G2 is updated:

[0178] G3 in-degree minus 1: 1-1=0;

[0179] G4 in-degree minus 1: 1-1=0;

[0180] Calculate the total dependency weights for feature groups (G3, G4) with a new in-degree of 0:

[0181] G3 total dependency weight: 0;

[0182] G4 total dependency weight: 0;

[0183] Add G3 and G4 to the priority queue.

[0184] Step S403: Repeat step S402 until all feature groups are added to the topology sequence to determine the solution order.

[0185] In this embodiment, (4) in the third round of processing, G3 (total dependency weight 0) is taken out from the priority queue and added to the topology sequence [G1, G2, G3]. (5) in the fourth round of processing, G4 (total dependency weight 0) is taken out from the priority queue and added to the topology sequence [G1, G2, G3, G4] to obtain the final topology sequence [G1, G2, G3, G4].

[0186] Step S402 further includes the following steps:

[0187] Based on priority queues, a sliding window clustering method is used to divide feature groups with no second dependency intersection within the window into the same parallel solution batch. The window size is ≥1 and ≤ the number of CPU cores in the system.

[0188] In this embodiment, based on the dependencies in the topological sequence, it is found that G3 and G4 both depend only on G2 and have no dependency on each other. Combined with the CPU core configuration, G3 and G4 are adjusted to be in the same parallel solution batch, resulting in the final optimized solution order:

[0189] Batch 1: G1 (Basic Reference Group)

[0190] Batch 2: G2 (Wall Function Group)

[0191] Batch 3: G3+G4 (Door and Window Function Group + Ceiling Function Group, parallel calculation).

[0192] Step S5 involves sequentially solving constraints for each feature group based on the solution order, and then updating the relationships based on the results of the constraint solving until the feature group is solved. This approach, organically integrating constraint solving and the relationship update mechanism, fully leverages the advantages of both mechanisms. On one hand, constraint solving handles complex sketch constraints with local cyclic dependencies within feature groups (such as parallel, perpendicular, and tangent constraints between multiple line segments without a clear order), ensuring accurate solution of the local constraint network. On the other hand, for complex non-algebraic dependencies that constraint solving cannot handle, the relationship update mechanism addresses geometric references and dynamic changes between features. This allows the two mechanisms to work collaboratively, addressing diverse and complex parametric-driven requirements. Constraint solving ensures the accuracy of constraint satisfaction, while relationship updates handle dynamic references and complex dependencies, thus comprehensively covering diverse design scenarios and enhancing design flexibility.

[0193] In this embodiment, the constraint solution process for batch 1 is as follows:

[0194] Solve the distance constraints between reference planes, the distance constraints between F2 and F1 (room length), and the distance constraints between F3 and F1 (room width).

[0195] Solve for the parallel constraints between reference planes, specifically the parallel constraints between F4 and F2 and F3.

[0196] The associated update process for batch 1:

[0197] Update the geometric position of the reference plane. Since G1 is the basic feature group and has no upstream dependency, the update is completed directly. Mark the completion of G1 solution and trigger the pending solution state of downstream feature groups G2 and G3.

[0198] The constraint solution process for batch 2:

[0199] Set the referenced G1 feature group constraint objects (F1-F4) to fixed;

[0200] Solve the internal constraints, line length constraints, and closure constraints of the wall sketch F5;

[0201] Solve the alignment constraints between the wall sketch F5 and the reference planes (F1-F4).

[0202] The associated update process for batch 2:

[0203] Based on the constraint solution results, update the geometry of the wall sketch F5;

[0204] Perform a related update, generating a wall entity F6 (extrude operation) based on the wall sketch F5.

[0205] Update the geometry of wall entity F6;

[0206] Once G2 is completed, the pending calculation state of downstream feature groups G3 and G4 is triggered.

[0207] Batch 3 performs parallel calculations of door and window feature group G3 (F7-F9) and ceiling feature group G4 (F10-F12). The constraint solution process for door and window feature group G3 is as follows:

[0208] Set the referenced G1 and G2 feature group constraint objects (F1, F6) to fixed;

[0209] Solve for the door width constraint (0.9m) and door height constraint (2.1m) of door instance F7.

[0210] Solve the alignment constraints between door instance F7 and wall entity F6, and the distance constraints between door instance F7 and reference plane F1.

[0211] Solve the alignment constraints between the doorway sketch F8 and the door instance F7;

[0212] Solve the dimensional constraints (0.9m × 2.1m) of the rectangle in the doorway sketch F8.

[0213] The process of updating the association of door and window feature group G3:

[0214] Update the position of gate instance F7 based on the constraint solution results;

[0215] Update the geometry and position of the doorway sketch F8;

[0216] Perform a related update, generating a doorway solid F9 from the doorway sketch F8 (extrude operation);

[0217] Perform a Boolean subtraction operation to subtract the doorway entity F9 from the wall entity F6;

[0218] The G3 solution is now complete.

[0219] The constraint solution process for ceiling feature group G4:

[0220] Set the referenced G2 feature group constraint object (F6) to fixed;

[0221] Solve the closure constraints of the ceiling path sketch F10;

[0222] Solve the rectangular dimension constraints (0.2m × 0.1m) of the ceiling outline sketch F11;

[0223] Solve the sweep length constraint of the ceiling solid F12.

[0224] The associated update process of ceiling feature group G4:

[0225] Based on the constraint solution results, update the ceiling path sketch F10 (referencing the top inner edge of the wall entity F6).

[0226] Update the geometry of the ceiling outline sketch F11;

[0227] Perform a related update to generate the ceiling entity F12 based on the path sketch F10 and the outline sketch F11 (sweep operation).

[0228] The G4 solution is now complete.

[0229] Step S6: In response to model change events, the directed feature graph, feature group, and directed feature group graph are updated sequentially. The above steps are repeated to perform constraint solving and relational updates on the feature group. On one hand, this overcomes the shortcomings of existing technologies where the fixed solution order cannot adapt to design changes. The dynamic directed graph can perceive changes in dependencies in real time and automatically adjust grouping and solution order, ensuring that the model accurately reflects the design intent at any design stage. On the other hand, the system automatically triggers the update process after a change, eliminating the need for designers to manually adjust constraints or rebuild the model, thus avoiding model errors or update failures caused by changes in traditional methods. The directed feature graph, feature group, and directed feature group graph use efficient incremental updates, recalculating only the affected feature groups, avoiding global recalculation, significantly shortening waiting time, and supporting rapid design iteration.

[0230] In this embodiment, in response to model change events, the real-time feature directed graph is updated in real time, specifically including the following steps:

[0231] The detection model includes change events such as the addition, deletion, and modification of features, and / or the addition and deletion of constraints between features;

[0232] Based on change events, the feature directed graph is updated by adding or deleting corresponding nodes and / or directed edges.

[0233] Example 2

[0234] This embodiment provides an apparatus including a memory and a processor. The memory stores a computer program configured to be executed by the processor. The computer program includes instructions for performing the methods described in any of the preceding embodiments.

[0235] This embodiment also provides a medium including a computer program / instructions that, when executed by a processor, implement the parameterized driving method for constraint solving and correlation update fusion as described above.

[0236] In summary, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A parameterized driven method that integrates constraint solving and correlation updating, characterized in that, It should include at least the following steps: Based on the features in the model and the constraints of the features, a directed feature graph is constructed to represent the first dependency relationship between the features in the model, where nodes represent features and directed edges represent the direction of the first dependency relationship between features. Based on the first dependency relationship in the directed graph of the features, as well as the constraint relationship and functional association of the features, the features are grouped to obtain feature groups; Based on the feature groups, a directed graph of feature groups is constructed to represent the second dependency relationship between feature groups, where nodes represent feature groups and directed edges represent the direction of the second dependency relationship between feature groups. Based on the topological structure of the directed graph of the feature groups, the feature groups are sorted to determine the solution order, specifically including: Step S401: Based on the directed graph topology of the feature group, construct an adjacency list and an in-degree array. The adjacency list includes the downstream feature group pointed to by each feature group and the dependency weight between the corresponding feature groups. The in-degree array records the number of preceding feature groups that each feature group depends on. Step S402: Add the feature group with an in-degree of 0 to the priority queue. Based on the dependency weight, obtain the total dependency weight corresponding to the feature group. Based on the total dependency weight, sort the feature groups in the priority queue in batches. Add the feature group corresponding to the maximum total dependency weight to the topology sequence and update the in-degree of the corresponding downstream feature group. Step S403: Repeat step S402 until all feature groups are added to the topology sequence to determine the solution order; Based on the solution order, constraints are solved sequentially for each feature group, and correlation updates are performed based on the results of the constraint solutions, until all feature groups have been solved. In response to the change event of the model, the directed graph of features, the feature group, and the directed graph of the feature group are updated sequentially. The above steps are repeated to solve the constraints and update the associations of the feature group.

2. The parameterized driven method for fusion constraint solving and correlation updating according to claim 1, characterized in that, The construction of a directed feature graph representing the first dependency relationship between features in the model, based on the features and the constraints of those features, specifically includes the following steps: Traverse the features in the model and treat each feature as a node in the directed graph of the features; Based on the creation command or modeling history of the feature, determine the parent feature corresponding to the current feature, and construct the first directed edge from the parent feature to the current feature; Based on the constraint relationship of the aforementioned features, a second directed edge is constructed pointing from the referenced feature to the referencing feature; Based on the nodes, the first directed edge, and the second directed edge, a feature directed graph is constructed.

3. The parameterized driven method for fusion constraint solving and correlation updating according to claim 1 or 2, characterized in that, The step of dividing the features into feature groups based on the first dependency relationship in the directed graph of the features, as well as the constraint relationship and functional correlation of the features, specifically includes the following steps: Based on the first dependency relationship in the directed graph of features, multi-level dependency chains connected by the first dependency relationship are identified, and features located on the multi-level dependency chains are divided into the same feature group. Based on the aforementioned constraint relationships, the constraint correlation degree between feature pairs is obtained, specifically using the following calculation method: ; in, The constraint correlation degree between feature a and feature b. Let be the number of direct constraints between feature a and feature b. The total number of constraints for feature a. The total number of constraints for feature b; If the constraint correlation degree is greater than a preset first threshold, the feature pairs are divided into the same feature group. For features that are not divided, the features are assigned to the feature group where the feature with the highest constraint correlation degree is located. If the feature is divided into different feature groups by multiple partitioning rules, the partitioning result of the multi-level dependency chain shall be followed first. The partitioning results are updated based on the functional correlation of the aforementioned features, specifically including: If there are cross-functional features in the feature group, the feature group is split according to the functional boundary; if multiple feature groups have the same function, the corresponding multiple features are combined into one feature group.

4. The parameterized driven method for fusion constraint solving and correlation updating according to claim 3, characterized in that, The step of constructing a directed graph of feature groups to represent the second dependency relationship between feature groups specifically includes the following steps: Using the feature groups obtained after partitioning as nodes, if the features in feature group A depend on the features in feature group B, then establish directed edges from feature group B to feature group A, and construct a directed graph of feature groups. Based on the topological structure of the directed graph of feature groups, if there is a feature group dependency chain with a closed loop structure, then any feature located in the feature group of the closed loop structure is split into a new feature group, forming a feature group dependency chain with an open loop structure. If the number of features in the feature group is greater than a preset second threshold, and there are relatively independent sub-constraint groups within the feature group, then the feature group is divided into multiple feature groups according to the sub-constraint groups, and the feature group and the directed graph of the feature group are updated.

5. The parameterized driven method for fusion constraint solving and correlation updating according to claim 1, characterized in that: Step S402 further includes the following steps: Based on the priority queue, a sliding window clustering method is used to divide feature groups with no second dependency intersection within the window into the same parallel solution batch. The window size is ≥1 and ≤ the number of system CPU cores.

6. The parameterized driven method for fusion constraint solving and correlation updating according to claim 1, characterized in that: The dependency weight is determined by the first dependency relationship and the number between the features in the feature group and the features in the downstream feature group, wherein different types of first dependency relationships between the features are assigned different base weights, and the dependency weight is set as the sum of the base weights corresponding to all first dependency relationships; The different types of first dependencies between features include geometric constraints, size constraints, and reference relationships, wherein the base weight of the geometric constraint is greater than the base weight of the size constraint, and the base weight of the size constraint is greater than the base weight of the reference relationship.

7. The parameterized driven method for fusion constraint solving and correlation updating according to any one of claims 1-2 or 4-6, characterized in that: The real-time update of the directed feature graph in response to changes in the model includes the following steps: Detect change events of the model, including the addition, deletion, and modification of features, and / or the addition and deletion of constraints between features; Based on the change event, the feature directed graph is updated by adding or deleting corresponding nodes and / or directed edges.

8. A device, characterized in that, It includes a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the method as claimed in any one of claims 1-7.

9. A medium, characterized in that, It includes a computer program / instruction that, when executed by a processor, implements the parameterized driven method for fusion constraint solving and correlation updating as described in any one of claims 1-7.