3D model processing method based on directed acyclic graph and lock-free multithreading mode

By adopting directed acyclic graph and lock-free multi-threaded mode processing methods in CAD software, the problem of too long model loading time in the existing technology is solved, and more efficient model loading and processing is achieved, improving user experience.

WO2025107744A1PCT designated stage expired Publication Date: 2025-05-30PHYSIM ELECTRONIC TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/111667
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-20
Filing Date
2024-08-13
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When existing CAD software processes huge and complex models, the loading time increases exponentially, resulting in user waiting time being too long and the user interface is stuck, affecting the practicality of the software and user experience.

Method used

The 3D model processing method based on directed acyclic graph and lock-free multi-threaded mode is adopted to analyze the dependencies between models by constructing directed acyclic graphs, and multi-threaded hierarchy is used to process the construction, refinement and rendering of the model.

Benefits of technology

It improves model loading efficiency, significantly shortens loading time, improves user experience, and avoids the situation of user interface stuck.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024111667_30052025_PF_FP_ABST
    Figure CN2024111667_30052025_PF_FP_ABST
Patent Text Reader

Abstract

A 3D model processing method based on a directed acyclic graph and a lock-free multithreading mode, comprising: acquiring a 3D model design file (S101); parsing the 3D model design file, and determining a parent model and a child model among associated models (S102); constructing a directed acyclic graph, wherein nodes in the directed acyclic graph correspond to models among the associated models, the edges of the directed acyclic graph are unidirectional edges, the edges connect nodes corresponding to the associated models, and the edges point to nodes of the child model from nodes of the parent model (S103); dividing the nodes into multiple levels on the basis of the directed acyclic graph (S104); counting the number of nodes of each level (S105); and constructing, refining and rendering the models corresponding to all the nodes level by level on the basis of a lock-free multithreading mode (S106).
Need to check novelty before this filing date? Find Prior Art

Description

3D model processing method based on directed acyclic graph and lock-free multi-threading mode

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 20, 2023, with application number 202311550817.1, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the technical field of 3D model construction, for example, to a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode. Background Art

[0003] Mainstream computer-aided design (CAD) software typically utilizes parametric modeling techniques. For example, for a geometric entity like a cube, its relevant data, including its 3D position and dimensional parameters, is stored in a model file. When a CAD tool imports such a model file, it undergoes a complex process, including file parsing, geometric model reconstruction, refinement, and final rendering. These steps are designed to ensure the accurate restoration of the model's geometric features, ultimately presenting it as high-quality graphics on the user's screen.

[0004] When processing large and complex model files, especially when models are generated through geometric operations such as Boolean operations, stretching, and sweeping, if the entire process uses a linear processing method, the loading time will increase exponentially with the size of the model file. For the sake of simplicity, some CAD software does not fully analyze the dependencies between models or fully utilize the multi-core processing capabilities of modern computers. Only a single thread is used in the processing flow, resulting in long user wait times during the model loading process and the user interface (UI) becoming stuck. This seriously weakens the practicality of the software and affects the user experience.

[0005] For composite models, due to the existence of explicit dependencies, model construction involves a specific sequence, and this sequence is usually unidirectional. To efficiently handle these dependencies, we can analyze the structure and dependencies between models and use algorithms such as topological sorting to determine the construction order. This helps ensure that the components built first satisfy the dependencies of subsequent components during the modeling process, improving overall construction efficiency.

[0006] Summary of the Invention

[0007] This application provides a 3D model processing method based on a directed acyclic graph and a lock-free multi-threaded mode, which utilizes the dependencies between models to construct a directed acyclic graph, and then utilizes the characteristics of the directed acyclic graph to use multi-threaded layering to process the construction, refinement and rendering of the model, thereby improving the efficiency of model loading.

[0008] The embodiment of the present application provides a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode, including:

[0009] Obtain 3D model design files;

[0010] Parsing the 3D model design file, and determining associated models according to the parsing result, wherein the associated models include a parent model and a child model;

[0011] Constructing a directed acyclic graph, wherein nodes of the directed acyclic graph correspond to models in the associated models, edges of the directed acyclic graph are unidirectional edges, the edges connect nodes corresponding to the associated models, and the edges point from nodes of the parent model to nodes of the child model;

