Geometric model dynamic processing method, equipment and product based on constraint engine

By automatically removing circular dependencies in the geometric model within the constraint engine and generating target dependency information, the unsolvable problem caused by circular dependencies in the dynamic processing of geometric models is solved, improving solution efficiency and response speed.

CN121786905APending Publication Date: 2026-04-03BWTON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, the constraint engine of geometric models is prone to circular dependencies during dynamic processing, which can lead to no solution or convergence failure, affecting the stability and solution efficiency of the model. Furthermore, manual intervention to modify dependencies cannot guarantee timeliness.

Method used

By obtaining initial dependency information from the constraint engine, directed dependencies are automatically removed, target dependency information without circular dependencies is generated, and other node data is dynamically calculated based on the updated constraint node data, avoiding repeated solutions and improving solution efficiency.

Benefits of technology

This achieves unidirectional dependency between constraint nodes, avoiding repeated solutions and redundant calculations, and improving the solution efficiency and response speed of the geometric model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786905A_ABST
    Figure CN121786905A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a constraint engine-based geometric model dynamic processing method, equipment and a product. The method comprises the following steps: in a constraint engine, obtaining initial dependency information corresponding to a geometric model; receiving an update operation on node data of any constraint node in the geometric model, and according to any constraint node, performing directed dependency relationship deletion processing on the initial dependency information to obtain target dependency information; according to the target dependency information and the updated node data of any constraint node, calculating updated node data corresponding to other constraint nodes in the geometric model; and applying the updated node data of each constraint node to the corresponding constraint node in the geometric model to obtain an updated geometric model. Through the method, the problem that part of constraint nodes have no solution due to repeated solution of the constraint nodes can be avoided, and the solution efficiency of the constraint nodes in the geometric model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method, device, and product for dynamic processing of geometric models based on a constraint engine. Background Technology

[0002] Geometric models are abstract expressions of the real world, forming the digital foundation of "everything." They also represent a new paradigm for digital expression in modern industry, from conceptual design to manufacturing. Whether it's architecture, bridges, airplanes, automobiles, or high-end equipment and chip manufacturing, their structure, dimensions, and precision all rely on accurate geometric modeling. Therefore, high-quality industrial development requires high-quality geometric models.

[0003] The formation of a geometric model requires a geometry engine to construct the model and a constraint engine to express and solve the constraints or logical relationships between the various elements within the geometric model. Specifically, the constraint engine automatically finds one or more variable assignment schemes that satisfy all constraints, given a set of variables, their possible ranges (domains), and the relationships (constraints) that must be satisfied between these variables. For example, the constraint engine is used to simulate connections between objects, such as doors, windows, or walls. Therefore, the geometric model is both the target constructed and presented by the geometry engine and the object of calculation and control by the constraint engine. The two work together to form a parameter-driven geometric modeling mechanism. For example, if the constraint condition is "the wall is always perpendicular to the ground" or "one obtuse angle of the triangle is 120 degrees," when the designer modifies the wall's position in space to a new location, the constraint engine recalculates the variables based on the constraint condition "the wall is perpendicular to the ground," updates the ground coordinates, and obtains the ground's new spatial coordinates, which are perpendicular to the wall. Similarly, if the engineer moves one side of the triangle, the constraint engine recalculates the variables based on the constraint condition "the obtuse angle is 120 degrees," updates the coordinates of the other two sides, and moves them to their corresponding positions, ensuring the original angle remains 120 degrees. This achieves dynamic changes in the triangle under the constraint conditions. This process embodies a dynamic closed loop of "geometric engine—constraint engine—geometric model."

[0004] In practical systems, achieving dynamic processing of geometric models requires combining a geometry engine, a constraint engine, or a collaboration between the two. For example, modifying the spatial location or topological relationship of a geometric model triggers the constraint engine to resolve the problem. Changes in constraints may then cause the geometry engine to reconstruct the model's shape, resulting in a new geometric model. These modifications to geometric models can trigger a chain reaction of "model modification - constraint invocation - model reconstruction." This high degree of coupling can easily lead to an unsolvable system when system complexity increases, resulting in update "infinite loops," increased performance complexity, and decreased solution efficiency.

[0005] In related technologies, to avoid situations where the constraint system has no solution, it is usually necessary to manually modify the dependencies between each constraint node or manually set the dependency depth. However, this approach requires manual analysis and troubleshooting, which cannot guarantee the timeliness of the solution and reduces the solution efficiency of the geometric model in the constraint engine.

[0006] Therefore, improving the solution efficiency of geometric models in constraint engines is an urgent problem to be solved. Summary of the Invention

[0007] To address the aforementioned technical problems, embodiments of this application provide a method, device, and product for dynamic processing of geometric models based on a constraint engine.

[0008] The technical solution adopted in this application is: a dynamic processing method for geometric models based on a constraint engine, comprising: In the constraint engine, the initial dependency information corresponding to the geometric model is obtained. The initial dependency information includes the directed dependency relationship between any two constraint nodes in the geometric model. Each constraint node in the geometric model corresponds to node data. Receive an update operation on the node data of any constraint node in the geometric model, and perform directed dependency reduction processing on the initial dependency information based on the constraint node to obtain the target dependency information; Based on the target dependency information and the updated node data of any constraint node, calculate the updated node data of other constraint nodes in the geometric model; The updated node data for each constraint node is applied to the corresponding constraint node in the geometric model to obtain the updated geometric model.

[0009] A constraint engine-based dynamic processing device for geometric models includes: The acquisition unit is used to acquire the initial dependency information corresponding to the geometric model in the constraint engine. The initial dependency information includes the directed dependency relationship between any two or more constraint nodes in the geometric model. Each constraint node in the geometric model corresponds to node data. The transceiver unit is used to receive the update operation of the node data of any constraint node in the geometric model, and to perform directed dependency reduction processing on the initial dependency information according to the constraint node to obtain the target dependency information. The calculation unit is used to calculate the updated node data of other constraint nodes in the geometric model based on the target dependency information and the updated node data of any constraint node. The processing unit is used to apply the updated node data of each constraint node to the corresponding constraint node in the geometric model to obtain the updated geometric model.

[0010] A constraint engine-based geometric model dynamic processing device includes a processor and a memory. The memory stores computer-readable instructions, which, when executed by the processor, implement the constraint engine-based geometric model dynamic processing method described above.

[0011] A computer-readable storage medium storing computer-readable instructions that, when executed by a computer's processor, cause the computer to perform the above-described constraint engine-based dynamic processing method for geometric models.

[0012] A computer program product includes computer-readable instructions that, when executed by a processor, implement the constraint engine-based dynamic processing method for geometric models as described above.

[0013] A constraint engine includes computer instructions that, when executed by a processor, implement the above-described constraint engine-based dynamic processing method for geometric models.

[0014] In the aforementioned technical solution, on the one hand, in traditional geometric model solving, cyclic dependencies between constraint nodes may lead to unsolvable constraint systems or convergence failures, thus affecting the stability and correctness of the geometric model. This application, upon receiving a data update operation for any constraint node, performs dependency reduction processing based on the initial directed dependency information to generate target dependency information free of cyclic dependencies. This target dependency information ensures that the directed dependencies between constraint nodes are unidirectional overall, avoiding solution loops formed due to mutual dependencies between constraint nodes. This prevents the problem of repeated solutions to constraint nodes leading to unsolvable constraints for some nodes, thus improving the solvability of the geometric model.

