CN-122023643-A - Geometric model modeling method and device based on directed acyclic graph and electronic equipment
Abstract
The application relates to the field of computer graphics and discloses a geometric model modeling method based on a directed acyclic graph, which comprises the steps of constructing constraint dependency according to a constructed hierarchical tree; acquiring a current parameter list, and constructing a directed acyclic graph according to the parameter list and the constraint dependency relationship; and performing constraint calculation on the directed acyclic graph to obtain a geometric model. The method is characterized in that a constraint network is forced to be a directed acyclic graph, and a conflict-free solving sequence is generated through topological ordering. The solving failure can be avoided, manual intervention is not needed, and the stability and efficiency of solving are improved. The application also discloses a geometric model modeling device and electronic equipment based on the directed acyclic graph.
Inventors
- ZHOU JIA
- Fu Tengda
- ZHANG CHAOFENG
- ZHANG DONGYAN
- TAO HAIFENG
Assignees
- 青岛海尔科技有限公司
- 海尔优家智能科技(北京)有限公司
- 海尔智家股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251225
Claims (10)
- 1. A geometric model modeling method based on a directed acyclic graph, comprising: Constructing constraint dependency relationships according to the constructed hierarchical tree; acquiring a current parameter list, and constructing a directed acyclic graph according to the parameter list and the constraint dependency relationship; and performing constraint calculation on the directed acyclic graph to obtain a geometric model.
- 2. The geometric model modeling method of claim 1, wherein constructing constraint dependencies from the constructed hierarchical tree comprises: creating a basic cabinet body and initializing the basic cabinet body; creating a hierarchical tree according to the initialized cabinet body; and constructing constraint dependency relationships according to the hierarchical tree.
- 3. The geometric model modeling method of claim 1, wherein obtaining a current parameter list and constructing a directed acyclic graph according to the parameter list and constraint dependencies comprises: acquiring a current parameter list; Taking a node corresponding to each parameter in the parameter list as an upstream diffusion starting point; according to the constraint dependency relationship, a node which can be connected with an upstream diffusion starting point is obtained and used as a downstream node; And establishing edges of the upstream diffusion starting point and the downstream node to obtain the directed acyclic graph.
- 4. The geometric model modeling method according to claim 1, wherein performing constraint calculation on the directed acyclic graph to obtain the geometric model comprises: performing topological sorting on the directed acyclic graph, and traversing all nodes in the directed acyclic graph in turn; after traversing all nodes in the directed acyclic graph, judging whether downstream nodes exist in the directed acyclic graph; In the event that there is no downstream node in the directed acyclic graph and a new parameter is generated, adding the new parameter to the list of parameters; And under the condition that no downstream node exists in the directed acyclic graph and no new parameter is generated, judging that constraint calculation is completed, and obtaining the obtained geometric model.
- 5. The geometric model modeling method of claim 4, further comprising: Judging whether the current node is a component or not under the condition that a downstream node exists in the directed acyclic graph; Writing parent container size information of the current node into the component attribute and adding parameters of the component into a parameter list under the condition that the current node is the component; And under the condition that the current node is not a component, writing the result of the current constraint calculation into the node attribute, and re-judging whether a downstream node exists in the directed acyclic graph.
- 6. The geometric model modeling method of claim 5, further comprising: writing the current constraint calculation result into the node attribute, and acquiring a parameterized object generated in the constraint calculation process; adding parameters of the parameterized object to a list of parameters; the hierarchical tree and constraint dependencies are updated based on the parameterized object.
- 7. A geometric model modeling method according to any of claims 1 to 6, further comprising: Backtracking the propagation path of the directed acyclic graph when constraint conflict occurs in the constraint calculation process; determining a collision source according to the propagation path to determine a collision path; and analyzing the nodes and edges of the conflict paths, and determining unreasonable constraint conditions.
- 8. A geometric model modeling apparatus based on a directed acyclic graph, comprising: the dependency relationship construction module is configured to construct constraint dependency relationships according to the constructed hierarchical tree; The directed acyclic graph construction module is configured to acquire a current parameter list and construct a directed acyclic graph according to the parameter list and the constraint dependency relationship; And the constraint calculation module is configured to perform constraint calculation on the directed acyclic graph to obtain a geometric model.
- 9. A directed acyclic graph-based geometric model modeling apparatus comprising a processor and a memory storing program instructions, wherein the processor is configured to perform the directed acyclic graph-based geometric model modeling method of any one of claims 1-7 when the program instructions are executed.
- 10. An electronic device, comprising: An electronic device body; the directed acyclic graph-based geometric model modeling apparatus of claim 8 or 9, mounted to the electronic device body.
Description
Geometric model modeling method and device based on directed acyclic graph and electronic equipment Technical Field The application relates to the field of computer graphics, in particular to a geometric model modeling method and device based on a directed acyclic graph and electronic equipment. Background The parametric modeling is a method for defining a geometric model through parameters and constraint relations, and is widely applied to the fields of computer aided design, computer aided engineering, industrial design, building information models and the like. The core idea is to relate the geometric shape of the model to a group of adjustable parameters (such as size, angle, position and the like) and constraint relations (such as parallelism, verticality, symmetry and the like) among the parameters, and the models with different configurations can be quickly generated by modifying the parameters. However, as model complexity increases, constrained relationships between parameters may form complex nonlinear dependent networks, resulting in inefficient or even irresolvable solutions, especially when cyclic dependency or conflict constraints exist. For parametric modeling, related art discloses a parametric modeling based on a history tree, which includes constructing a modeling history tree by recording user operation steps (e.g. stretching, rotation, etc.), each of which depends on the result of the previous step, to form an implicit sequential dependency. In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art: the related art does not force constraint relationships to be loop-free topologies, allowing users to freely add arbitrary constraints. When the constraint relation forms a closed loop, the system cannot solve parameters through the unidirectional dependent chain, manual intervention is needed or redundant equations are introduced, and solving failure or manual intervention is possibly caused. It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the application and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art. Disclosure of Invention The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows. The embodiment of the disclosure provides a geometric model modeling method and device based on a directed acyclic graph, and electronic equipment, wherein solving efficiency can be improved in the parameterized modeling process. In some embodiments, the geometric model modeling method based on the directed acyclic graph comprises the steps of constructing constraint dependency relations according to constructed hierarchical trees, obtaining a current parameter list, constructing the directed acyclic graph according to the parameter list and the constraint dependency relations, and carrying out constraint calculation on the directed acyclic graph to obtain a geometric model. Optionally, constructing constraint dependency according to the constructed hierarchical tree, wherein the constraint dependency comprises the steps of creating a basic cabinet body, initializing the basic cabinet body, creating the hierarchical tree according to the initialized cabinet body, and constructing the constraint dependency according to the hierarchical tree. The method comprises the steps of obtaining a current parameter list, obtaining nodes corresponding to each parameter in the parameter list as an upstream diffusion starting point, obtaining nodes capable of being connected with the upstream diffusion starting point as downstream nodes according to constraint dependency, and building edges of the upstream diffusion starting point and the downstream nodes to obtain the directed acyclic graph. The method comprises the steps of carrying out constraint calculation on a directed acyclic graph to obtain a geometric model, wherein the method comprises the steps of carrying out topological sorting on the directed acyclic graph, traversing all nodes in the directed acyclic graph in sequence, judging whether a downstream node exists in the directed acyclic graph after traversing all nodes in the directed acyclic graph, adding new parameters to a parameter list under the condition that the downstream node does not exist in the directed acyclic graph and new parameters are generated, and judging that constraint calculation is completed under the condition that the downstream node does not exist in the directed acyclic graph and the new parameters are not generated, so that the geometric model