[0012] The nodes are divided into multiple levels according to the directed acyclic graph, wherein the characteristic of the initial node of the directed acyclic graph is that there are only edges starting from the node but no edges pointing to the node; the characteristic of the secondary nodes of the directed acyclic graph is that there are edges pointing to the node, wherein the level of the secondary node is determined according to the levels of the nodes of all parent models of the secondary node, and the maximum value N is taken from the levels of the nodes of all parent models of the secondary node, and the level of the secondary node is N+1;

[0013] Count the number of nodes at each level;

[0014] The models corresponding to all nodes of the directed acyclic graph are processed step by step based on a lock-free multi-threading mode, wherein nodes at the same level are processed based on the lock-free multi-threading mode, and the processing includes constructing the model, refining the model, and rendering the model.

[0015] In one embodiment, after constructing the directed acyclic graph, the method further comprises: visually presenting the constructed directed acyclic graph, wherein the visual presentation is implemented by a Graphviz graphics tool.

[0016] In one embodiment, dividing the nodes into multiple levels according to the directed acyclic graph includes: dividing the nodes into three levels according to the directed acyclic graph;

[0017] Among them, the nodes are divided into three levels: the first-level node is the initial node, whose characteristic is that there are only edges starting from the node but no edges pointing to the node; the second-level node, whose characteristic is that there are edges pointing to the node, and all parent model nodes of the node are first-level nodes; the third-level node, whose characteristic is that there are edges pointing to the node, and at least one node among the nodes of the parent model of the node is the second-level node.

[0018] In one embodiment, counting the number of nodes at each level includes: counting the number of nodes at each level according to the edges of the directed acyclic graph, first determining the number of all first-level nodes, then traversing level by level according to the direction of the edges corresponding to each first-level node, counting all secondary nodes originating from the first-level node, and traversing all first-level nodes to count the number of all nodes.

[0019] In one embodiment, the lock-free multi-threaded processing mode is a parallel processing mode, and the models corresponding to all nodes of the directed acyclic graph are processed step by step based on the lock-free multi-threaded mode, including: processing all first-level nodes in parallel based on the lock-free multi-threaded processing mode, and after the models corresponding to all first-level nodes are processed, processing all second-level nodes in parallel based on the lock-free multi-threaded processing mode, and after the models corresponding to all second-level nodes are processed, processing all third-level nodes in parallel based on the lock-free multi-threaded processing mode.

[0020] In one embodiment, the models corresponding to all nodes of the directed acyclic graph are processed step by step based on the lock-free multi-threading mode, including: after the models corresponding to the nodes of the previous level are processed, when processing the models corresponding to the nodes of the next level, a reading operation is performed on the data of the models corresponding to the nodes of the previous level, and during the reading operation, the data of the models corresponding to the nodes of the previous level are cloned, and then the reading operation is performed on the cloned data.

[0021] In one embodiment, the processing of the models corresponding to all nodes of the directed acyclic graph step by step based on the lock-free multi-threading mode includes: using a collector function, a processor function and a thread pool class GraphThreadPool to process the models corresponding to all nodes of the directed acyclic graph;

[0022] The collector function is used to collect the models corresponding to the nodes at each level, collect the models corresponding to all nodes into a list and pass the list to the processor function;

[0023] The processor function constructs, refines and renders the models corresponding to all nodes;

[0024] The thread pool class GraphThreadPool builds a thread pool and calls a corresponding number of threads to implement the functions of the collector function and the processor function.

[0025] In one embodiment, using the processor function to construct, refine, and render models corresponding to all nodes includes:

[0026] The processor function calls the build function to perform geometric construction on the models corresponding to all nodes:

[0027] According to the geometric parameters of the model corresponding to the first-level node, a geometric model library is called to construct a geometric model to obtain a first-level model;

[0028] Creating a geometric model of the model corresponding to the secondary node, and performing geometric operations based on the geometric model and the primary model of the primary node associated with the secondary node to obtain a secondary model;

[0029] Creating a geometric model of the model corresponding to the third-level node, and performing geometric operations based on the geometric model and the second-level model of the second-level node or the first-level model of the first-level node associated with the third-level node to obtain a third-level model;

[0030] The processor function calls the build function to refine all the first-level models, second-level models and third-level models;

[0031] The processor function calls the render function to render all the first-level models, second-level models and third-level models;

[0032] The geometry construction, refinement and rendering are performed in the thread pool.

[0033] In one embodiment, the 3D model design file is generated by modeling with a CAD tool, or is a file in XML, XFL, STP, SAT, IGS, or DXF format generated by a third-party CAD tool.