[0015] On the other hand, after obtaining the initial dependency information, there is no need to manually analyze the relationships between each constraint node. Instead, through automatic reduction processing, combined with the data changes of any modified constraint node, the updated node data of all affected constraint nodes is dynamically calculated, and the results are directly applied to the geometric model. The target dependency information obtained in this way significantly reduces redundant calculations and repeated solution operations, improves the solution efficiency of the geometric model in the constraint engine, and enhances the response speed during the dynamic processing of the geometric model.

[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings…

[0018] Figure 1 This is a schematic diagram of a directed dependency relationship of constraint nodes involved in this application.

[0019] Figure 2 This is a flowchart illustrating a method for dynamic processing of geometric models based on a constraint engine, according to an exemplary embodiment.

[0020] Figure 3 This is a schematic diagram illustrating the dependencies between various constraint nodes in a constraint engine involved in this application.

[0021] Figure 4 This is a flowchart illustrating a method for dynamic processing of geometric models based on a constraint engine, according to another exemplary embodiment.

[0022] Figure 5 This is another relationship diagram of constraint nodes involved in this application.

[0023] Figure 6 This application relates to a type of... Figure 5 A schematic diagram of the target dependency information obtained after deleting the target directed dependencies from the initial dependency information.

[0024] Figure 7 This is a schematic diagram of a tree structure constructed based on target dependency information, which is involved in this application.

[0025] Figure 8 This application relates to one of the bases. Figure 3 The example shown illustrates the target dependency information generated.

[0026] Figure 9 This is a schematic diagram of another relationship diagram involved in this application.

[0027] Figure 10 This is a block diagram illustrating a constraint engine-based dynamic processing apparatus for geometric models, according to an exemplary embodiment.

[0028] Figure 11 This is a schematic diagram of the structure of a computer system for a constraint engine-based geometric model dynamic processing device, according to an exemplary embodiment. Detailed Implementation

[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments identical to those described in this application. Rather, they are merely examples of apparatuses and methods identical to some aspects of this application as detailed in the appended claims.

[0030] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0031] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be integrated or partially integrated; therefore, the actual execution order may change depending on the specific circumstances.

[0032] It should be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0033] It should be noted that, in the specific embodiments of this application, user-related data is involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. Furthermore, the formulas involved in the embodiments of this application can be flexibly adjusted, for example, by adding or reducing corresponding parameters.

[0034] Before introducing the technical solutions of the embodiments of this application, let's first introduce the technical terms involved in the embodiments of this application.

[0035] Building Information Modeling (BIM) is a digital modeling technology that integrates a building's geometric information, physical characteristics, functional attributes, and construction process information. It is widely used in the entire lifecycle management of buildings, including design, construction, and operation and maintenance. BIM software is a professional tool for implementing BIM methods, possessing functions such as 3D modeling, parametric design, and information management. Through BIM software, users can construct building components (such as walls, floors, doors, and windows) and their relationships within a digital model, enabling visualized design and simulation of scenes. BIM technology unifies the representation of building data and provides a scalable information integration platform, which is conducive to the intelligent development of the construction industry.

[0036] A relational graph is a graph structure used to represent dependencies between multiple constraint nodes, typically modeled using a directed graph. In this graph structure, each constraint node represents a geometric vertex, edge, etc., in a geometric model. Each directed edge in the graph indicates a dependency between one constraint node and another. This dependency can be computational, meaning that solving the node data of one constraint node depends on the node data of another constraint node.

[0037] Currently, complex directed dependencies exist between constraint nodes. These dependencies can be unidirectional or bidirectional, but when faced with complex or mutually dependent constraints, situations arise where the same constraint node is solved repeatedly, and some constraints remain unsolved. For example, such as Figure 1 The diagram shown illustrates a directed dependency relationship between constraint nodes as described in this application. Figure 1 In the geometry engine, constraint node 1, constraint node 2, and constraint node 3 can refer to different geometric edges in a geometric model, for example... Figure 1In the constraint engine, constraint node 1, constraint node 2, and constraint node 3 correspond to three geometric edges in the geometric model. They have specific constraint relationships. For example, the angle between constraint node 1 and constraint node 2 is 30 degrees, and constraint node 2 and constraint node 3 are perpendicular to each other. Constraint node 1 can depend on constraint node 2, and constraint node 2 can depend on constraint node 1; that is, if the node data of constraint node 1 changes, it will affect the node data of constraint node 2, and vice versa. Similarly, constraint node 2 and constraint node 3 can also depend on each other, and their node data will affect each other's nodes. When constraint node 1 and constraint node 2 are interdependent, a change in the node data of constraint node 1 will affect the node data of constraint node 2, causing the constraint engine to re-solve the node data of constraint node 2. Then, a change in the node data of constraint node 2 will affect the node data of constraint node 1, causing the constraint engine to re-solve the node data of constraint node 1. This cycle repeats, leading to the problem of repeatedly solving the same constraint node, and potentially even causing some constraint nodes to have no solution.

[0038] In related technologies, to avoid situations where the constraint system has no solution, it is usually necessary to manually modify the dependencies between each constraint node or manually set the dependency depth. However, this approach requires manual analysis and troubleshooting, which cannot guarantee the timeliness of the solution and reduces the solution efficiency of the geometric model in the constraint engine.

[0039] Among them, dependency depth refers to the fact that the length of the dependency link must not exceed the set depth value each time node data is calculated based on dependency relationships. Figure 1 In some cases, manual analysis is required; for example, manual discovery. Figure 1 There are 3 constraint nodes, therefore, the dependency depth is set to 2. Figure 1 In this scenario, if node 1 experiences a data change, the following calculation paths for node data will occur: constraint node 1 → constraint node 2 → constraint node 3, and constraint node 1 → constraint node 2 → constraint node 1. While this reduces redundant calculations, it can still lead to redundant calculations for other constraint nodes when there are many constraint nodes.

[0040] Accordingly, embodiments of this application propose a method, apparatus, and device for dynamic processing of geometric models based on a constraint engine, a computer-readable storage medium, and a computer program product. In these embodiments, on the one hand, in traditional geometric model solving, cyclic dependencies between constraint nodes may lead to an unsolvable constraint system or convergence failure, thus affecting the stability and correctness of the geometric model. This application, upon receiving a data update operation for any constraint node, performs dependency reduction processing based on initial directed dependency information to generate target dependency information free of cyclic dependencies. This target dependency information ensures that the directed dependencies between constraint nodes are unidirectional, avoiding solution loops formed due to mutual dependencies between constraint nodes, thereby preventing the problem of repeated solving of constraint nodes leading to unsolvable constraints for some nodes and improving the solvability of the geometric model. On the other hand, after obtaining the initial dependency information, there is no need to manually analyze the relationships between each constraint node. Instead, through automatic reduction processing, combined with the data changes of any modified constraint node, the updated node data of all affected constraint nodes is dynamically calculated, and the results are directly applied to the geometric model. The target dependency information obtained in this way significantly reduces redundant calculations and repeated solution operations, improves the solution efficiency of the geometric model in the constraint engine, and enhances the response speed during the dynamic processing of the geometric model.

