Geometric model modeling method and device based on directed acyclic graph, and electronic equipment
By constructing a geometric modeling method based on a directed acyclic graph, the problem of low solution efficiency caused by nonlinear dependent networks in parametric modeling is solved, achieving a stable and efficient solution process and avoiding circular dependencies and redundant calculations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGDAO HAIER TECH
- Filing Date
- 2025-12-25
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for parametric modeling suffer from low efficiency or even failure to solve problems due to the complex nonlinear dependency networks formed by constraint relationships. This is especially true when there are cyclic dependencies or conflicting constraints, which require manual intervention or the introduction of redundant equations, potentially leading to solution failure.
A geometric modeling method based on directed acyclic graphs is adopted. By constructing a hierarchical tree and constraint dependencies, a parameter list is obtained and a directed acyclic graph is constructed. Topological sorting and constraint calculation are performed to generate a conflict-free solution sequence, handle nonlinear constraint relationships, and avoid circular dependencies and redundant calculations.
It improves the stability and efficiency of the solution, can handle nonlinear cyclic constraints, achieves instantaneous solution of linear constraints, and enables rapid convergence of nonlinear constraints, avoiding solution failures and requiring no manual intervention.
Smart Images

Figure CN122023643A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer graphics, and for example to a geometric modeling method and apparatus based on directed acyclic graphs, and electronic devices. Background Technology
[0002] Parametric modeling is a method for defining geometric models through parameters and constraints, widely used in computer-aided design, computer-aided engineering, industrial design, building information modeling, and other fields. Its core idea is to associate the model's geometry with a set of adjustable parameters (such as dimensions, angles, and positions) and the constraints between these parameters (such as parallelism, perpendicularity, and symmetry). By modifying the parameters, models with different configurations can be quickly generated. However, as model complexity increases, the constraints between parameters may form complex nonlinear dependency networks, leading to low solution efficiency or even inability to solve the problem, especially when cyclic dependencies or conflicting constraints exist.
[0003] To perform parametric modeling, a history tree-based parametric modeling method has been disclosed, which includes: constructing a modeling history tree by recording user operation steps (such as stretching, rotating, etc.), where each operation depends on the result of the previous step, forming an implicit sequential dependency relationship.
[0004] In the process of implementing the embodiments of this disclosure, at least the following problems were found in the related art: The related technology does not mandate that the constraint relationships be acyclic topology, allowing users to freely add arbitrary constraints. When the constraint relationships form a closed loop, the system cannot solve for the parameters through a unidirectional dependency chain, requiring manual intervention or the introduction of redundant equations, which may lead to solution failure or require manual intervention.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.
[0007] This disclosure provides a geometric modeling method, apparatus, and electronic device based on directed acyclic graphs, which can improve solution efficiency during parametric modeling.
[0008] In some embodiments, the geometric modeling method based on a directed acyclic graph includes: constructing constraint dependencies based on a constructed hierarchical tree; obtaining the current parameter list and constructing a directed acyclic graph based on the parameter list and constraint dependencies; performing constraint calculations on the directed acyclic graph to obtain a geometric model.
[0009] Optionally, based on the constructed hierarchical tree, constraint dependencies are constructed, including: creating a basic cabinet and initializing the basic cabinet; creating a hierarchical tree based on the initialized cabinet; and constructing constraint dependencies based on the hierarchical tree.
[0010] Optionally, the current parameter list is obtained, and a directed acyclic graph is constructed based on the parameter list and constraint dependencies, including: obtaining the current parameter list; taking the node corresponding to each parameter in the parameter list as the upstream diffusion starting point; taking the node that can be connected to the upstream diffusion starting point as the downstream node based on the constraint dependencies; establishing the edge between the upstream diffusion starting point and the downstream node to obtain the directed acyclic graph.
[0011] Optionally, constraint calculations are performed on the directed acyclic graph to obtain a geometric model, including: performing a topological sort on the directed acyclic graph and sequentially traversing all nodes in the directed acyclic graph; after traversing all nodes in the directed acyclic graph, determining whether there are downstream nodes in the directed acyclic graph; if there are no downstream nodes in the directed acyclic graph and new parameters are generated, adding the new parameters to the parameter list; if there are no downstream nodes in the directed acyclic graph and no new parameters are generated, determining that the constraint calculation is complete and obtaining the geometric model.
[0012] Optionally, the geometric modeling method based on a directed acyclic graph further includes: if there is a downstream node in the directed acyclic graph, determining whether the current node is a component; if the current node is a component, writing the parent container size information of the current node into the component attribute and adding the component's parameters to the parameter list; if the current node is not a component, writing the result of the current constraint calculation into the node attribute and re-determining whether there is a downstream node in the directed acyclic graph.
[0013] Optionally, the geometric modeling method based on directed acyclic graphs further includes: writing the result of the current constraint calculation into the node attributes, obtaining the parameterized object generated during the constraint calculation process; adding the parameters of the parameterized object to the parameter list; and updating the hierarchical tree and constraint dependencies based on the parameterized object.
[0014] Optionally, the geometric modeling method based on directed acyclic graphs further includes: when a constraint conflict occurs during constraint calculation, tracing back the propagation path of the directed acyclic graph; determining the source of the conflict based on the propagation path to determine the conflict path; and analyzing the nodes and edges of the conflict path to determine unreasonable constraint conditions.
[0015] In some embodiments, the geometric modeling apparatus based on a directed acyclic graph includes: a dependency construction module configured to construct constraint dependencies based on a constructed hierarchical tree; a directed acyclic graph construction module configured to obtain the current parameter list and construct a directed acyclic graph based on the parameter list and constraint dependencies; and a constraint calculation module configured to perform constraint calculations on the directed acyclic graph to obtain a geometric model.
[0016] In some embodiments, the geometric modeling apparatus based on a directed acyclic graph includes a processor and a memory storing program instructions, the processor being configured to execute the geometric modeling method based on a directed acyclic graph as described above when the program instructions are executed.
[0017] In some embodiments, the electronic device includes: an electronic device body; and a geometric modeling device based on a directed acyclic graph, as described above, mounted on the electronic device body.
[0018] The geometric modeling method, apparatus, and electronic device based on directed acyclic graphs provided in this disclosure can achieve the following technical effects: In this embodiment, the current parameter list is obtained, and a directed acyclic graph (DAG) is constructed based on the parameter list and constraint dependencies. Constraint calculations are performed on the DAG to obtain the geometric model. By forcing the constraint network to be a DAG, a conflict-free solution sequence is generated through topological sorting. Therefore, the absence of cyclic dependencies reduces redundant computation, while the deterministic solution order reduces sensitivity to initial values. Furthermore, symbolic computation prioritizes resolving linear constraints, and numerical optimization handles nonlinear constraints. This allows for the handling of nonlinear cyclic constraints, achieving instantaneous solution for linear constraints and faster convergence for nonlinear constraints. It avoids solution failures and eliminates the need for manual intervention, improving the stability and efficiency of the solution.
[0019] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description
[0020] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein: Figure 1This is a schematic diagram of the implementation environment for the geometric modeling method based on directed acyclic graphs provided in this embodiment of the present disclosure; Figure 2 This is a schematic diagram of a geometric modeling method based on a directed acyclic graph provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of another geometric modeling method based on a directed acyclic graph provided in this embodiment of the present disclosure; Figure 4 This is a schematic diagram of a geometric modeling device based on a directed acyclic graph provided in an embodiment of this disclosure; Figure 5 This is a schematic diagram of another geometric modeling apparatus based on a directed acyclic graph provided in this embodiment. Detailed Implementation
[0021] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.
[0022] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0023] Unless otherwise stated, the term "multiple" means two or more.
[0024] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.
[0025] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0026] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.
[0027] Currently, parametric modeling is a method for defining geometric models through parameters and constraints, widely used in computer-aided design, computer-aided engineering, industrial design, building information modeling, and other fields. Its core idea is to associate the model's geometry with a set of adjustable parameters (such as dimensions, angles, and positions) and the constraints between these parameters (such as parallelism, perpendicularity, and symmetry). By modifying the parameters, models with different configurations can be quickly generated. However, as model complexity increases, the constraints between parameters may form complex nonlinear dependency networks, leading to low solution efficiency or even inability to solve the problem, especially when cyclic dependencies or conflicting constraints exist.
[0028] Therefore, this embodiment solves for the geometry of the model based on user-defined geometric constraints. Geometric constraints include dimensional constraints (such as the length of a line segment, the radius of a circle, etc.), positional constraints (such as the coordinates of a point, the alignment of graphics, etc.), and topological constraints (such as the connection relationships and symmetry relationships of graphics). By using a geometric constraint solver based on a directed acyclic graph, it can be ensured that the model always satisfies the constraints when the parameters change, thus maintaining the correctness of the geometry.
[0029] Combination Figure 1 , Figure 1 This is a schematic diagram illustrating the implementation environment of the geometric modeling method based on a directed acyclic graph according to an embodiment of this disclosure. For example... Figure 1 As shown, the implementation environment may include a processor 500 and a database 100.
[0030] The processor 500 allows users to define various parameters in the model. These parameters can be numerical parameters such as size, angle, and scale, or attribute parameters such as material, color, and texture. Each parameter needs to have a clear name, data type, and value range.
[0031] Furthermore, this embodiment establishes a relationship between parameters through the processor 500, so that when one parameter changes, other related parameters can be automatically updated. This relationship can be a simple mathematical expression or a complex logical relationship.
[0032] This embodiment stores parameter information in database 100 for easy access and modification during the modeling process. It also requires parameter management functions, such as parameter querying, modification, deletion, and batch processing.
[0033] Combination Figure 2 As shown, this disclosure provides a geometric modeling method based on a directed acyclic graph, including: S201, the processor constructs constraint dependencies based on the constructed hierarchical tree.
[0034] S202, the processor obtains the current parameter list and constructs a directed acyclic graph based on the parameter list and constraint dependencies.
[0035] S203, the processor performs constraint calculations on the directed acyclic graph to obtain the geometric model.
[0036] The geometric modeling method based on directed acyclic graphs (DAGs) provided in this disclosure obtains the current parameter list and constructs a DAG based on the parameter list and constraint dependencies. Constraint calculations are performed on the DAG to obtain the geometric model. By forcing the constraint network to be a DAG, a conflict-free solution sequence is generated through topological sorting. Therefore, the absence of cyclic dependencies reduces redundant computation, while the deterministic solution order reduces sensitivity to initial values. Furthermore, symbolic computation prioritizes resolving linear constraints, and numerical optimization handles nonlinear constraints. This allows for the handling of nonlinear cyclic constraints, achieving instantaneous solution for linear constraints and faster convergence for nonlinear constraints. It avoids solution failures and eliminates the need for manual intervention, improving the stability and efficiency of the solution.
[0037] A directed acyclic graph (DAG) is structured with nodes representing parameters or operations and edges representing dependencies. It avoids circular dependencies and supports topological sorting to optimize computation order.
[0038] In practical applications, nodes can include: parameter inputs, geometric operations (stretching, Boolean operations), and constraints. Edges can include: data flow directions (e.g., parameters flow to geometric operations, and then to the final model).
[0039] In the process of solving dynamic constraints for directed acyclic graphs, the constraint types include equality constraints (such as A = B + C) and inequality constraints (such as D ≤ 100).
[0040] The dynamic constraint solving algorithm of this disclosure is based on incremental updates of graph traversal, and only recalculates the affected nodes.
[0041] Optionally, based on the constructed hierarchical tree, constraint dependencies are constructed, including: creating a basic cabinet and initializing the basic cabinet; creating a hierarchical tree based on the initialized cabinet; and constructing constraint dependencies based on the hierarchical tree.
[0042] In this embodiment, a basic cabinet type is first selected, and a cabinet, six panels, and an internal space are created. Then, the default values of the reference panel among the six panels are initialized. Next, a hierarchical tree is created, that is, hierarchical dependencies are created, and finally, constraint dependencies are created.
[0043] Optionally, the current parameter list is obtained, and a directed acyclic graph is constructed based on the parameter list and constraint dependencies, including: obtaining the current parameter list; taking the node corresponding to each parameter in the parameter list as the upstream diffusion starting point; taking the node that can be connected to the upstream diffusion starting point as the downstream node based on the constraint dependencies; establishing the edge between the upstream diffusion starting point and the downstream node to obtain the directed acyclic graph.
[0044] In this embodiment, the system first reads the complete parameter list in the current design session, listing each parameter (such as cabinet total height, shelf thickness, and aperture) as an independent parameter node and marking it as the "upstream diffusion starting point." Then, based on the constraint dependencies derived from the hierarchical tree, it quickly retrieves the geometric elements or sub-feature nodes that each parameter can directly affect, i.e., downstream nodes. For example, the total height parameter can diffuse to the positioning nodes of the top, bottom, and side panels, and the shelf thickness parameter can diffuse to the shelf itself and its adjacent slot location nodes. During the retrieval process, real-time loop detection ensures that any new... The directed edges constructed from upstream nodes to downstream nodes will not form cycles, thus allowing for simultaneous insertion and verification, ultimately resulting in a constraint dependency graph that contains both parameter nodes and geometric nodes and is strictly acyclic. When a user modifies any parameter, the system only needs to perform local diffusion and recalculation starting from that parameter node along the outgoing edge direction, without updating other irrelevant branches, significantly improving computational efficiency. At the same time, the topological order of the directed acyclic graph provides the optimal computation order for the subsequent hybrid solver, allowing the linear part to be symbolically analyzed instantaneously, and the nonlinear part to converge quickly with the initial values given by the topological order, achieving a highly robust real-time parametric modeling effect.
[0045] When the value of a dimension parameter node changes, this change propagates along the edge to the affected geometric element nodes, based on the edge's direction. These geometric element nodes then further propagate the change based on their constraints with other nodes until all affected nodes are updated. For example, in a rectangular model, if the value of the length dimension parameter node increases, this change first propagates to the geometric element nodes of the two sides related to the length, and the lengths of these two sides will change accordingly. Due to the constraint that opposite sides of a rectangle are parallel and equal, this change will propagate through the edges to the geometric element nodes of the other two sides, altering the shape of the entire rectangle.
[0046] Optionally, constraint calculations are performed on the directed acyclic graph to obtain a geometric model, including: performing a topological sort on the directed acyclic graph and sequentially traversing all nodes in the directed acyclic graph; after traversing all nodes in the directed acyclic graph, determining whether there are downstream nodes in the directed acyclic graph; if there are no downstream nodes in the directed acyclic graph and new parameters are generated, adding the new parameters to the parameter list; if there are no downstream nodes in the directed acyclic graph and no new parameters are generated, determining that the constraint calculation is complete and obtaining the geometric model.
[0047] In this embodiment, the system first performs topological sorting to obtain a unique linear sequence; then, it visits each node sequentially, executes its corresponding constraint equations, and propagates the determined values of the upstream nodes unidirectionally to the downstream nodes; after traversal, it checks whether there are any unsolved downstream nodes. If there are still unprocessed downstream nodes, it continues iterating until all nodes converge; if there are no downstream nodes but new parameters are generated by user input or the algorithm, the parameter node is immediately added to the parameter list, and the topological sorting and solution process is repeated with this node as the new diffusion starting point; only when there are no unprocessed downstream nodes and no new parameters are added, the system determines that the constraint calculation is complete. At this time, all geometric nodes have obtained their final coordinates, dimensions, and topological relationships, forming a complete, closed geometric model that satisfies all constraints.
[0048] This embodiment employs a depth-first search algorithm or a breadth-first search algorithm to traverse the directed graph. Starting from the node whose size parameter has changed, it sequentially visits its adjacent nodes according to the rules of the search algorithm, passing the parameter change to these nodes.
[0049] During node updates, calculations are performed based on the constraint type (geometric constraint or dimensional constraint). For dimensional constraints, the dimensions of the geometric elements are updated directly based on the new parameter values; for geometric constraints, the position and orientation of the geometric elements are adjusted through geometric calculations to meet the constraint requirements.
[0050] Optionally, the geometric modeling method based on a directed acyclic graph further includes: if there is a downstream node in the directed acyclic graph, determining whether the current node is a component; if the current node is a component, writing the parent container size information of the current node into the component attribute and adding the component's parameters to the parameter list; if the current node is not a component, writing the result of the current constraint calculation into the node attribute and re-determining whether there is a downstream node in the directed acyclic graph.
[0051] In this embodiment, when the topology sort traverses to a certain node and there are still downstream nodes, the system immediately checks the node type. If it is a component node, the system reads the real-time size and positioning information of its parent container and writes it into the component attributes all at once. At the same time, the adjustable parameters inside the component are appended to the global parameter list, so that the component automatically inherits the latest baseline and opens its own driveable size when the parent container changes. If the node is not a component, the values (coordinates, length, angle, etc.) obtained from the current constraint calculation are written back to the node attributes and marked as converged. Then, the entire directed acyclic graph is rescanned to check whether there are still uncalculated downstream nodes. If there are, the iteration continues; if not and no new parameters are generated, the calculation is terminated.
[0052] Optionally, the geometric modeling method based on directed acyclic graphs further includes: writing the result of the current constraint calculation into the node attributes, obtaining the parameterized object generated during the constraint calculation process; adding the parameters of the parameterized object to the parameter list; and updating the hierarchical tree and constraint dependencies based on the parameterized object.
[0053] In this embodiment, after each constraint calculation result is written to the node attributes, the system immediately scans the newly generated parametric objects during the current solution process, extracts all adjustable parameters such as control dimensions, array spacing, and rotation angles, and adds them to the global parameter list. Then, based on the parent-child hierarchy and assembly datum of these parametric objects, the system updates the hierarchy tree in real time, inserts corresponding new nodes into the tree, points their parent nodes to the parent container that generated them, and simultaneously expands constraint dependencies. At the same time, loop detection is performed again to ensure that the updated directed acyclic graph remains acyclic. Thus, any new geometry derived from the calculation can participate in subsequent linkages just like the original parameters. When the user continues to adjust parameters, the system only performs incremental solutions on the newly added subgraphs, avoiding global reconstruction.
[0054] Optionally, the geometric modeling method based on directed acyclic graphs further includes: when a constraint conflict occurs during constraint calculation, tracing back the propagation path of the directed acyclic graph; determining the source of the conflict based on the propagation path to determine the conflict path; and analyzing the nodes and edges of the conflict path to determine unreasonable constraint conditions.
[0055] Combination Figure 3 As shown, this disclosure provides another geometric modeling method based on directed acyclic graphs, including: S301, the processor constructs constraint dependencies based on the constructed hierarchical tree.
[0056] S302, the processor obtains the current parameter list and constructs a directed acyclic graph based on the parameter list and constraint dependencies.
[0057] S303, the processor performs constraint calculations on the directed acyclic graph to obtain the geometric model.
[0058] S304: When a constraint conflict occurs during constraint calculation, the processor backtracks the propagation path of the directed acyclic graph.
[0059] S305, the processor determines the source of the conflict based on the propagation path, and thus determines the conflict path.
[0060] S306, the processor analyzes the nodes and edges of the conflict path to determine unreasonable constraints.
[0061] In this embodiment of the disclosure, if contradictory constraint requirements appear along the propagation path of the directed graph during the constraint solving process, it indicates that a constraint conflict exists. For example, if two size parameters attempt to set the length of the same edge to different values, the geometric element node of this edge will receive two contradictory update messages during the propagation of the directed graph, thus detecting a constraint conflict.
[0062] When a constraint conflict is detected, the propagation path of the directed graph is traced back to find the source of the conflict. By analyzing the nodes and edges on the conflict path, it is determined which constraints are unreasonable.
[0063] Provide users with conflict reports, displaying the specific location of the conflict and related constraint information, so that users can adjust the constraint relationships and resolve the conflict. For example, in parametric modeling software, a pop-up prompt box informs the user that "Dimensional parameter A and dimension parameter B have a conflict with the length constraint of edge C. Please check the relevant constraint settings."
[0064] Combination Figure 4 As shown in the figure, this disclosure provides a geometric modeling device 40 based on a directed acyclic graph (DAG), including a dependency relationship construction module 401, a DAG construction module 402, and a constraint calculation module 403. The dependency relationship construction module 401 is configured to construct constraint dependencies based on a constructed hierarchical tree; the DAG construction module 402 is configured to obtain the current parameter list and construct a DAG based on the parameter list and constraint dependencies; the constraint calculation module 403 is configured to perform constraint calculations on the DAG to obtain a geometric model.
[0065] The geometric modeling apparatus 40 based on a directed acyclic graph (DAG) provided in this embodiment of the invention uses a dependency construction module 401 to obtain the current parameter list and a DAG construction module 402 to construct a DAG based on the parameter list and constraint dependencies. A constraint calculation module 403 performs constraint calculations on the DAG to obtain the geometric model. By forcing the constraint network to be a DAG, a conflict-free solution sequence is generated through topological sorting. Therefore, the absence of cyclic dependencies reduces redundant computation, while the deterministic solution order reduces sensitivity to initial values. Furthermore, symbolic computation prioritizes resolving linear constraints, and numerical optimization handles nonlinear constraints. This allows for the handling of nonlinear cyclic constraints, achieving instantaneous solution for linear constraints and faster convergence for nonlinear constraints. It avoids solution failures and eliminates the need for manual intervention, improving the stability and efficiency of the solution.
[0066] Combination Figure 5As shown, this embodiment of the disclosure provides a geometric modeling apparatus 50 based on a directed acyclic graph (DAG), including a processor 500 and a memory 501. Optionally, the apparatus 50 may further include a communication interface 502 and a bus 503. The processor 500, communication interface 502, and memory 501 can communicate with each other via the bus 503. The communication interface 502 can be used for information transmission. The processor 500 can call logical instructions in the memory 501 to execute the geometric modeling method based on a DAG of the above embodiment.
[0067] Furthermore, the logic instructions in the aforementioned memory 501 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0068] The memory 501, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 500 executes functional applications and data processing by running the program instructions / modules stored in the memory 501, that is, it implements the geometric modeling method based on directed acyclic graphs in the above embodiments.
[0069] The memory 501 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 501 may include high-speed random access memory and may also include non-volatile memory.
[0070] This disclosure provides an electronic device, including: an electronic device body, and the aforementioned geometric modeling device based on a directed acyclic graph (DAG). The geometric modeling device based on the DAG is mounted on the electronic device body. The mounting relationship described herein is not limited to placement within the electronic device body, but also includes mounting connections with other components of the electronic device, including but not limited to physical connections, electrical connections, or signal transmission connections. Those skilled in the art will understand that the geometric modeling device based on the DAG can be adapted to feasible electronic device bodies, thereby realizing other feasible embodiments.
[0071] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc., and other media capable of storing program code.
[0072] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.
[0073] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0074] The methods and products disclosed in the embodiments herein (including but not limited to devices and equipment) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0075] 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 embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
Claims
1. A geometric modeling method based on directed acyclic graphs, characterized in that, include: Based on the constructed hierarchy tree, construct constraint dependencies; Obtain the current parameter list and construct a directed acyclic graph based on the parameter list and constraint dependencies; Constraint calculations are performed on the directed acyclic graph to obtain the geometric model.
2. The geometric modeling method according to claim 1, characterized in that, Based on the constructed hierarchical tree, construct constraint dependencies, including: Create a basic cabinet and initialize it. Create a hierarchical tree based on the initialized cabinet; Construct constraint dependencies based on the hierarchy tree.
3. The geometric modeling method according to claim 1, characterized in that, Obtain the current parameter list and construct a directed acyclic graph based on the parameter list and constraint dependencies, including: Get the current parameter list; Each node corresponding to each parameter in the parameter list is used as the upstream diffusion starting point; Based on the constraint dependencies, nodes that can be connected to the upstream diffusion starting point are identified as downstream nodes; Establish the edges between the upstream diffusion starting point and the downstream nodes to obtain a directed acyclic graph.
4. The geometric modeling method according to claim 1, characterized in that, Constraint calculations are performed on the directed acyclic graph to obtain the geometric model, including: Perform a topological sort on the directed acyclic graph and then iterate through all the nodes in the directed acyclic graph. After traversing all nodes in the directed acyclic graph, determine whether there is a downstream node in the directed acyclic graph; In a directed acyclic graph where there are no downstream nodes and new parameters are generated, the new parameters are added to the parameter list. If there are no downstream nodes in the directed acyclic graph and no new parameters are generated, the constraint calculation is considered complete, and the geometric model is obtained.
5. The geometric modeling method according to claim 4 further includes: In a directed acyclic graph where downstream nodes exist, determine whether the current node is a component. If the current node is a component, write the size information of the parent container of the current node into the component property and add the component's parameters to the parameter list; If the current node is not a component, write the result of the current constraint calculation into the node attribute, and re-determine whether there is a downstream node in the directed acyclic graph.
6. The geometric modeling method according to claim 5, characterized in that, Also includes: After writing the result of the current constraint calculation to the node attribute, obtain the parameterized object generated during the constraint calculation process; Add the parameters of the parameterized object to the parameter list; Update the hierarchy tree and constraint dependencies based on the parameterized objects.
7. The geometric modeling method according to any one of claims 1 to 6, characterized in that, Also includes: When a constraint conflict occurs during constraint calculation, the propagation path of the directed acyclic graph is backtracked. Identify the source of the conflict based on its propagation path, thereby determining the conflict path. Analyze the nodes and edges of the conflict path to identify unreasonable constraints.
8. A geometric modeling device based on a directed acyclic graph, characterized in that, include: The dependency building module is configured to build constraint dependencies based on the constructed hierarchy tree; The directed acyclic graph (DAG) building module is configured to obtain the current parameter list and build a DAG based on the parameter list and constraint dependencies. The constraint calculation module is configured to perform constraint calculations on directed acyclic graphs to obtain a geometric model.
9. A geometric modeling apparatus based on a directed acyclic graph, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute the geometric modeling method based on a directed acyclic graph as described in any one of claims 1 to 7 when running the program instructions.
10. An electronic device, characterized in that, include: The electronic device itself; The geometric modeling device based on a directed acyclic graph as described in claim 8 or 9 is installed on the electronic device body.