[0034] In one embodiment, the 3D model design file includes the material of the associated model, the coordinate system of the associated model, the environmental parameters of the associated model, and the associated model file. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] FIG1 is a flowchart of a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode according to an embodiment of the present application;

[0036] FIG2 is a schematic diagram of a first-level node of a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode according to an embodiment of the present application;

[0037] FIG3 is a schematic diagram of secondary nodes of a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode according to an embodiment of the present application;

[0038] FIG4 is a schematic diagram of three-level nodes of a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode according to an embodiment of the present application.

[0039] FIG5 is a schematic diagram showing a performance comparison between a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode and a traditional model loading algorithm according to an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the drawings, the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present application, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present application, and should not be understood as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0041] FIG1 is a flowchart of a 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode according to an embodiment of the present application. The 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode includes the following steps.

[0042] Step S101: Obtain a 3D model design file.

[0043] Step S102 , parsing the 3D model design file, and determining associated models according to the parsing result, where the associated models include a parent model and a child model.

[0044] Step S103, constructing a directed acyclic graph, wherein the nodes of the directed acyclic graph correspond to the models in the associated models, the edges of the directed acyclic graph are unidirectional edges, the edges connect the nodes corresponding to the associated models, and the edges point from the nodes of the parent model to the nodes of the child model.

[0045] Step S104: Divide the nodes into multiple levels according to the directed acyclic graph.

[0046] The characteristic of the initial node of the directed acyclic graph is that there are only edges starting from the node but no edges pointing to the node;

[0047] The characteristics of the secondary node of the directed acyclic graph are: there is an edge pointing to the node, wherein the level of the secondary node is determined according to the levels of the nodes of all parent models of the secondary node, and the level of the secondary node is N+1 if the maximum value N is taken from the levels of the nodes of all parent models;

[0048] Step S105: Count the number of nodes at each level.

[0049] Step S106 , processing the models corresponding to all nodes step by step based on the lock-free multi-threading mode, wherein nodes at the same level are processed based on the lock-free multi-threading mode, and the processing includes model construction, refinement, and rendering of the model.

[0050] After acquiring the 3D model design file, the system first parses the file, carefully analyzing its structure and format. Based on the parsed results, the associated models are identified, along with the parent and child models within them. Subsequently, a directed acyclic graph (DAG) is constructed based on the obtained parent and child model data. During this construction process, the DAG nodes and models correspond to each other, with edges representing the parent-child relationships between them. After the construction is complete, all nodes are graded and the number of nodes at each level is counted. After this count is completed, these nodes are processed using a lock-free multithreaded mode to achieve model construction, refinement, and rendering.

[0051] A model has a corresponding node. The relationship between the nodes connected by edges is a parent-child relationship, from the parent to the child. The creation of the nodes and edges corresponding to the model indicates that the data structure corresponding to the model is completed.

[0052] After the directed acyclic graph is successfully created, an algorithm can be used to count the models corresponding to each layer of nodes in the graph, and these models can be processed based on the lock-free multi-threaded mode.

[0053] In one embodiment, the method further includes, after step S103 , visually presenting the constructed directed acyclic graph, wherein the visual presentation is implemented by using a Graphviz graphics tool.

[0054] Graphviz is an open-source graph visualization tool used to present structured information as graphs and networks. Figures 2-4 show visualizations of three-level nodes rendered using Graphviz. These are described below.

[0055] In one embodiment, in step S104, the nodes are divided into three levels according to the directed acyclic graph.

[0056] The nodes are divided into three levels: the first-level node is the initial node, whose characteristic is that there are only edges starting from the node but no edges pointing to the node; the second-level node, whose characteristic is: there are edges pointing to the node, and all the nodes of the parent model of the node are first-level nodes; the third-level node, whose characteristic is: there are edges pointing to the node, and at least one node in the node's parent model is a second-level node.

[0057] When classifying nodes into levels, the more common ones are level one, level two, and level three. There are very few model design files for level four and above, so the directed acyclic graph can be used to divide the nodes into three levels.

[0058] For example, if a node depends on both the first-level node and the second-level node, but does not depend on any higher-level node, then it is a third-level node.