[0041] It should be noted that the constraint engine-based geometric model dynamic processing method in this application can be applied in computers, such as terminal devices, which can be mobile phones, tablets, laptops, handheld computers, mobile internet devices (MID), in-vehicle devices, aircraft, wearable devices (such as smartwatches, smart bracelets, pedometers, etc.), virtual reality devices (such as virtual reality (VR) devices, augmented reality (AR) devices), etc.

[0042] Please see Figure 2 , Figure 2 This is a flowchart illustrating a constraint engine-based dynamic processing method for geometric models according to an exemplary embodiment. This method can be executed by a computer. Of course, this method can also be applied to other implementation environments, and there is no limitation on the executing entity. The flowchart of the constraint engine-based dynamic processing method for geometric models of this application can be applied in 3D modeling software, such as BIM software.

[0043] The following section will use a computer as an example to elaborate on this constraint engine-based method for dynamically processing geometric models. Figure 1 As shown, in an exemplary embodiment, the method includes at least the following steps.

[0044] S210. In the constraint engine, obtain the initial dependency information corresponding to the geometric model. The initial dependency information includes the directed dependency relationship between any two or more constraint nodes in the geometric model. Each constraint node in the geometric model has corresponding node data.

[0045] It should be noted that the constraint engine and geometry engine of this application can be applied in specific 3D modeling software. The 3D modeling software provides a design interface where users can draw lines according to their needs to construct the required geometric model. The geometry engine can visualize the user-drawn geometric model in the design interface for user viewing. The constraint engine acts as a background program, managing node data for each constraint node in the user-drawn geometric model in the background. For example, it records detailed parameters corresponding to each node and performs calculations on the node data when necessary.

[0046] In the embodiments of this application, both the geometry engine and the constraint engine can contain a constraint node of the geometric model. For example, Figure 1 In the geometry engine, the geometric model contains constraint nodes 1-3, and the constraint engine also contains constraint nodes 1-3 accordingly. In the geometry engine, the various constraint nodes form the geometric model through geometric layer combinations, and the constraint engine can manage the node data of each constraint node, as well as the directed dependencies between the constraint nodes.

[0047] To facilitate unified management of the directed dependencies between constraint nodes, a relationship graph needs to be constructed to represent the dependency structure between constraint nodes, forming a relationship graph between multiple constraint nodes. The relationship graph contains the following information.

[0048] The point set (V) represents all constraint nodes with dependencies, and each constraint node is considered as a point in the relation graph.

[0049] An edge set (E) represents a directed dependency between constrained nodes, with the direction of the edge pointing from the dependent node to the dependent node.

[0050] Graph G = (V, E) represents the relational graph formed by the directed dependencies between the constraint nodes. This relational graph is a directed graph, which is the initial dependency information and contains the directed dependencies between the constraint nodes.

[0051] Weight: In some implementations, a weight can be set for each edge to represent the strength, priority, or notification level of the dependency relationship, but in the basic model, it can be set to a unified value for processing.

[0052] In the present application, the constraint engine can obtain the initial dependency information corresponding to the geometric model. The initial dependency information includes the directed dependency relationship between any two or more constraint nodes in the geometric model. Moreover, each constraint node in the geometric model corresponds to node data in the constraint engine. The node data can include features such as the coordinates, length, and curvature of the constraint node.

[0053] As Figure 3 shown is a schematic diagram of the dependency relationship between each constraint node included in a constraint engine related to the present application. There is a directed dependency relationship between these constraint nodes, and the directed dependency relationship can be represented by a dependency function, thus forming a graph class. The graph class can represent the entire relationship graph, including the point set, edge set, and dependency relationship. In Figure 3 contains two types of arrow symbols. The solid arrow is used to represent dependency, and the hollow arrow represents an inheritance relationship. The arrow direction represents the dependency direction.

[0054] In Figure 3 it can be seen that in the initial dependency information, constraint node B and constraint node C depend on constraint node A, constraint node A and constraint node D depend on constraint node C, and constraint node C depends on constraint node D. In addition, these four constraint nodes all inherit the nodes in the relationship graph.

[0055] The dependency relationship of each constraint node can be reflected in the Figure 3 node table of graph G in. Each directed dependency relationship will be in the node table, and the specific expression is as follows.

[0056] Node table (ListV): List<pair<Func, pair<dependency-constrained node: constraint node, dependent constraint node: constraint node>>>.

[0057] For example, in Figure 3 it can be seen that the arrow of constraint node B points to constraint node A, indicating that constraint node B depends on constraint node A. Then its corresponding expression in the node table is: pair<dependency-constrained node: constraint node A, dependent constraint node: constraint node B>.

[0058] In addition, in the embodiments of the present application, relevant instructions can also be used to add a constraint node (using the attach function), delete a constraint node (using the detach function), and determine whether there is a dependency between constraint node pairs (using the bool function) to the initial dependency information, as follows.

[0059] Add a constraint node: attach(Func, dependent constraint node: constraint node, dependent constraint node: constraint node).

[0060] Deleting a constraint node: detach(Func, dependent constraint node: constraint node, dependent constraint node: constraint node).

[0061] Determine if there is a dependency: bool IsRely(depending constraint node: constraint node, dependent constraint node: constraint node).

[0062] S220: Receive the update operation of node data for any constraint node in the geometric model, and perform directed dependency reduction processing on the initial dependency information based on any constraint node to obtain the target dependency information.

[0063] In this process, the update operation for the node data of any constraint node in the geometric model can be user-inputted. Users can update the node data of any constraint node in the geometric model, and this "update" includes operations such as adding, deleting, modifying, and querying node data. This update operation can be performed by the user moving, zooming in, or shrinking the position of a constraint node using the mouse; the specific update operation method is not limited in this application. Once the constraint engine detects that any node data has been updated, it will trigger the process of updating the node data of other constraint nodes.

[0064] It should be noted that in this application, the process of calculating the target dependency information needs to be carried out in an iterative manner, and each iteration will have a constraint node as the starting constraint node.

[0065] Specifically, S220 may include, for example: Figure 4 S410 to S440 are shown in detail below. Since iterative calculations are required, steps S420 to S430 will be repeated in each iteration, with a different starting constraint node in each iteration.

[0066] S410. Use any one of the constraint nodes as the starting constraint node.

[0067] Upon receiving a node data update operation from any constraint node in the geometric model, the constraint engine first identifies the updated constraint node as the starting constraint node. The starting constraint node serves as the starting point for each iteration of the computation and is used to analyze whether a closed loop exists in its dependencies with other constraint nodes.

[0068] For example, in Figure 3 In the dependency graph, if a user performs a node data update operation on constraint node A, then constraint node A is set as the starting constraint node to perform dependency detection and dependency reduction in the current iteration round.

