Search

CN-121999123-A - Intelligent modeling method, system, equipment and medium applied to CAD

CN121999123ACN 121999123 ACN121999123 ACN 121999123ACN-121999123-A

Abstract

The invention belongs to the technical field of CAD modeling, and particularly relates to an intelligent modeling method, system, equipment and medium applied to CAD, which comprises the steps of obtaining text content input by a user; the method comprises the steps of generating a target model by splitting text content into a plurality of execution steps for model generation through semantic understanding, gradually generating the target model according to the sequence of the execution steps, inputting text description corresponding to each execution step and a submodel generated by the previous execution step into a pre-trained large language model to obtain a corresponding command sequence, wherein the command sequence comprises a label token, a numerical token and a pointer token, generating a new model structure according to the pointing relation of a face and/or an edge defined by the pointer token, an operation type defined by the label token and a parameter value defined by the numerical token in the command sequence, and generating the updated model as a new submodel on the corresponding face and/or edge of the submodel generated by the previous execution step until the target model is obtained.

Inventors

  • QI DACHENG

Assignees

  • 忆生科技(深圳)有限公司

Dates

Publication Date
20260508
Application Date
20251202

Claims (10)

  1. 1. An intelligent modeling method applied to CAD, which is characterized by comprising the following steps: Acquiring text content input by a user; splitting the text content into a plurality of execution steps for model generation through semantic understanding so as to gradually generate a target model according to the sequence of the execution steps; Inputting the text description corresponding to each execution step and the submodel generated in the previous execution step into a pre-trained large language model to obtain a corresponding command sequence, wherein the command sequence comprises a label token, a numerical token and a pointer token; And generating a new model structure according to the pointing relation of the surface and/or edge defined by the pointer token, the operation type defined by the label token and the parameter value defined by the numerical token in the command sequence, and taking the updated model as a new sub-model as a whole until the target model is obtained.
  2. 2. The intelligent modeling method for CAD according to claim 1, wherein the target model and the sub-model in the generating process thereof are both represented in B-rep format, and for each execution step, the text description corresponding to the target model and the sub-model generated in the previous execution step are input into a pre-trained large language model to obtain the corresponding command sequence, comprising: Generating a corresponding undirected surface adjacency graph according to geometric information of the surfaces and edges in the sub-model constructed based on the B-rep, and inputting the text description of the current execution step and the undirected surface adjacency graph of the sub-model generated in the last execution step into the large language model to obtain a corresponding command sequence.
  3. 3. The intelligent modeling method for CAD according to claim 2, wherein said step of generating a corresponding undirected surface adjacency graph from geometric information of surfaces and edges in the sub-model constructed based on B-rep comprises: For each side in the sub-model constructed based on B-rep, uniformly sampling a plurality of nodes along a parameter curve defined by the side, and calculating three-dimensional coordinates, tangents and first derivatives of each node to serve as side characteristics of the sub-model; Uniformly sampling a plurality of nodes along a parameter curved surface defined by each surface in the sub-model constructed based on the B-rep, and calculating the three-dimensional coordinates, the normal line and the Gaussian curvature of each node to serve as the surface characteristics of the sub-model; And sequentially inputting the edge features and the surface features of the submodels into a convolutional neural network and a multi-layer perceptron to generate a corresponding undirected surface adjacency graph.
  4. 4. The intelligent modeling method for CAD according to claim 3, wherein the step of generating a corresponding undirected surface adjacency graph from geometric information of surfaces and edges in the sub-model constructed based on B-rep further comprises: Using a graph convolution neural network of a k layer to correlate the edge characteristics and the surface characteristics in the undirected surface adjacent graph, and obtaining an updated undirected surface adjacent graph so as to input the undirected surface adjacent graph and the text description of the current execution step into the large language model; Each layer in the graph convolution neural network sequentially correlates edge features and surface features in the undirected surface adjacent graph, and the edge features after the k-layer graph convolution processing are expressed as follows: , the surface characteristics after the k-layer graph rolling process are expressed as follows: , is a multi-layer sensor, which is a multi-layer sensor, Is a preset, a learnable scalar quantity, Representing all edge features adjacent to the face to which the face feature i corresponds, Representing the mapping of edge features into a face feature space, Representing the multi-headed attentiveness mechanism, Representing a sub-model in a graph roll-up neural network All of the face features in the layer.
  5. 5. The intelligent modeling method for CAD according to claim 1, wherein the language modeling head in the large language model is replaced with three different feature solution terminals, which are respectively used for extracting the corresponding tag token, the numerical token, and the pointer token from the feature data obtained by fusing the text description of the current execution step and the submodel generated by the previous execution step, and generating the command sequence according to the extracted tag token, the numerical token, and the pointer token.
  6. 6. The intelligent modeling method for CAD according to claim 1, wherein the step of generating a new model structure on the corresponding face and/or edge of the sub-model generated in the previous execution step based on the pointing relationship of the face and/or edge defined by the pointer token, the operation type defined by the tag token, and the parameter value defined by the numerical token in the command sequence comprises: identifying a surface and/or an edge with highest cosine similarity with the pointer token from surfaces and edges contained in the submodel based on the pointer token in the command sequence, and generating a base as a model; and generating a corresponding model structure on the model generation base according to the operation type defined by the tag token in the command sequence, and taking the parameter value defined by the numerical token in the command sequence as a generation standard of the model structure.
  7. 7. The intelligent modeling method applied to CAD as claimed in claim 1, wherein said large language model is trained as a loss function: And (2) and , , Wherein, the Is the increment of Cronecker and In order for the correct category to be present, For the number of categories to be considered, As a result of the label smoothing factor, For the prediction probability of the class i, And Candidate sets of valid and invalid pointer tokens respectively, For the predicted token of the pointer, As a candidate set for the pointer token j, As a function of the S-type, As a temperature parameter that can be learned, And And respectively presetting contribution parameters for the loss terms.
  8. 8. An intelligent modeling system for CAD, comprising: the text input module is used for acquiring text content input by a user; the semantic understanding module is used for splitting the text content into a plurality of execution steps for model generation through semantic understanding so as to gradually generate a target model according to the sequence of the execution steps; The model generation module is used for inputting the corresponding text description and the sub-model generated in the last execution step into a pre-trained large language model to obtain a corresponding command sequence, wherein the command sequence comprises a label token, a numerical token and a pointer token, and generating a new model structure on the corresponding surface and/or edge of the sub-model generated in the last execution step according to the pointing relation of the surface and/or edge defined by the pointer token in the command sequence, the operation type defined by the label token and the parameter value defined by the numerical token, and taking the updated model as a new sub-model until the target model is obtained.
  9. 9. An electronic device comprising a processor coupled to a memory, the memory storing program instructions that when executed by the processor implement the method of any one of claims 1to 7.
  10. 10. A computer readable storage medium comprising a program which, when run on a computer, causes the computer to perform the method of any one of claims 1 to 7.