[0059] In one embodiment, in step S105, the number of nodes at each level is counted based on the edges of the directed acyclic graph. The number of first-level nodes is first determined, and then each first-level node is traversed level by level according to the direction of the edges, and all secondary nodes originating from the first-level node are counted. All first-level nodes are traversed to complete the statistics of the number of all nodes.

[0060] The edges include outgoing edges and incoming edges. The first-level nodes include outgoing edges but not incoming edges. After the first-level node count is completed, starting from the first-level nodes, the second-level nodes are counted according to the outgoing edges of the first-level nodes. And so on. When all the first-level nodes are traversed, the nodes of each level in all the nodes of the directed acyclic graph are also counted.

[0061] In one embodiment, in step S106, the lock-free multi-threaded processing mode is a parallel processing mode. All first-level nodes are first processed in parallel in the lock-free multi-threaded processing mode. When the models corresponding to all first-level nodes are processed, all second-level nodes are processed in parallel in the lock-free multi-threaded processing mode. When the models corresponding to all second-level nodes are processed, all third-level nodes are finally processed in parallel in the lock-free multi-threaded processing mode.

[0062] Figure 2 is a first-level node diagram. As shown in the figure, the models corresponding to nodes such as DIE and SM_TOP are relatively independent and do not rely on any other models. Therefore, when constructing, refining, and rendering the models corresponding to nodes such as DIE and SM_TOP, they can be directly processed in parallel in a lock-free multi-threaded processing mode.

[0063] Figure 3 is a second-level node graph. As shown in the figure, the model corresponding to the DDR_A10_Wire_001 node depends on the models corresponding to the DDR_A10_Wire_001_path, DDR_A10_Wire_001_end, and DDR_A10_Wire_001_end_trim nodes. In this directed acyclic graph, DDR_A10_Wire_001 is a second-level node, and DDR_A10_Wire_001_path, DDR_A10_Wire_001_end, and DDR_A10_Wire_001_end_trim are first-level nodes. When building the model corresponding to the DDR_A10_Wire_001 node, these three first-level nodes must first be processed in lock-free multi-threaded processing mode. After the models corresponding to these three nodes are built, the model corresponding to the DDR_A10_Wire_001 node is built based on these three first-level models.

[0064] Figure 4 shows a three-level node graph. As shown, the model for node VSS_07_0001 is relatively complex to construct. It relies on the models for nodes VSS_07_0012, VSS_07_0011, and VSS_07_0010. These models, in turn, rely on the model for node Path_07. Therefore, in this directed acyclic graph, Path_07 is a first-level node, nodes VSS_07_0012, VSS_07_0011, and VSS_07_0010 are second-level nodes, and VSS_07_0001 is a third-level node. When constructing the model for node VSS_07_0001, the model for node Path_07 must be constructed first, followed by the second-level nodes, and finally the model for node VSS_07_0001.

[0065] In one embodiment, in step S106, after the model of the previous level is processed, when processing the model corresponding to the node of the next level, only a read operation is performed on the data of the model corresponding to the node of the previous level, and during the reading operation, the data of the model corresponding to the node of the previous level is first cloned, and then the read operation is performed on the cloned data.

[0066] In one embodiment, in step S106, the model is processed using a collector function, a processor function, and a thread pool class GraphThreadPool;

[0067] The collector function is used to collect the models corresponding to the nodes at each level, collect the models into a list and pass the list to the processor function;

[0068] The processor function builds, refines, and renders the model;

[0069] The thread pool class GraphThreadPool builds a thread pool and calls a corresponding number of threads to implement the functions of the collector function and the processor function.

[0070] In one embodiment, building, refining, and rendering a model using a processor function includes:

[0071] The processor function calls the build function to geometrically construct the model:

[0072] For the model corresponding to the first-level node, the geometric modeling library is called to build the geometric model according to the geometric parameters of the model to obtain the first-level model;

[0073] For the model corresponding to the secondary node, first create its own geometric model, and then perform geometric operations based on the geometric model and the primary model of the primary node associated with the secondary node to obtain the secondary model;

[0074] For the model corresponding to the third-level node, first create its own geometric model, and then perform geometric operations based on the geometric model and the second-level model of the second-level node or the first-level model of the first-level node associated with the third-level node to obtain the third-level model;

[0075] The processor function calls the build function to refine the model;

[0076] The processor function calls the render function to render the model;

[0077] The geometry construction, refinement and rendering are performed in a thread pool.

[0078] When building a geometric model, for one layer of model construction, the geometric modeling library is called to build a solid model based on the geometric parameters of the model, such as the length, width, and height of the cuboid;