[0069] S420. Based on the initial constraint node, detect the dependency loop formed by directed dependencies in the initial dependency information.

[0070] In the current iteration, the computer starts from the initial constraint node, uses the directed dependencies recorded in the initial dependency information to perform dependency traversal operations, sequentially finds all downstream constraint nodes that can be reached through directed paths, and records these downstream constraint nodes as at least one dependent constraint node.

[0071] In one embodiment of this application, S420 may specifically include S421 to S423.

[0072] S421. Based on the initial dependency information, find at least one subordinate constraint node that is directly or indirectly dependent on the starting constraint node.

[0073] After determining the starting constraint node, the downstream constraint nodes at that starting constraint node can be determined. The downstream constraint nodes can include "direct dependent constraint nodes" that directly depend on the starting constraint node, and "indirect dependent constraint nodes" that indirectly depend on the starting constraint node.

[0074] Specifically, constraint nodes that directly depend on the starting constraint node are identified as directly dependent constraint nodes. Alternatively, constraint nodes that directly depend on directly dependent constraint nodes are identified as indirectly dependent constraint nodes, or vice versa. Finally, based on the directly and indirectly dependent constraint nodes corresponding to the starting constraint node, at least one dependent constraint node is obtained by combining them.

[0075] For example, such as Figure 5 The diagram shown is a relational diagram corresponding to one type of initial dependency information involved in this application. Figure 5 In this context, the initial dependency information includes constraint nodes HL, where H depends on L and J, I depends on H, J depends on I, and K depends on J. If constraint node H is the initial constraint node, then I is a direct dependent constraint node of H, J directly depends on this direct dependent constraint node (I), and J is an indirect dependent constraint node of H. Furthermore, K directly depends on this indirect dependent constraint node (J), and K is also an indirect dependent constraint node of H. Thus, at least one dependent constraint node corresponding to constraint node H can be identified as constraint nodes I, J, and K.

[0076] S422. Based on the directed dependencies corresponding to the starting constraint node and at least one subordinate constraint node, detect constraint nodes that are directly or indirectly dependent on each other.

[0077] In one embodiment of this application, S422 may specifically include the following steps.

[0078] Detect the target constraint node that the starting constraint node directly depends on in at least one subordinate constraint node; If the target constraint node directly depends on the starting constraint node, then the starting constraint node and the target constraint node are directly interdependent. If the target constraint node indirectly depends on the starting constraint node, then the starting constraint node and the target constraint node are indirectly dependent on each other.

[0079] The number of target constraint nodes can be zero or one or more. That is, the starting constraint node may not depend on any other constraint node, or it may depend on one or more other constraint nodes.

[0080] For example, such as Figure 5 In the example shown, constraint node H, as the starting constraint node, depends on constraint nodes L and J. However, constraint node L is not included in at least one of the dependent constraint nodes corresponding to constraint node H, while constraint node J is included. Therefore, constraint node J can be determined as the target constraint node corresponding to the starting constraint node (constraint node H) in the current iteration round. Constraint node J is an indirectly dependent constraint node corresponding to constraint node H; therefore, constraint nodes H and J are indirectly interdependent.

[0081] S423. Dependency paths formed by directed dependencies between directly or indirectly interdependent constraint nodes are defined as dependency loops.

[0082] After determining whether the starting constraint node and the target constraint node are directly or indirectly dependent, the system can traverse along the directed dependencies between them based on the initial dependency information until it returns to the starting constraint node, forming a closed dependency path. This closed path represents a dependency loop between the starting constraint node and the target constraint node, and each directed dependency relationship contained in the dependency loop is a component of the dependency loop closure.

[0083] Specifically, computers can identify dependency loops in the following way.

[0084] Starting from the initial constraint node, traverse sequentially along the directed dependencies to the target constraint node. Then, starting from the target constraint node, continue traversing in either the forward or reverse direction along its directed dependencies until the initial constraint node is reached again.

[0085] If the first and last nodes of the traversal path are the same, and the same nodes are not repeatedly visited in the traversal path (except for the first and last nodes being the same), then all the directed dependencies in the traversal path can be recorded as a dependency loop.

[0086] For example, such as Figure 5 In the diagram shown, constraint node H is the starting constraint node, and it has been determined that it has an indirect mutual dependency with constraint node J. Therefore, based on the initial dependency information, this mutual dependency path can be constructed: starting from H, following the directed dependency H←I←J, we reach constraint node J. Then, starting from J, following the directed dependency J←I←H, we return to the starting constraint node H. Thus, the path H←I←J←H forms a dependency loop, which includes the directed dependencies H←I, I←J, and J←H.

[0087] S430. Identify the directed dependencies of the target from the dependency loop.

[0088] Specifically, in the current iteration, the directed dependency of the starting constraint node on the target constraint node is determined as the target directed dependency.

[0089] Next, after executing S430, the direct subordinate constraint node corresponding to the starting constraint node of the current iteration can be used as the new starting constraint node. Then, based on the new starting constraint node, the steps corresponding to S420 can be re-executed. That is, the dependency loop formed by detecting the directed dependency relationship contained in the initial dependency information based on the new starting constraint node is repeated until the new starting constraint node is not depended on by other constraint nodes.

[0090] S440. Remove the target's directed dependency from the initial dependency information to obtain the target dependency information.

[0091] After determining the target directed dependency, the computer removes it from the initial dependency information to eliminate dependency loops caused by the target directed dependency, thereby preventing repeated solutions between the initial constraint node and the target constraint node.

[0092] Thus, each iteration may detect a directed dependency on the target, and therefore, each iteration may remove this directed dependency from the initial dependency information. Finally, after the iteration is complete, the target dependency information can be obtained. Through this deletion operation, the resulting target dependency information no longer contains dependency loops, and therefore the dependency paths formed by the directed dependencies in the target dependency information are all unidirectional.

[0093] For example, combined Figure 5 In the example shown, after multiple iterations, the iteration process ends when constraint node K is chosen as the new starting constraint node. Ultimately, the directed dependency (H←J) between constraint node H and constraint node J is determined to be the target directed dependency, and this dependency is removed from the initial dependency information. For example... Figure 6The image shows the pair. Figure 5 This diagram illustrates the target dependency information obtained after deleting the directed dependencies of the target from the initial dependency information. After deletion, the original path H←I←J←H will no longer form a closed loop.

[0094] Optionally, for other constraint nodes that do not depend on the constraint nodes participating in the iteration, their directed dependencies can also be removed from the initial dependency information, because user update operations on the aforementioned "any constraint node" will not affect its node data. For example, in Figure 6 Since constraint node L does not depend on the constraint node (constraint node HK) participating in the iteration, it can also be deleted. This is because user updates to constraint node H's data will not affect constraint node L's data. This reduces redundant information in the target dependency information and improves information simplicity.

[0095] S230. Based on the target dependency information and the updated node data of any constraint node, calculate the updated node data of other constraint nodes in the geometric model.

[0096] Upon receiving an update operation for the node data of any constraint node in the geometric model, the constraint engine can immediately calculate the updated node data corresponding to that constraint node. Then, based on the updated node data of that constraint node, it calculates the updated node data for the other constraint nodes.