Description

Intelligent modeling method, system, equipment and medium applied to CAD Technical Field The invention belongs to the technical field of CAD modeling, and particularly relates to an intelligent modeling method, system, equipment and medium applied to CAD. Background In recent years, CAD modeling methods based on artificial intelligence have received attention, with the objective of automatically generating a CAD model containing modeling steps and modeling parameters from descriptive information input by a user. To meet the needs of different application scenarios, various algorithmic frameworks have been proposed, including random generation, text-based conditional generation, multi-modal conditional generation, and large language model-based generation, among others. However, the existing modeling algorithm adopts a traditional parameter vector representation method, six parameters (three coordinate parameters and three rotation parameters) are needed to determine the position of the sketch plane in a three-dimensional space for each sketch plane, and two-dimensional coordinates are needed to determine the position information of each line segment in the two-dimensional sketch plane, so that the problem of misalignment and non-intersection caused by errors is very easy to occur. For example, when a new model structure needs to be generated on a certain face and/or edge of a model, a plurality of parameters are required to determine its position information. Therefore, the conventional parametric vector representation has many limitations, such as failing to choose any existing edge or face, and failing to perform chamfering and rounding operations. Disclosure of Invention In view of the above-described shortcomings of the prior art, an object of the present invention is to provide an intelligent modeling method applied to CAD, which can guide model generation by introducing pointer information to represent the pointing relationship of faces and/or edges, so as to smoothly complete common and complex operations such as rounding, chamfering, and the like. The intelligent modeling method applied to CAD comprises the steps of obtaining text content input by a user, splitting the text content into a plurality of execution steps used for model generation through semantic understanding, gradually generating a target model according to the sequence of the execution steps, inputting text description corresponding to each execution step and a submodel generated in the previous execution step into a pre-trained large language model to obtain a corresponding command sequence, wherein the command sequence comprises a label token, a numerical token and a pointer token, and generating a new model structure on the corresponding surface and/or the side of the submodel generated in the previous execution step according to the pointing relation of the surface and/or the side defined by the pointer token, the operation type defined by the label token and the parameter value defined by the numerical token in the command sequence until the target model is obtained. In an embodiment of the present invention, the object model and the sub-model in the generating process thereof are both represented in a B-rep format, and for each executing step, the corresponding text description and the sub-model generated in the last executing step are input into a pre-trained large language model to obtain a corresponding command sequence, which includes generating a corresponding undirected surface adjacency graph according to geometric information of the surfaces and edges in the sub-model constructed based on B-rep, and inputting the text description of the current executing step and the undirected surface adjacency graph of the sub-model generated in the last executing step into the large language model to obtain the corresponding command sequence. In one embodiment of the invention, the step of generating the corresponding undirected surface adjacency graph according to the geometric information of the surfaces and edges in the sub-model constructed based on B-rep comprises the steps of uniformly sampling a plurality of nodes along a parameter curve defined by each edge in the sub-model constructed based on B-rep, calculating three-dimensional coordinates, tangents and first derivatives of each node to serve as edge characteristics of the sub-model, uniformly sampling a plurality of nodes along a parameter curve defined by each surface in the sub-model constructed based on B-rep, calculating three-dimensional coordinates, normals and Gaussian curvatures of each node to serve as surface characteristics of the sub-model, and sequentially inputting the edge characteristics and the surface characteristics of the sub-model into a convolutional neural network and a multi-layer sensor to generate the corresponding undirected surface adjacency graph. In an embodiment of the present invention, the step of generating the corresponding undirected su