[0079] For the second-layer model construction, create a first-layer model attached to it, and then sweep the first-layer model to construct the second-layer model. For example, first create a plane, and then scan along the specified path to construct a 3D figure.

[0080] For three-layer model construction, create a first-layer model attached to it, then sweep the first-layer model to construct a second-layer model, and then use the second-layer model to construct a three-layer model.

[0081] When refining a geometric model, such as a sphere, the corresponding parameters are only the coordinates of the sphere's center and radius. However, to display it on the screen, multiple triangles are used to represent the entire sphere. Increasing the number of triangles makes the sphere's surface smoother. The process of achieving this smoothing function is called model refinement. Due to the complex geometric structure of different models, the refinement process can be relatively time-consuming. Since the refinement of each model is independent during the refinement process, the algorithm implementing this function can be placed in the thread pool.

[0082] When rendering geometric models, like model refinement, the rendering process is also time-consuming. The rendering of each model is also independent, and the process is also placed in the thread pool.

[0083] In one embodiment, in step S101 , the 3D model design file is generated by modeling with a CAD tool, or is a file in XML, XFL, STP, SAT, IGS, or DXF format generated by a third-party CAD tool.

[0084] In one embodiment, in step S102, parsing the 3D model design file includes model material parsing, model coordinate system parsing, model environmental parameter parsing and model file parsing, that is, the 3D model design file includes the material of the associated model, the coordinate system of the associated model, the environmental parameters of the associated model and the file of the associated model.

[0085] Figure 5 is a comparison chart of 26 actual cases tested by the 3D model processing method based on directed acyclic graph and lock-free multi-threading mode of this application and the traditional loading model algorithm. The first column in the figure is the name of the design file, the second column is the file size, the third column is the time for the traditional loading model algorithm to build the model, the fourth column is the time for the method of this application to build the model, the fifth column is the time ratio between the traditional loading model algorithm and the method of this application, and the last column is the test server configuration. It can be seen from the figure that compared with the linear and unordered loading model algorithm, regardless of the size of the file, the use of directed acyclic graph and lock-free multi-threading algorithm will be faster than the traditional loading model algorithm, with a speed increase of about 1.3 to 5.3 times.

[0086] In this application, since there is no dependency between models at the same level, there is no need to introduce a thread lock mechanism while utilizing multithreading, making the processing model more convenient.

[0087] This algorithm can process multiple models in parallel. Compared with traditional single-threaded algorithms, the loading speed of this application is increased several times, the technical gain effect is significant, and the efficiency is higher.

[0088] In the description of this application, it should be noted that the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to this application. For ease of description, the sizes of the multiple parts shown in the drawings are not drawn according to the actual proportional relationship. Technologies, methods and equipment known to ordinary technicians in the relevant fields may not be discussed, but where appropriate, the technologies, methods and equipment should be considered as part of the authorization specification. In all examples shown and discussed here, any values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that similar numbers and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be discussed in subsequent figures.

[0089] It should be noted that, in this application, the terms "comprises", "includes" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. It should also be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to some examples may be combined in other examples.

Claims

1. A 3D model processing method based on a directed acyclic graph and a lock-free multi-threading mode, comprising: Get 3D model design files; Parsing the 3D model design file, and determining associated models according to the parsing result, wherein the associated models include a parent model and a child model; Constructing a directed acyclic graph, wherein the nodes of the directed acyclic graph correspond to the models in the associated models, the edges of the directed acyclic graph are unidirectional edges, the edges connect the nodes corresponding to the associated models, and the edges point from the nodes of the parent model to the nodes of the child model; The nodes are divided into multiple levels according to the directed acyclic graph, wherein the characteristic of the initial node of the directed acyclic graph is that there are only edges starting from the node but no edges pointing to the node; the characteristic of the secondary node of the directed acyclic graph is that there are edges pointing to the node, wherein the level of the secondary node is determined according to the levels of the nodes of all parent models of the secondary node, and the maximum value N is taken from the levels of the nodes of all parent models of the secondary node, and the level of the secondary node is N+1; Count the number of nodes at each level; Models corresponding to all nodes of the directed acyclic graph are processed level by level based on a lock-free multi-threaded mode, wherein nodes at the same level are processed based on the lock-free multi-threaded mode, and the processing includes constructing a model, refining and rendering the model.