[0097] In one embodiment of this application, S230 may specifically include the following steps.

[0098] Generate a tree structure based on the target dependency information, with any constraint node as the root node. Convert the tree structure into a system of constraint equations; Using the constraint equations and the updated node data of any constraint node, we can compute the updated node data of other constraint nodes in the computational geometry model.

[0099] First, using any given constraint node as the root node, construct a tree structure based on the target dependency information. During construction, constraint nodes that are directly or indirectly dependent on the root node in the target dependency information are included in the tree structure, with parent-child relationships arranged according to the "dependency direction". When constraint node B depends on A (denoted as A←B), B is a child node of A. Because the target dependency information no longer has dependency loops, this tree structure is unidirectional.

[0100] Next, the tree structure is converted into a system of constraint equations. In this tree structure, each edge corresponds to a constraint function, which links the geometric parameters (such as coordinates, length, angle, curvature, etc.) between the dependent and dependent nodes. The constraint engine can summarize these constraint functions into a system of equations according to the tree structure. If a child node depends on only a single parent node, the child node can be directly calculated using the known data of the parent node, node by node in topological order from top to bottom. If a child node may be constrained by multiple parent nodes simultaneously, these constraints need to be solved by combining them into a system of equations.

[0101] Finally, the constraint equations are solved to obtain the updated node data for all constraint nodes in the geometric model except for the given constraint node. Specifically, the updated node data consists of the geometric parameters obtained after solving the constraint equations, which describe the changes in constraints acting on the geometric model. This allows the constraint engine to obtain the updated node data for each constraint node in the geometric model.

[0102] For example, combined Figure 5 In the relationship diagram, constraint node H is the object that is updated by the user, such as... Figure 7 The diagram shown illustrates a tree structure constructed based on target dependency information, as described in this application. Computers can construct such structures within a constraint engine. Figure 7 The tree structure shown is HIJK. The constraint engine first calculates I using the new data of H (because I depends on H), then calculates J using the result of I, and then calculates K using the result of J.

[0103] Optionally, after each iteration is completed, the new node data can be immediately written back to the geometry engine to update the display of the geometric model. If a situation arises where multiple parent node constraints need to be satisfied simultaneously at a certain layer, the equations at that layer are summarized and solved jointly. After the solution is completed, the updated node data for other constraint nodes is calculated.

[0104] S240. Apply the updated node data of each constraint node to the corresponding constraint node in the geometric model to obtain the updated geometric model.

[0105] Specifically, the computer can sequentially traverse each constraint node and synchronize the updated node data of that node obtained in S230 with the geometric attributes of the corresponding primitive in the geometric model. For example, when the updated node data of a constraint node contains new parameters such as vertex coordinates, side lengths, and curvature values, the geometry engine will use these new parameters to replace the original parameters, thereby directly driving the primitive to change its shape or position.

[0106] Optionally, during the application of node data, the geometry engine can also trigger a series of post-processing operations, such as refreshing auxiliary construction lines that depend on the primitive, updating annotation information, and recalculating the view extent, so as to ensure that the updated geometric model is visually and logically consistent and up-to-date.

[0107] For example, combined Figure 7 As shown in the tree structure, after the updated node data of the four constraint nodes H, I, J, and K are calculated in S230, process S240 involves applying the new data of H, I, J, and K sequentially to the corresponding nodes in the geometry engine. In this way, the primitives H, I, J, and K in the geometry engine will be adjusted according to the latest parameters, and the final effect will be immediately reflected in the model, resulting in the updated geometric model.

[0108] Please see Figure 8 , Figure 8 This application relates to one of the bases. Figure 3 The example shown illustrates the target dependency information generated. Figure 8 In this model, assuming constraint node A is the constraint node that receives the update operation of node data, after all dependency loops in constraint node AD are processed, the target dependency information is represented as: constraint node B → constraint node A ← constraint node C ← constraint node D. Then, based on this target dependency relationship, the computer calculates the updated node data corresponding to each constraint node, and applies it to the corresponding constraint nodes in the geometric model to obtain the updated geometric model.

[0109] In 3D modeling software, users can easily modify node data such as the position or shape of any constraint node in the geometric model through simple operations, such as dragging nodes and adjusting parameters. By implementing a constraint engine to quickly calculate the updated node data for each constraint node and apply it to the geometric model, rapid response of the geometric model is achieved. Furthermore, the method in this application is highly automated and intelligent, automatically identifying and handling dependencies between constraint nodes, significantly reducing the complexity and time cost of manual operations. Simultaneously, due to the use of real-time rendering technology, users can instantly see the changes in the geometric model during operation, allowing for more intuitive design and adjustments, providing users with a more efficient and convenient 3D modeling experience.

[0110] This method addresses the issue that, in traditional geometric model solving, cyclic dependencies between constraint nodes can lead to unsolvable constraints or convergence failures, thus affecting the stability and correctness of the geometric model. Upon receiving a data update operation for any constraint node, this application performs dependency reduction processing based on the initial directed dependency information to generate target dependency information free of cyclic dependencies. This target dependency information ensures that the directed dependencies between constraint nodes are unidirectional, avoiding solution loops formed by mutual dependencies between constraint nodes. This prevents repeated solving of constraint nodes, which can lead to unsolvable constraints for some nodes, thus improving the solvability of the geometric model.

[0111] On the other hand, after obtaining the initial dependency information, there is no need to manually analyze the relationships between each constraint node. Instead, through automatic reduction processing, combined with the data changes of any modified constraint node, the updated node data of all affected constraint nodes is dynamically calculated, and the results are directly applied to the geometric model. The target dependency information obtained in this way significantly reduces redundant calculations and repeated solution operations, improves the solution efficiency of the geometric model in the constraint engine, and enhances the response speed during the dynamic processing of the geometric model.

[0112] The following describes a dynamic processing algorithm for geometric models based on a constraint engine provided in this application.

[0113] In this application, the constraint engine can obtain the initial dependency information corresponding to the geometric model, which includes the directed dependency relationship between any two constraint nodes in the geometric model. After the initial dependency information is established, the computer can construct an adjacency matrix to represent the directed dependency relationship between multiple constraint nodes. The adjacency matrix is ​​a two-dimensional matrix representation of the initial dependency information, used to indicate whether there is a dependent edge between nodes. The elements in the adjacency matrix are Boolean values, indicating whether there is a dependency relationship between two nodes.

[0114] Specifically, the computer can obtain the node table corresponding to the initial dependency information and extract each constraint node pair from the node table: pair<dependent constraint node: constraint node, dependent constraint node: constraint node>. Furthermore, each constraint node has its own node index. For example, in... Figure 3 In the configuration, you can set the various constraint nodes and their node numbers as shown in Table 1:

[0115] Next, obtain an adjacency matrix L with diagonal zeros. Using the node indices of the dependent and dependent nodes in the node table, determine the node pair (x, y) and set... For example, in Figure 3In the adjacency matrix, constraint node B (node ​​number 2) and constraint node C (node ​​number 3) depend on constraint node A (node ​​number 1). Therefore, in the adjacency matrix... If constraint node A and constraint node D depend on constraint node C, then... If the geometric data symbols depend on the constraint node D, then... Thus, the following adjacency matrix L can be calculated.

[0116]

[0117] The adjacency matrix L represents the directed dependencies between the four constraint nodes. Furthermore, the dimension of the adjacency matrix is ​​the same as the number of constraint nodes in the graph (denoted as n, where n is a positive integer greater than 0). That is, the dimension of the adjacency matrix is ​​n×n.

[0118] For example, such as Figure 9 The diagram shown is a schematic representation of another relationship involved in this application. Figure 9 Given three nodes E, F, and G, where E has node number 1, F has node number 2, and G has node number 3, E and F are interdependent, and F and G are interdependent. The following adjacency matrix can then be obtained.

[0119]

[0120] Next, the algorithm can iterate through the initial dependency information multiple times to calculate the target dependency information.

[0121] For ease of explanation, in this application, the iteration number corresponding to each iteration round is denoted as m (m is a positive integer greater than or equal to zero). In the m-th iteration round, the computer detects the dependency loops corresponding to the current initial constraint node. A dependency loop detection matrix can be used to detect these loops. The dependency loop detection matrix can detect the dependency loops corresponding to the m-th iteration round. Each dependency loop is formed by the direct or indirect mutual dependence between the initial constraint node and the target constraint node. To eliminate dependency loops, the directed dependency relationship between the initial constraint node and the target constraint node needs to be defined as a target directed dependency relationship. The computer can record the target directed dependencies detected in this m-th iteration round.

[0122] Optionally, the computer can record only the target directed dependencies corresponding to each iteration in each iteration round, and then delete the target directed dependencies of each iteration round after the final iteration is completed to obtain the target dependency information.

[0123] Optionally, the computer can also directly delete the target directed dependency in each iteration to obtain the dependency matrix for that iteration. The dependency matrix obtained in the last iteration can then be used as the target dependency information. It should be noted that, in this embodiment, the geometric model dynamic processing algorithm based on the constraint engine is described according to this processing method.

[0124] After the m-th iteration, the computer records the constraint nodes that have been used as starting constraint nodes, and then uses these constraint nodes as trigger constraint nodes. For ease of explanation, this application denotes the dependency matrix corresponding to the m-th iteration as follows: The set of trigger constraint nodes corresponding to the m-th iteration is denoted as . The initial dependency matrix corresponding to the m-th iteration is the dependency matrix corresponding to the previous iteration, i.e., The set of trigger constraint nodes in the previous iteration round is When m=0, that is, before the iteration begins, the dependency matrix... That is, the adjacency matrix L. This includes any constraint node that has received an update operation on node data. Furthermore, As the number of iterations increases, new constraint nodes will be continuously added as trigger constraint nodes. middle.

[0125] In this embodiment, the dependency loop closure detection matrix corresponding to the m-th iteration is denoted as... ,in, .

[0126] For example, in such Figure 9 In the example of constraint nodes E, F, and G shown, the dependency loop closure detection matrix corresponding to the first iteration round... .

[0127] current The trigger constraint nodes contained therein have corresponding node numbers. Based on these node numbers, one can... Select the diagonal element value corresponding to the same index as the current node on the diagonal and add it to the diagonal element value set corresponding to the m-th iteration, denoted as . The "D" in this context stands for Diagonal. Here, the diagonal refers to the line running from the top left corner to the bottom right corner of the matrix, with elements on this diagonal numbered from 1 to n from left to right.

[0128] For example, in the example of constraint nodes E, F, and G shown above, if the current It contains a constraint node E, where the node index of E is 1, and the dependency loop closure detection matrix corresponds to the first iteration round. If the elements on the diagonal are 0, 0, 0, then we can... Select the first diagonal element, which is 0, and add 0 to it. middle.

[0129] Optionally, since only [the following] is used in the calculation process... The elements on the diagonal, therefore, to further conserve computing resources, only need to be calculated. The element values ​​corresponding to the elements on the diagonal. The values ​​of the remaining elements do not need to be calculated.

[0130] After obtaining the set of diagonal element values ​​corresponding to the current iteration round, the initial dependency matrix is ​​updated based on the non-zero diagonal element values ​​in the set, resulting in the dependency matrix. Specifically, this may include: obtaining the node index corresponding to the non-zero diagonal element value; determining the node index based on at least one exponentiation result. The first exponent of the diagonal node with a non-zero value is the result of the first exponentiation operation. This first exponentiation result is then subtracted by one to obtain the target exponentiation for the current iteration. From the exponentiation result of this target exponentiation in the initial dependency matrix, the row vector of the node with the first value is obtained, as well as the column vector of the node with the first value in the initial dependency matrix. The element indices corresponding to elements that are non-zero in both the column and row vectors are detected. Based on these node indices and element indices, the corresponding element values ​​in the initial dependency matrix are modified to zero to obtain the dependency matrix.

[0131] in, It contains at least one diagonal element value. Select the non-zero diagonal element value and determine its corresponding node index (denoted as i). This node index i is determined previously based on... from This is used when selecting diagonal element values. Therefore, this step can be started from... It was determined in The index of the constraint node that is not zero among the diagonal elements on the diagonal is used as the node index.

[0132] After determining the node indices corresponding to the non-zero diagonal element values, it is necessary to obtain the composition at this point. The initial dependency matrix corresponds to at least one exponentiation result matrix, that is... , ... At this point, it is necessary to... , ... Arranged in ascending order of power as follows: , ... , Next, following the ascending order of exponentiation, we find the first exponentiation result matrix whose i-th diagonal element is non-zero. Let k be the exponentiation of this first exponentiation result matrix. Then, this first exponentiation result matrix is... The following conditions are met: k=1, ..., m. Where, It means The node in the array corresponds to the node index i. In this way, the target power can be obtained. .

[0133] Next, in Obtain the row vector of the i-th row (denoted as ). ), and, in Obtain the column vector of the i-th column (denoted as ). Then, detect the element index (denoted as j) of the non-zero element in both the column vector and the row vector. Next, a sequence pair can be generated based on the node index (i) and the element index (j). ,Will The first in By modifying the value of each element to zero, you can obtain... .

[0134] After modifying the corresponding element values ​​in the initial dependency matrix to zero based on the node index and element index, and obtaining the dependency matrix, the set of trigger constraint nodes corresponding to the m-th iteration can also be generated. The method specifically includes: obtaining a column vector from the dependency matrix based on the node index corresponding to each trigger constraint node in the trigger constraint node set of the previous iteration; recording the node index that is the same as the element index corresponding to the non-zero element from the column vector obtained from the dependency matrix, and adding the constraint node corresponding to the recorded node index as a new trigger constraint node to the trigger constraint node set of the previous iteration, thereby obtaining the trigger constraint node set corresponding to the current iteration.

[0135] In other words, the computer needs to be based on The node index (i) corresponding to each trigger constraint node contained in the dependency matrix Obtain the column vector of the i-th column and record the element indices of the non-zero elements. Record these indices as node indices (the node indices here are not equal to i). Then, based on these recorded node indices, determine the constraint nodes. These constraint nodes will then be added as new trigger constraint nodes. In the middle, thus forming .