2. The method according to claim 1, after constructing the directed acyclic graph, further comprising: The constructed directed acyclic graph is visualized and presented, and the visualization is achieved through the Graphviz graphics tool.

3. The method according to claim 1, wherein: The step of dividing the nodes into multiple levels according to the directed acyclic graph comprises: Dividing the nodes into three levels according to the directed acyclic graph; Among them, the nodes are divided into three levels: the first-level node is the initial node, and its characteristic is that there are only edges starting from the node but no edges pointing to the node; the second-level node, its characteristic is that there are edges pointing to the node, and all the nodes of the parent model of the node are first-level nodes; the third-level node, its characteristic is that there are edges pointing to the node, and at least one node among the nodes of the parent model of the node is the second-level node.

4. The method according to claim 3, wherein: The method of counting the number of nodes at each level includes: counting the number of nodes at each level according to the edges of the directed acyclic graph, first determining the number of all first-level nodes, then traversing level by level according to the direction of the edges corresponding to each first-level node, counting all secondary nodes originating from the first-level node, and traversing all first-level nodes to count the number of all nodes.

5. The method according to claim 3, wherein: The lock-free multi-threaded processing mode is a parallel processing mode, and the models corresponding to all the nodes of the directed acyclic graph are processed step by step based on the lock-free multi-threaded mode, including: processing all the first-level nodes in parallel based on the lock-free multi-threaded processing mode, after the models corresponding to all the first-level nodes are processed, processing all the second-level nodes in parallel based on the lock-free multi-threaded processing mode, and after the models corresponding to all the second-level nodes are processed, processing all the third-level nodes in parallel based on the lock-free multi-threaded processing mode.

6. The method according to claim 5, wherein: The method processes the models corresponding to all the nodes of the directed acyclic graph step by step based on the lock-free multi-threading mode, including: after the models corresponding to the nodes of the previous level are processed, when processing the models corresponding to the nodes of the next level, a reading operation is performed on the data of the models corresponding to the nodes of the previous level, and during the reading operation, the data of the models corresponding to the nodes of the previous level are cloned, and then the reading operation is performed on the cloned data.

7. The method according to claim 3, wherein: The method of processing the models corresponding to all the nodes of the directed acyclic graph step by step based on the lock-free multi-threaded mode includes: using a collector function, a processor function and a thread pool class GraphThreadPool to process the models corresponding to all the nodes of the directed acyclic graph; The collector function is used to collect the models corresponding to the nodes at each level, collect the models corresponding to all the nodes into a list and pass the list to the processor function; The processor function constructs, refines and renders the models corresponding to all nodes; The thread pool class GraphThreadPool constructs a thread pool and calls a corresponding number of threads to implement the functions of the collector function and the processor function.

8. The method according to claim 7, wherein: Using the processor function to construct, refine and render the models corresponding to all nodes includes: The processor function calls the build function to geometrically construct the models corresponding to all the nodes, wherein, according to the geometric parameters of the model corresponding to the first-level node, the geometric modeling library is called to construct the geometric model to obtain the first-level model; the geometric model of the model corresponding to the second-level node is created, and geometric operations are performed based on the geometric model and the first-level model of the first-level node associated with the second-level node to obtain the second-level model; the geometric model of the model corresponding to the third-level node is created, and geometric operations are performed based on the geometric model and the second-level model of the second-level node associated with the third-level node or the first-level model of the first-level node to obtain the third-level model; The processor function calls the build function to refine all the first-level models, second-level models and third-level models; The processor function calls the render function to render all the first-level models, second-level models and third-level models; The geometry construction, refinement and rendering are performed in the thread pool.

9. The method according to claim 1, wherein: The 3D model design file is generated by modeling with a computer-aided design (CAD) tool, or is a file in XML, XFL, STP, SAT, IGS, or DXF format generated by a third-party CAD tool.

10. The method according to claim 1, wherein: The 3D model design file includes the material of the associated model, the coordinate system of the associated model, the environment parameters of the associated model and the file of the associated model.

Citation Information

Patent Citations

  • Integration method and device for building model file

    CN111767253A

  • Data processing method and device, electronic equipment, medium and product

    CN115357626A

  • 3D model processing method based on directed acyclic graph and lockless multithreading mode

    CN117591123A

  • Systems using computation graphs for flow solvers

    US20220066755A1

  • Cloud-based general parameterized model parsing method and design system

    WO2021174660A1