[0136] The dependency matrix for each iteration can be calculated using the above calculations. If the current m equals the number of nodes (n) at those multiple time points, i.e., m = n, then at this time... It can be used as the target dependency matrix Based on this target dependency matrix, the target dependency information can be determined.

[0137] It should be noted that, in this embodiment of the application, if the formula used for relying on the closed-loop detection matrix is... When m=1, Usually not to The modification occurs, that is, To improve computational efficiency, you can set... The value of m ranges from 1 to n-1, and the value of k ranges from 1 to m+1. This allows us to skip... Not This results in modified, redundant computational steps. Ultimately, the same target dependency matrix can still be obtained.

[0138] For ease of understanding, the following description uses the aforementioned constraint nodes E, G, and F as examples to illustrate the process of the constraint engine-based dynamic processing algorithm for geometric models.

[0139] Constraint nodes E, F, and G, where E has node number 1, F has node number 2, and G has node number 3. E and F are interdependent, and F and G are interdependent. E is the constraint node that receives update operations from node data. The computer can determine the following adjacency matrix based on this information.

[0140]

[0141] First, let m=1 to enter the first iteration round. At this point... ,calculate At this time That is, the current E is used as the starting constraint node. Next, using... Each constraint node, i.e., node number 1 corresponding to E, in From the multiple diagonal element values, select the first diagonal element value of 0 to obtain... Because at this time The matrix does not contain non-zero values; therefore, the dependency matrix for the first iteration round is... Adjacency Matrix same, , Then you can directly increment m by one.

[0142] When m=2, the second iteration round begins. At this point, the set of trigger constraint nodes from the previous iteration round is... The initial dependency matrix is .

[0143] Calculate the dependency loop closure detection matrix at this point. = . The node number of constraint node E is 1, therefore, we obtain... diagonal elements The first diagonal element in the array is 1, which gives us the value 1. .at this time The diagonal element value 1 is non-zero. Therefore, it is necessary to determine which constraint node's node index selected this diagonal element value 1. At this point, it can be determined that the diagonal element value 1 was selected by constraint node E. Therefore, it is necessary to obtain the node index 1 of constraint node E to determine... Then, in and In the middle, determine the first diagonal line. The matrix resulting from the first exponentiation operation with non-zero elements. Observation reveals that... In the middle, the first on the diagonal The element has a value of 0, which does not meet the condition. In the middle, the first on the diagonal The element's value is 1, which satisfies the condition. Therefore, it can be determined that... Target power In this way, it is possible to... In the middle, obtain the first row vector ,exist In the middle, obtain the first column vectors .

[0144] It can be found that, and In the middle, the second element is always non-zero, so it can be recorded At this point, sequence pairs can be formed. ,Will The first in By modifying the value of each element to zero, you can obtain... .

[0145] According to this time , can be Update and get Specifically, it can be based on In the diagram, the node number of E ,exist Get the first column vectors In this column vector, the element index corresponding to the non-zero element is recorded as 2. Therefore, the node with index 2 is identified as F. Thus, node F can be added as a new trigger constraint node. In the middle, we get Next, we can directly increment m by one.

[0146] When m=3, the third iteration begins. At this point, the set of trigger constraint nodes from the previous iteration is... The initial dependency matrix is .

[0147] Calculate the dependency loop closure detection matrix at this point. . The node numbers of constraint nodes E and F are 1 and 2 respectively. Therefore, to obtain... diagonal elements The first and second diagonal elements in the array are 0 and 1, respectively, to obtain... .at this time There is a non-zero diagonal element value of 1, which was selected by constraint node F. Therefore, we need to obtain the node index 2 of constraint node F to determine... Then, in , , In the middle, determine the first diagonal line. The matrix resulting from the first exponentiation operation with non-zero elements. Observation reveals that... In the middle, the first on the diagonal The element has a value of 0, which does not meet the condition. In the middle, the first on the diagonal The element with a value of 1 satisfies the condition. Therefore, it can be determined that... Target power In this way, it is possible to... In the middle, obtain the first row vector ,exist In the middle, obtain the first column vectors .

[0148] It can be found that, and In the middle, the third element is non-zero, so it can be recorded At this point, sequence pairs can be formed. ,Will The first in By modifying the value of each element to zero, you can obtain... .

[0149] Since m=3=n at this point, the target dependency matrix is... Now that the target dependency matrix is ​​obtained, there is no need to calculate it again. .

[0150] Using the methods described above, we can calculate... Figure 9 The objective dependency matrix between E, F, and G is calculated. Based on this matrix, we know that F depends on E, and G depends on F. Therefore, the objective dependency information is: E←F←G. Next, based on this objective dependency information and the updated node data of constraint node E, the updated node data of F and G in the corresponding geometric model are calculated. Finally, the updated node data of E, F, and G are applied to their respective constraint nodes in the geometric model to complete the update of the geometric model, resulting in the updated geometric model.

[0151] Figure 10 This is a block diagram illustrating a constraint engine-based dynamic processing apparatus for geometric models, as shown in one embodiment of this application. Figure 10 As shown, this constraint engine-based geometric model dynamic processing device can be applied to a computer, and the device includes...

[0152] A constraint engine-based dynamic processing device for geometric models includes: The acquisition unit 1010 is used to acquire the initial dependency information corresponding to the geometric model in the constraint engine. The initial dependency information includes the directed dependency relationship between any two or more constraint nodes in the geometric model. Each constraint node in the geometric model has corresponding node data. The transceiver unit 1020 is used to receive the update operation of the node data of any constraint node in the geometric model, and to perform directed dependency reduction processing on the initial dependency information according to any constraint node to obtain the target dependency information. The calculation unit 1030 is used to calculate the updated node data of other constraint nodes in the geometric model based on the target dependency information and the updated node data of any constraint node. The processing unit 1040 is used to apply the updated node data of each constraint node to the corresponding constraint node in the geometric model to obtain the updated geometric model.

[0153] In one embodiment of this application, according to the aforementioned scheme, the processing unit 1040 is further configured to: use any constraint node as the starting constraint node; detect the dependency loop formed by the directed dependency relationship in the initial dependency information based on the starting constraint node; determine the target directed dependency relationship from the dependency loop; and delete the target directed dependency relationship from the initial dependency information to obtain the target dependency information.

[0154] In one embodiment of this application, according to the foregoing scheme, the processing unit 1040 is further configured to: find at least one subordinate constraint node that is directly and indirectly dependent on the starting constraint node based on the initial dependency information; detect constraint nodes that are directly or indirectly dependent on each other based on the directed dependency relationships corresponding to the starting constraint node and at least one subordinate constraint node; and determine the dependency path formed by the directed dependency relationships between the directly or indirectly dependent constraint nodes as a dependency loop.

[0155] In one embodiment of this application, according to the aforementioned scheme, the processing unit 1040 is further configured to determine the constraint node that directly depends on the starting constraint node as a direct subordinate constraint node; determine the constraint node that directly depends on the direct subordinate constraint node as an indirect subordinate constraint node, or determine the constraint node that directly depends on the indirect subordinate constraint node as an indirect subordinate constraint node; and combine the direct subordinate constraint node and the indirect subordinate constraint node corresponding to the starting constraint node to obtain at least one subordinate constraint node.

[0156] In one embodiment of this application, according to the foregoing scheme, the processing unit 1040 is further configured to detect the target constraint node that the starting constraint node directly depends on in at least one subordinate constraint node; if the target constraint node directly depends on the starting constraint node, then it is determined that the starting constraint node and the target constraint node are directly mutually dependent; if the target constraint node indirectly depends on the starting constraint node, then it is determined that the starting constraint node and the target constraint node are indirectly mutually dependent; and the directed dependency relationship of the starting constraint node depending on the target constraint node is determined as the target directed dependency relationship.

[0157] In one embodiment of this application, according to the aforementioned scheme, the processing unit 1040 is further configured to, after determining the target directed dependency relationship from the dependency loop, take the direct subordinate constraint node corresponding to the starting constraint node as the new starting constraint node; repeatedly execute the process of detecting the dependency loop formed by the directed dependency relationship contained in the initial dependency information based on the new starting constraint node, until the new starting constraint node is not depended on by other constraint nodes.

[0158] In one embodiment of this application, according to the foregoing scheme, the processing unit 1040 is further configured to generate a tree structure based on the target dependency information with any constraint node as the root node; and convert the tree structure into a set of constraint equations; the calculation unit 1030 is further configured to calculate the updated node data corresponding to other constraint nodes in the geometric model using the set of constraint equations and the updated node data of any constraint node.

[0159] Figure 11 This is a schematic diagram of the structure of a computer system suitable for implementing the constraint engine-based geometric model dynamic processing device of the embodiments of this application.

[0160] It should be noted that, Figure 11 The computer system 1100 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0161] like Figure 11 As shown, the computer system 1100 includes a Central Processing Unit (CPU) 1101, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1102 or programs loaded from storage portion 1108 into Random Access Memory (RAM) 1103. Various programs and data required for system operation are also stored in RAM 1103. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. An Input / Output (I / O) interface 1105 is also connected to bus 1104.

[0162] The following components are connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1110, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1110 as needed so that computer programs read from them can be installed into storage section 1108 as needed.

[0163] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1110. When the computer program is executed by central processing unit (CPU) 1101, it performs various functions defined in the system of this application.

[0164] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. For example, a computer-readable medium can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such a dependent data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signaling media can also be any computer-readable medium other than computer-readable storage media, which can send, rely on, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device. Computer programs contained on a computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0166] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0167] Another aspect of this application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned constraint engine-based dynamic processing method for geometric models. This computer-readable medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into that electronic device.

[0168] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable medium. A processor of a computer device reads the computer instructions from the computer-readable medium and executes the computer instructions, causing the computer device to perform the constraint engine-based geometric model dynamic processing method provided in the various embodiments described above.

[0169] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. A method for dynamic processing of geometric models based on a constraint engine, characterized in that, include: In the constraint engine, the initial dependency information corresponding to the geometric model is obtained. The initial dependency information includes the directed dependency relationship between any two or more constraint nodes in the geometric model. Each constraint node in the geometric model corresponds to node data. Receive an update operation on the node data of any constraint node in the geometric model, and perform directed dependency reduction processing on the initial dependency information based on the constraint node to obtain the target dependency information; Based on the target dependency information and the updated node data of any constraint node, calculate the updated node data of other constraint nodes in the geometric model; The updated node data for each constraint node is applied to the corresponding constraint node in the geometric model to obtain the updated geometric model.

2. The method according to claim 1, characterized in that, The step of reducing the directed dependencies of the initial dependency information based on any of the constraint nodes to obtain the target dependency information includes: Take any of the constraint nodes as the starting constraint node; Based on the initial constraint node, detect the dependency loop formed by the directed dependency relationship in the initial dependency information; The directed dependencies of the target are determined from the dependency loop; The target-directed dependency is removed from the initial dependency information to obtain the target dependency information.

3. The method according to claim 2, characterized in that, The step of detecting the dependency loop formed by the directed dependencies contained in the initial dependency information based on the initial constraint node includes: Based on the initial dependency information, find at least one subordinate constraint node that is directly or indirectly dependent on the starting constraint node; Based on the directed dependency relationships corresponding to the starting constraint node and the at least one subordinate constraint node, detect constraint nodes that are directly or indirectly dependent on each other. The dependency path formed by the directed dependency relationship between the directly or indirectly interdependent constraint nodes is determined as the dependency loop.

4. The method according to claim 3, characterized in that, The step of finding at least one dependent constraint node that is directly and indirectly dependent on the starting constraint node based on the initial dependency information includes: Constraint nodes that directly depend on the starting constraint node are identified as directly dependent constraint nodes. A constraint node that directly depends on the direct subordinate constraint node is determined as an indirect subordinate constraint node, or a constraint node that directly depends on the indirect subordinate constraint node is determined as the indirect subordinate constraint node. The at least one subordinate constraint node is obtained by combining the direct and indirect subordinate constraint nodes corresponding to the starting constraint node.

5. The method according to claim 3, characterized in that, The step of detecting directly or indirectly dependent constraint nodes based on the directed dependency relationships corresponding to the starting constraint node and the at least one subordinate constraint node includes: Detect the target constraint node that the starting constraint node directly depends on in the at least one subordinate constraint node; If the target constraint node directly depends on the starting constraint node, then it is determined that the starting constraint node and the target constraint node are directly interdependent. If the target constraint node indirectly depends on the starting constraint node, then it is determined that the starting constraint node and the target constraint node are indirectly mutually dependent. Determining the target directed dependency from the dependency loop includes: The directed dependency of the starting constraint node on the target constraint node is determined as the target directed dependency.

6. The method according to claim 4, characterized in that, After determining the target directed dependency from the dependency loop, the method further includes: The direct subordinate constraint node corresponding to the starting constraint node is taken as the new starting constraint node; Repeatedly execute the process of detecting the dependency loop formed by the directed dependencies contained in the initial dependency information based on the new starting constraint node, until the new starting constraint node is no longer depended on by other constraint nodes.

7. The method according to claim 1, characterized in that, The step of calculating the updated node data for other constraint nodes in the geometric model based on the target dependency information and the updated node data of any constraint node includes: A tree structure is generated based on the target dependency information, with any of the constraint nodes as the root node. The tree structure is converted into a system of constraint equations; Using the set of constraint equations and the updated node data of any constraint node, calculate the updated node data of other constraint nodes in the geometric model.

8. A geometric model dynamic processing device based on a constraint engine, characterized in that, include: Memory, which stores computer-readable instructions; The processor reads computer-readable instructions stored in memory to execute the constraint engine-based dynamic processing method for geometric models as described in any one of claims 1 to 7.

9. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the dynamic processing method for geometric models based on a constraint engine as described in any one of claims 1 to 7.

10. A constraint engine, characterized in that, It includes computer instructions that, when executed by a processor, implement the constraint engine-based dynamic processing method for geometric models as described in any one of claims 1 to 7.