Three-dimensional model generation method and device and computer equipment
The structured features and design parameters are obtained through text analysis and simulation models, and combined with code generation of large models to generate modeling code, solving the problems of three-dimensional model size deviation and engineering-level precision requirements in the existing technology, realizing the high-precision design of three-dimensional models and CAD tool compatibility.
Patent Information
- Application Number
- CN202510409048.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-25
AI Technical Summary
In the existing three-dimensional model generation scheme, the three-dimensional model has dimensional deviations, which cannot meet the engineering-level precision requirements, and is difficult to perform secondary design and directly use in professional CAD tools, with low engineering practical value and high loss of repetitive work resources.
Structured features and performance constraints are obtained through text analysis, large-scale models are used to analyze design requirements description text, and the target design parameter scheme is obtained by using simulation models, and the modeling code is generated by combining the code to generate modeling code. Finally, the target three-dimensional model is generated through modeling tools.
It improves the accuracy and reliability of three-dimensional model design, meets engineering-level precision needs, supports secondary design and is directly used in professional CAD tools, and reduces the loss of repetitive work resources.
Smart Images

Figure CN120374840A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of large model technologies, and particularly to a three-dimensional model generation method, apparatus, and computer device. Background Art
[0002] With the development of large model technologies, large models have begun to be applied to the field of generating three-dimensional models. Users can input information through natural language descriptions into the large model, and the large model can directly generate corresponding three-dimensional model files.
[0003] However, in existing solutions for generating three-dimensional model files, the resulting three-dimensional models have problems with dimensional deviations and cannot meet the engineering-level precision requirements. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a three-dimensional model generation method, apparatus, and computer device that can improve the accuracy of three-dimensional model generation.
[0005] In a first aspect, this application provides a three-dimensional model generation method, including:
[0006] Obtain a design requirement description text input for a target three-dimensional model to be generated;
[0007] Input the design requirement description text into a pre-trained text parsing large model, and parse the design requirement description text through the text parsing large model to obtain structured features and performance constraints for the target three-dimensional model;
[0008] Input the structured features and the performance constraints into a pre-trained simulation large model, and obtain a target design parameter solution for the target three-dimensional model through the simulation large model;
[0009] Input the target design parameter solution into a pre-trained code generation large model, and generate modeling code corresponding to the target three-dimensional model through the code generation large model;
[0010] Run the modeling code through a preset modeling tool to generate the target three-dimensional model.
[0011] In one embodiment, the obtaining a target design parameter solution that matches the performance constraints through the simulation large model includes:
[0012] Through the simulation large model, obtain multiple initial design parameter solutions established based on the structured features, and prediction performance data of three-dimensional models generated by each of the initial design parameter solutions;
[0013] Obtain candidate design parameter solutions whose predicted performance data meets the performance constraints from each of the initial design parameter solutions, and perform multi-objective optimization on the candidate design parameter solutions based on the predicted performance data of each candidate design parameter solution to obtain optimized design parameter solutions;
[0014] Obtain the evaluation information of each optimized design parameter solution, and obtain the target design parameter solution from the optimized candidate design parameter solutions according to the evaluation information.
[0015] In one embodiment, the predicted performance data is composed of sub-predicted performance data corresponding to multiple performance evaluation indicators; the obtaining of the evaluation information of each optimized design parameter solution includes:
[0016] According to the design requirement description text, obtain the index weights corresponding to each performance evaluation indicator;
[0017] Based on each index weight and each sub-predicted performance data in the predicted performance data corresponding to the current optimized design parameter solution, obtain the evaluation information of the current optimized design parameter solution; the current optimized design parameter solution is any one of the optimized design parameter solutions.
[0018] In one embodiment, the training steps of the code generation large model include:
[0019] Obtain historical three-dimensional model design instances, and extract historical design description texts, historical design parameter solutions, and historical modeling codes from the historical three-dimensional model design instances;
[0020] Input the historical design description text and the historical design parameter solution into the base large model to obtain predicted modeling codes;
[0021] Based on the difference between the predicted modeling code and the historical modeling code, obtain a loss value;
[0022] Based on the loss value, perform fine-tuning training on the base large model to obtain the code generation large model.
[0023] In one embodiment, after generating the target three-dimensional model, it further includes:
[0024] In response to a parameter modification operation on the target design parameter solution, obtain the modified design parameter solution;
[0025] Input the modified design parameter solution into the code generation large model to obtain the modified modeling code;
[0026] Run the modified modeling code through the modeling tool to obtain the modified three-dimensional model.
[0027] In one embodiment, after generating the target 3D model, the following steps are further included:
[0028] In response to an operation of adding a component to the target 3D model, obtain the target component code corresponding to the added component from a pre-stored structured component code library;
[0029] Obtain the assembly information input for the added component, and obtain the target assembly logic code corresponding to the assembly information from a pre-stored assembly logic code library;
[0030] Input the target component code, the target assembly logic code, and the modeling code into the code generation large model to obtain the modeling code after adding the component;
[0031] Run the modeling code after adding the component through a preset modeling tool to obtain the 3D model after adding the component.
[0032] In one embodiment, obtaining the target component code corresponding to the added component from the pre-stored structured component code library includes:
[0033] In the case that there is no standard component in the structured component code library that matches the parameters of the added component, obtain a candidate standard component whose parameters are closest to those of the added component;
[0034] In response to a selection operation on the candidate standard component, use the component code of the selected candidate standard component as the target component code.
[0035] In one embodiment, after generating the target 3D model, the following steps are further included:
[0036] Obtain error feedback information for the target 3D model, and input the error feedback information into the text parsing large model to obtain adjusted structured features and performance constraints;
[0037] Input the adjusted structured features and performance constraints into the simulation large model to obtain an adjusted target design parameter scheme;
[0038] Input the adjusted target design parameter scheme into the code generation large model to obtain adjusted modeling code;
[0039] Run the adjusted modeling code through a preset modeling tool to obtain the 3D model adjusted for the error feedback information.
[0040] In a second aspect, the present application further provides a 3D model generation device, including:
[0041] A text acquisition module, configured to acquire a design requirement description text input for a target 3D model to be generated;
[0042] A text parsing module, configured to input the design requirement description text into a pre-trained large text parsing model, and parse the design requirement description text through the large text parsing model to obtain structured features and performance constraints for the target 3D model;
[0043] A simulation design module, configured to input the structured features and the performance constraints into a pre-trained large simulation model, and obtain a target design parameter scheme for the target 3D model through the large simulation model;
[0044] A code generation module, configured to input the target design parameter scheme into a pre-trained large code generation model, and generate modeling code corresponding to the target 3D model through the large code generation model;
[0045] A 3D model generation module, configured to run the modeling code through a preset modeling tool to generate the target 3D model.
[0046] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.
[0047] For the above 3D model generation method, device and computer device, the structured features and performance constraints in the design requirement description text are parsed through a large text parsing model, then a target design parameter scheme for the target 3D model is obtained through a large simulation model, then modeling code generated based on the target design parameter scheme is generated through a large code generation model, and finally the modeling code is run through a modeling tool to generate the target 3D model; the present application accurately understands the design requirements through a large text parsing model, performs accurate parameter calculation through a large simulation model, and accurately converts design parameters into modeling code through a large code generation model, improving the accuracy and reliability of 3D model design, and finally achieving an improvement in the modeling accuracy of the 3D model generation scheme through a large model. Description of the Drawings
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0049] Figure 1 It is a schematic flowchart of a 3D model generation method in an embodiment;
[0050] Figure 2 It is a schematic flow chart of the steps for obtaining a target design parameter scheme in an embodiment;
[0051] Figure 3 It is a schematic flow chart of the steps for obtaining the evaluation information of the optimized design parameter scheme in an embodiment;
[0052] Figure 4 It is a structural block diagram of a three-dimensional model generation device in an embodiment;
[0053] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0054] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] Currently, the process of converting user natural language into a corresponding three-dimensional model through a large model is as follows: In the first stage, a multi-view diffusion model is used to generate multi-view images. These multi-view images capture the texture and geometric priors of the three-dimensional asset from different perspectives, relaxing the task from single-view reconstruction to multi-view reconstruction; in the second stage, a feed-forward reconstruction model is introduced to process the multi-view images generated in the first stage. This model can reconstruct the three-dimensional asset. The feed-forward reconstruction model learns to process the noise and inconsistencies introduced by multi-view diffusion and uses the available information in the images to recover the three-dimensional structure; finally, this model can achieve three-dimensional generation for any input single view. It can be seen that the existing large model processes three-dimensional modeling by achieving three-dimensional generation through a single view, and the sizes of each part in the three-dimensional model cannot be controlled. Therefore, the existing technology has the following disadvantages:
[0056] Insufficient modeling accuracy: The three-dimensional models generated by the existing technology have problems such as insufficient details or dimensional deviations, and the three-dimensional models cannot meet the engineering-level precise requirements.
[0057] Lack of editing ability: The three-dimensional models generated by the existing technology are usually fixed mesh model files, such as obj format, and it is difficult to perform secondary design or adjustment.
[0058] Lack of engineering friendliness: The three-dimensional models generated by the existing technology cannot be directly used in professional CAD tools, and the engineering practical value is low.
[0059] High resource consumption for repetitive work: In daily design, it may be necessary to frequently draw standard parts and assemble them, and the processing process based on the existing technology is time-consuming.
[0060] Therefore, to further improve the modeling accuracy of 3D modeling and ensure that the 3D model has sufficient details and accurate dimensions, it is urgent to provide a 3D model generation method that can improve the modeling accuracy.
[0061] In an exemplary embodiment, as Figure 1 shown, a 3D model generation method is provided. In this embodiment, taking the application of this method to a terminal as an example, it can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0062] Step S102, obtain the design requirement description text input for the target 3D model to be generated.
[0063] Among them, the target 3D model can refer to a model with a three-dimensional spatial structure that the user's requirements ultimately need to generate, such as a mechanical part model, a product design model, an electrical equipment model, etc. Specifically, such as a gear, a motor, a bearing, a battery protection case, etc.
[0064] Among them, the design requirement description text can refer to the design requirements of the target 3D model described by the user in natural language, such as information on the shape, size, function, material, performance, etc. of the model.
[0065] Exemplarily, the user can input the design requirements for the target 3D model in text form into the system through an input device (such as a keyboard, a voice input device, etc.), and the system can then obtain the design requirement description text input for the target 3D model to be generated.
[0066] Step S104, input the design requirement description text into a pre-trained large text parsing model, and parse the design requirement description text through the large text parsing model to obtain the structured features and performance constraints for the target 3D model.
[0067] Among them, the large text parsing model can refer to a large language model (LLM, Large Language Model) that has been pre-trained with a large amount of text data for processing natural language, and is used to understand natural language text and parse and extract structured features and performance constraints from the design requirement description text.
[0068] Among them, the structured features can refer to the features of the structured representation of the target 3D model, such as the geometric shape parameters and topological structure of the 3D model, and the structured features can be extracted from the design requirement description text.
[0069] Among them, the performance constraint can refer to the restrictive conditions on the performance of the target 3D model, such as strength, weight, resource consumption, running performance, etc.; the resource consumption can refer to the resources that need to be consumed by the target 3D model during the actual production process.
[0070] Exemplarily, the obtained design requirement description text is input into a pre-trained large text parsing model. Through operations such as semantic understanding, keyword extraction, and information classification of the design requirement description text by the large text parsing model, finally, the large text parsing model converts the information in the design requirement description text into structured features and performance constraints for the target 3D model. For example, from the design requirement description text of "design a cube Hertz with a side length of 5 cm that can withstand a pressure of 50 N", the structured features "cube, side length 5 cm" and the performance constraint "can withstand a pressure of 50 N" are extracted; another example is from the design requirement description text of "I need a mobile phone case, 140 mm long, 70 mm wide, 10 mm thick, with an oval hole 80 mm long and 50 mm wide in the middle, and the resource consumption of the mobile phone case is not higher than the value A", the structured features "mobile phone case, 140 mm long, 70 mm wide, 10 mm thick, with an oval hole 80 mm long and 50 mm wide in the middle" and the performance constraint "resource consumption is not higher than the value A" are extracted; and another example is from the design requirement description text of "design a range extender special generator with structural parameters B, the highest efficiency is not less than 95%, the resource consumption is not higher than C, and the weight is not higher than D kg", the structured features "range extender special generator, structural parameters B" and the performance constraint "the highest efficiency is not less than 95%, the resource consumption is not higher than C, and the weight is not higher than D kg" are extracted.
[0071] Step S106, input the structured features and performance constraints into a pre-trained large simulation model, and obtain the target design parameter solution of the target 3D model through the large simulation model.
[0072] Among them, the large simulation model can refer to a large model trained with a large amount of simulation data, which can simulate and predict the performance performance of the target 3D model according to the input structured features and performance constraints, and output a design parameter solution.
[0073] Among them, the target design parameter solution can refer to the specific parameters required to generate the target 3D model, such as size, shape parameters, material properties and other parameters, which can make the generated model meet the requirements of performance constraints and structured features.
[0074] Exemplarily, the obtained structured features and performance constraints are input into a pre-trained large simulation model. The large simulation model will obtain the performance performance of multiple design parameter solutions through simulation, and obtain the target design parameter solution of the target 3D model through an optimization algorithm.
[0075] Step S108: Input the target design parameter scheme into a pre-trained large model for code generation, and generate the modeling code corresponding to the target 3D model through the large model for code generation.
[0076] Among them, the large model for code generation can refer to a large model that can generate modeling code for creating a target 3D model according to the input target design parameter scheme.
[0077] Among them, the modeling code can refer to the program code used to create a target 3D model in a preset modeling tool, and different programming languages and code formats are required for different modeling tools.
[0078] Exemplarily, input the target design parameter scheme into the pre-trained large model for code generation. The large model for code generation generates the corresponding modeling code according to the syntax rules of the preset modeling tool and the parameters in the target design parameter scheme. For example, if tool A is used for modeling, the large model for code generation will generate the A code for creating the target 3D model.
[0079] Step S110: Run the modeling code through a preset modeling tool to generate the target 3D model.
[0080] Among them, the modeling tool can refer to a software tool used to create and edit 3D models.
[0081] Exemplarily, input the generated modeling code into the preset modeling tool to run. The modeling tool will create the target 3D model according to the instructions in the modeling code. For example, when the modeling code is the A code, that is, use tool A corresponding to the A code for modeling, and tool A generates the corresponding 3D model in the software interface according to the description of the A code.
[0082] In the above method for generating a 3D model, the structured features and performance constraints in the design requirement description text are parsed through a large model for text parsing, and then the target design parameter scheme of the target 3D model is obtained through a large model for simulation. Then, the modeling code generated by the large model for code generation based on the target design parameter scheme is used. Finally, the target 3D model can be generated by running the modeling code through a modeling tool; in this application, the design requirements are accurately understood through the large model for text parsing, precise parameter calculation is performed through the large model for simulation, and the design parameters are accurately converted into modeling code through the large model for code generation, improving the accuracy and reliability of 3D model design, and ultimately achieving an improvement in the modeling accuracy of the 3D model generation scheme through the large model.
[0083] In an exemplary embodiment, as Figure 2 shown, obtaining the target design parameter scheme that matches the performance constraints through the large model for simulation may include the following steps:
[0084] Step S202: Obtain multiple initial design parameter solutions established based on structured features through a simulation large model, as well as the predicted performance data of the 3D models generated by each initial design parameter solution.
[0085] Among them, the initial design parameter solution can refer to a series of preliminary design parameter combinations generated by the simulation large model based on the structured features of the target 3D model; each initial design parameter solution represents a possible design direction.
[0086] Among them, the predicted performance data can refer to the data obtained by the simulation large model simulating the performance of the 3D model that can be generated for each initial design parameter solution under specific conditions. For example, the performance constraints can include Constraint A, Constraint B, and Constraint C. The simulation large model performs simulations on each initial design parameter solution to obtain the simulation results corresponding to each initial design parameter solution. The simulation results can include: performance data A corresponding to Constraint A, performance data B corresponding to Constraint B, and performance data C corresponding to Constraint C. The performance data A, performance data B, and performance data C are used as the predicted performance data of the 3D model.
[0087] Exemplarily, the simulation large model generates multiple different initial design parameter solutions according to the input structured features, using its own algorithms and pre-trained knowledge. These solutions can be obtained by combining within the parameter value range allowed by the structured features. The simulation large model performs simulation on each initial design parameter solution to simulate the performance of the 3D model generated according to this solution in actual applications, so as to obtain the corresponding predicted performance data. In some examples, if the predicted simulation duration exceeds the duration threshold during the simulation of the initial design parameter solution by the simulation large model, a preset surrogate model can be enabled to perform the simulation on this initial design parameter solution, so as to obtain the corresponding predicted performance data. The preset surrogate model can be obtained by training another model through the simulation large model. Through the surrogate model, synchronous simulation processing with the simulation large model can be realized, avoiding the situation where the simulation of the simulation large model takes too long in a certain simulation, resulting in a reduction in the overall processing efficiency.
[0088] Step S204: Obtain candidate design parameter solutions whose predicted performance data meet the performance constraints from each initial design parameter solution, and perform multi-objective optimization on the candidate design parameter solutions based on the predicted performance data of each candidate design parameter solution to obtain optimized design parameter solutions.
[0089] Among them, the candidate design parameter solution can refer to the design parameter solution selected from multiple initial design parameter solutions whose predicted performance data meet the requirements of the performance constraints.
[0090] Among them, multi-objective optimization may refer to finding a set of optimal design parameter solutions through a certain algorithm when there are multiple conflicting objectives, so that each objective can be satisfied to a certain extent. In some embodiments, it is to process the candidate design parameter solutions and balance the different performance indicators corresponding to different prediction performance data to obtain a better design parameter solution.
[0091] Among them, the optimized design parameter solution may refer to the design parameter solution obtained after multi-objective optimization processing, and a better balance is achieved among the corresponding performance indicators on the premise of meeting the performance constraints.
[0092] Exemplarily, the simulation large model screens out the solutions whose prediction performance data meet the performance constraints from all the initial design parameter solutions and uses these solutions as candidate design solutions. For example, if the performance constraint is not exceeding performance indicator A, then meeting the performance constraint means that the prediction performance data cannot exceed performance indicator A; another example is that the performance constraint is not exceeding performance indicator B, not less than performance indicator C, and not less than performance indicator D, then meeting the performance constraint means that the prediction performance data cannot exceed performance indicator B, is greater than or equal to performance indicator C, and is greater than or equal to performance indicator D. The specific performance constraints are subject to the actual application, and only examples are given here without any restrictive effect. The simulation large model determines multiple optimization objectives based on the prediction performance data and performance constraints of each candidate design parameter solution, and then uses the multi-objective optimization algorithm to iteratively optimize the candidate design parameter solutions, continuously adjusting the parameters to improve each objective, and finally obtaining the optimized design parameter solution.
[0093] Among them, the multi-objective optimization algorithm may include genetic algorithms, particle swarm algorithms, etc. Taking the NSGA-III algorithm in the genetic algorithm as an example below, the iterative optimization process of the above multi-objective optimization algorithm will be described:
[0094] The candidate design parameter solutions may include: candidate design parameter solution 1 (individual 1), candidate design parameter solution 2 (individual 2), ……, candidate design parameter solution n (individual n), where n is determined during the actual application process; assume the performance constraints include not exceeding performance metric E, not being lower than performance metric F, and not exceeding performance metric G, and the multiple optimization objectives may include: Objective 1: The closer the data related to performance metric E in the predicted performance data is to performance metric E, the better. For example, if the value of performance metric E is 100, among the three data with values of 68, 75, and 86 respectively, the data with the value of 86 is the closest to 100, so the data with the value of 86 is the optimal data; Objective 2: The farther the data related to performance metric F in the predicted performance data is from performance metric F, the better; Objective 3: The farther the data related to performance metric G in the predicted performance data is from performance metric G, the better. Take individuals 1 to n as the initial population of the NSGA-III algorithm, and then first perform non-dominated sorting on the above initial population through the NSGA-III algorithm, dividing the population into different non-dominated levels. For example, if individual 1 is better than individual 2 in all objectives (Objective 1, 2, 3), then individual 1 dominates individual B, and the individuals not dominated by any other individuals are classified into the first layer (non-dominated layer), and then these individuals are removed from the population, and the above comparison process is repeated for the remaining individuals to obtain the second layer, the third layer, etc., until all individuals are classified into a certain non-dominated layer; next, according to the above multiple optimization objectives, generate a set of uniformly distributed reference points, and the reference points can be set according to actual needs in practical applications, and calculate the crowding distance of each individual from the reference point; then select parent individuals based on the reference points, giving priority to selecting individuals located in the lower non-dominated layer and closer to the reference point; then perform crossover and mutation operations on the selected parent individuals to generate an offspring population; next, merge the parent population and the offspring population to form a new mixed population; then perform non-dominated sorting on the mixed population to update the non-dominated layer and crowding distance of each individual; finally, check whether the termination conditions are met, such as reaching a preset number of iterations, population convergence, or meeting certain performance metrics, etc. If the termination conditions are met, output the non-dominated solutions in the current population as an approximate solution (Pareto optimal solution) of the Pareto front, otherwise return to the operation of selecting parent individuals based on the reference point above and continue the iteration. According to the Pareto optimal solutions (optimized design parameter solutions) corresponding to each non-dominated layer obtained by the above process, obtain the Pareto optimal solution set.
[0095] Step S206, obtain the evaluation information of each optimized design parameter solution, and obtain the target design parameter solution from the optimized candidate design parameter solutions according to the evaluation information.
[0096] Among them, the evaluation information may refer to the information obtained after comprehensively evaluating the optimized design parameter solutions. Through the evaluation information, the advantages and disadvantages of each optimized design parameter solution can be comprehensively measured.
[0097] Among them, the target design parameter solution may refer to the design parameter solution that best meets the design requirements finally determined from all optimized design parameter solutions according to the evaluation information, and is used to generate the target 3D model subsequently.
[0098] Exemplarily, the evaluation information of each optimized design parameter solution is obtained through a preset evaluation method, and all optimized design parameter solutions are compared and sorted according to the evaluation information, and the solution with the best evaluation information is selected as the target design parameter solution.
[0099] In this embodiment, through multi-objective optimization and comprehensive evaluation, it is possible to balance multiple objectives on the basis of meeting performance constraints, obtain a better target design parameter solution, and thus improve the overall design quality of the target 3D model.
[0100] In an exemplary embodiment, the predicted performance data is composed of sub-predicted performance data corresponding to multiple performance evaluation indicators; as Figure 3 shown, obtaining the evaluation information of each optimized design parameter solution includes steps S302 to S304. Among them:
[0101] Step S302, according to the design requirement description text, obtain the index weights corresponding to each performance evaluation indicator.
[0102] Among them, the performance evaluation indicator may be a specific standard or parameter for measuring the performance of the target 3D model. Different types of 3D models may have different performance evaluation indicators. For example, the 3D model of a motor may have indicators such as motor efficiency, manufacturing resource loss, and motor weight.
[0103] Among them, the sub-predicted performance data may refer to the predicted performance data for each specific performance evaluation indicator. For example, if the performance evaluation indicator of the 3D model of a motor is "motor efficiency", the corresponding sub-predicted performance data is the predicted efficiency value of the model in terms of output mechanical power / input electric power.
[0104] Among them, the index weight is used to reflect the importance of each performance evaluation indicator in the overall design requirements.
[0105] Exemplarily, the simulation large model deeply analyzes the design requirement description text, such as keyword extraction, semantic understanding, etc., identifies the descriptions of the importance of each performance evaluation index therein, and assigns corresponding weights to each performance evaluation index according to these descriptions. For example, if the design requirement description text mentions that "the strength performance of this model is very important, and the heat dissipation performance is secondary", then the weight of the "strength" evaluation index may be assigned 0.7, and the weight of the "heat dissipation" evaluation index may be assigned 0.3. Another example, if the design requirement description text mentions that "the target motor design considers loss resources, motor efficiency, and motor weight, and requires the highest cost performance", then the weight of the "motor efficiency" evaluation index may be 0.4, the weight of the "loss resources" evaluation index may be 0.5, and the weight of the "motor weight" evaluation index may be 0.1. Still another example, if the design requirement description text mentions that "the target motor design considers loss resources, motor efficiency, and motor weight, and requires the highest motor efficiency", then the weight of the "motor efficiency" evaluation index may be 0.6, the weight of the "loss resources" evaluation index may be 0.3, and the weight of the "motor weight" evaluation index may be 0.1.
[0106] Step S304, based on each index weight and each sub-predicted performance data in the predicted performance data corresponding to the current optimized design parameter scheme, obtain the evaluation information of the current optimized design parameter scheme; the current optimized design parameter scheme is any one of the optimized design parameter schemes.
[0107] Exemplarily, for the current optimized design parameter scheme, obtain the sub-predicted performance data corresponding to each performance evaluation index from its predicted performance data, based on each performance evaluation index and its corresponding sub-predicted performance data, obtain the evaluation value corresponding to each performance evaluation index, and then multiply each evaluation value by the corresponding index weight and sum them to obtain the evaluation information of the current optimized design parameter scheme.
[0108] In this embodiment, by determining the index weights of the performance evaluation indexes according to the design requirement description text, the evaluation information can more accurately reflect the importance degree of each performance evaluation index in the actual design, so that the evaluation result is more in line with the actual requirements.
[0109] In an exemplary embodiment, the training steps of the code generation large model may specifically include the following steps:
[0110] Step S11, obtain historical three-dimensional model design instances, and extract historical design description texts, historical design parameter schemes, and historical modeling codes from the historical three-dimensional model design instances.
[0111] Among them, the historical 3D model design example can refer to a 3D model design case that has been completed in the past, containing the complete process information from the proposal of design requirements to the final generation of the 3D model. The historical design description text can refer to the text content used to describe the design requirements in the historical 3D model design example. The historical design parameter scheme can refer to the combination of specific design parameters corresponding to the historical 3D model design example. The historical modeling code can refer to the code actually used to create the 3D model in the historical design.
[0112] Step S12: Input the historical design description text and the historical design parameter scheme into the base large model to obtain the predicted modeling code.
[0113] Among them, the base large model can refer to a language model that has been pre-trained on a large amount of general data and has powerful language understanding and generation capabilities.
[0114] Among them, the predicted modeling code can refer to the modeling code generated by the base large model based on the input historical design description text and historical design parameter scheme, and can be a prediction of the code that should be generated by the base large model based on its own learning and reasoning capabilities.
[0115] Step S13: Obtain the loss value based on the difference between the predicted modeling code and the historical modeling code.
[0116] Step S14: Fine-tune and train the base large model based on the loss value to obtain the code generation large model.
[0117] Among them, fine-tuning training can refer to further training the model on the basis of the base large model using specific training data (i.e., data related to the historical 3D model design example), and by adjusting the model's parameters, making the model more adaptable to a specific task (i.e., generating modeling code according to the design description text and design parameter scheme).
[0118] Among them, the code generation large model can refer to the model obtained after fine-tuning training, and can accurately generate the corresponding 3D model modeling code only according to the input design parameter scheme.
[0119] Exemplarily, historical 3D model design instances are obtained, and each historical 3D model design instance is analyzed to extract historical design description texts, historical design parameter schemes, and historical modeling codes. The extracted historical design description texts and historical design parameter schemes are input and passed to the base large model. The base large model uses its own language understanding and generation mechanisms to process and analyze the input information, and then generates a predicted modeling code. The predicted modeling code is compared with the historical modeling code, and a suitable loss function is used to calculate the difference between them to obtain a loss value. Based on the loss value, the base large model is fine-tuned. The above steps can be repeated for continuous iterative training until a preset training stop condition is met. At this time, the obtained model is the code generation large model.
[0120] In this embodiment, by using historical 3D model design instances for training, the model can learn the correspondence between design descriptions, design parameters, and modeling codes, so as to more accurately generate appropriate modeling codes according to the input design parameters in actual applications, reducing the error rate of code generation.
[0121] In addition, before the above training process, other fine-tuning training can be pre-performed on the base large model. For example, the standard component coding system can be input to the base large model to train the large model so that when component-related information is input, the output is the code corresponding to the component. The typical component assembly logic tree can also be input to the base large model to train the large model so that when component assembly information is input, the assembly logic code can be output. Through the above fine-tuning training, the model can be adapted to a specific 3D model design field. Compared with the general base large model, the code generation large model is more professional and efficient in processing 3D model modeling code generation tasks and can better meet the needs of actual design work.
[0122] In an exemplary embodiment, after generating the target 3D model, the following steps may further be included:
[0123] Step S21, in response to a parameter modification operation on the target design parameter scheme, obtain the modified design parameter scheme.
[0124] Among them, the parameter modification operation may refer to an operation in which a user changes some parameters in the current target design parameter scheme.
[0125] Step S22, input the modified design parameter scheme into the code generation large model to obtain the modified modeling code.
[0126] Step S23, run the modified modeling code through a modeling tool to obtain the modified 3D model.
[0127] Exemplarily, the user can modify the parameters in the target design parameter scheme through the interaction interface. For example, the user can modify the size, shape parameters, or material properties of the model, etc.; after the user completes the parameter modification operation, the system obtains the modified design parameter scheme, and then inputs the modified design parameter scheme into the code generation large model. The code generation large model processes the input modified design parameter scheme to generate the corresponding modified modeling code, and then inputs the modified modeling code into the preset modeling tool. The modeling tool operates according to the instructions in the modified modeling code to reconstruct the three-dimensional model, and finally obtains the modified three-dimensional model.
[0128] In this embodiment, it is allowed to modify the target design parameter scheme and quickly generate the modified three-dimensional model, which can adjust the design scheme in a timely manner according to the actual situation and new requirements, without having to start the entire design process from scratch, improving the flexibility and operability of the design.
[0129] In an exemplary embodiment, after generating the target three-dimensional model, the following steps may further be included:
[0130] Step S31, in response to the component addition operation for the target three-dimensional model, obtain the target component code corresponding to the added component from the pre-stored structured component code library.
[0131] Among them, the component addition operation may refer to the operation instruction for the user to add a new component to the generated target three-dimensional model.
[0132] Among them, the structured component code library may refer to a pre-stored database containing various types of component codes, which are organized in a structured manner, and each component code corresponds to a specific three-dimensional component and can be searched and called.
[0133] Among them, the target component code may refer to the code screened from the structured component code library and corresponding to the component to be added by the user.
[0134] Step S32, obtain the assembly information input for the added component, and obtain the target assembly logic code corresponding to the assembly information from the pre-stored assembly logic code library.
[0135] Among them, the assembly information may refer to the relevant information input by the user on how the added component is assembled with the target three-dimensional model. Among them, the assembly logic code library may refer to a pre-stored database containing various assembly logic codes. Among them, the target assembly logic code may refer to the code obtained from the assembly logic code library and matching the assembly information input by the user.
[0136] Step S33: Input the target component code, the target assembly logic code, and the modeling code into the code generation large model to obtain the modeling code after adding the component.
[0137] Among them, the modeling code after adding the component can refer to the new code generated by the code generation large model after processing according to the target component code, the target assembly logic code, and the original modeling code, and is used to create a three-dimensional model including the newly added component.
[0138] Step S34: Run the modeling code after adding the component through a preset modeling tool to obtain the three-dimensional model after adding the component.
[0139] Among them, the three-dimensional model after adding the component can refer to the three-dimensional model generated by running the modeling code after adding the component through a preset modeling tool. This model adds a new component on the basis of the original target three-dimensional model and is assembled according to the specified assembly information.
[0140] Exemplarily, the user initiates an operation to add a component to the target three-dimensional model, specifying the type and features of the component to be added. The system searches and matches in the pre-stored structured component code library according to the user's requirements to find the target component code corresponding to the newly added component. The user inputs the assembly information for the newly added component, such as the specific position of the newly added component in the model, the connection relationship with other components, etc. The system searches for the corresponding target assembly logic code in the pre-stored assembly logic code library based on this assembly information. Input the obtained target component code, target assembly logic code, and the original modeling code into the code generation large model. The code generation large model integrates, analyzes, and processes these input codes to generate the modeling code after adding the component. Input the modeling code after adding the component into a preset modeling tool. The modeling tool operates according to the instructions in the modeling code after adding the component, adds a new component on the basis of the original target three-dimensional model, and assembles it according to the target assembly logic code, finally generating the three-dimensional model after adding the component.
[0141] In this embodiment, through the pre-stored structured component code library and assembly logic code library, the user can quickly obtain the required component code and assembly logic code, avoiding the cumbersome process of writing code from scratch, shortening the time for adding components, and improving the design efficiency of the three-dimensional model. In addition, by using the structured component code library and assembly logic code library, the design and assembly methods of components can be standardized, and the standardization and normalization of three-dimensional model design can be improved.
[0142] In an exemplary embodiment, obtaining the target component code corresponding to the newly added component from the pre-stored structured component code library may include the following steps: In the case where there is no standard component in the structured component code library that matches the parameters of the newly added component, obtain the candidate standard component with the closest parameters to the newly added component; in response to the selection operation on the candidate standard component, use the component code of the selected candidate standard component as the target component code.
[0143] Among them, the parameters of the newly added component may refer to a set of data describing the characteristics of the newly added component, which is used for matching and searching in the structured component code library. The standard component may refer to a component that is predefined in the structured component code library and has specific parameters and specifications. The candidate standard component may refer to the standard component that is closest to the parameters of the newly added component found in the library when there is no standard component in the structured component code library that exactly matches the parameters of the newly added component.
[0144] Exemplarily, after the system receives the component addition operation initiated by the user, according to the parameters of the newly added component input by the user, it conducts a comprehensive search and matching in the pre-stored structured component code library. Check whether there is a standard component in the library that exactly matches the parameters of the newly added component. If there is no such standard component, proceed to the next step. The system will traverse all the standard components in the structured component code library, calculate the similarity or distance between the parameters of each standard component and the parameters of the newly added component. Screen out the standard components that are closest to the parameters of the newly added component, and use these standard components as candidate standard components. The system displays the information of the candidate standard components to the user, which can be presented in a list or other visual ways, facilitating the user to view the relevant parameters and characteristics of each candidate standard component. The user makes a selection operation on the candidate standard components according to their own needs and judgments. The system responds to the user's selection and determines the component code of the selected candidate standard component as the target component code.
[0145] In this embodiment, in the case where there is no standard component in the structured component code library that exactly matches the parameters of the newly added component, by selecting the candidate standard component that is closest, it is possible to recommend suitable standard components and also prompt possible design problems of the newly added component, such as whether the size of the newly added component is standard and whether it matches the target 3D model, improving the design accuracy.
[0146] In an exemplary embodiment, after generating the target 3D model, the following steps may further be included:
[0147] Step S41, obtain the error feedback information for the target 3D model, and input the error feedback information into the text parsing large model to obtain the adjusted structured features and performance constraints.
[0148] Among them, the error feedback information can refer to the relevant information about the errors in the model obtained through actual testing, evaluation, or comparison with the expected design after generating the target 3D model, which is used to guide the adjustment and optimization of the model.
[0149] Among them, the adjusted structured features can refer to the new structured features obtained after the large text parsing model corrects and adjusts the original result features according to the error feedback information. The adjusted performance constraints can refer to the new performance constraint conditions obtained after the large text parsing model adjusts the original performance constraints according to the error feedback information.
[0150] Step S42: Input the adjusted structured features and performance constraints into the simulation large model to obtain the adjusted target design parameter scheme.
[0151] Step S43: Input the adjusted target design parameter scheme into the code generation large model to obtain the adjusted modeling code.
[0152] Step S44: Run the adjusted modeling code through a preset modeling tool to obtain the 3D model adjusted for the error feedback information.
[0153] Exemplarily, obtain the error feedback information for the target 3D model, input the error feedback information into the large text parsing model. The large text parsing model conducts semantic understanding and analysis on it, combines the original structured features and performance constraints, and generates the adjusted structured features and performance constraints. Input the adjusted structured features and performance constraints into the simulation large model. The simulation large model re-simulates according to the new input to obtain the adjusted target design parameter scheme. Input the adjusted target design parameter scheme into the code generation large model to obtain the adjusted modeling code, and then input the adjusted modeling code into the preset modeling tool. The modeling tool executes the adjusted modeling code to create the 3D model adjusted for the error feedback information.
[0154] In this embodiment, by using the error feedback information to adjust the 3D model, the problems existing in the 3D model can be corrected, making the adjusted 3D model more in line with the actual requirements and design requirements, thereby improving the quality and performance of the model. At the same time, this feedback adjustment process can optimize the large text parsing model, the simulation large model, and the code generation large model.
[0155] In an exemplary embodiment, the present application also provides a method for automatically generating a 3D model based on a large model, which is applied to a preset chat cad platform. The chat cad platform includes a pre-trained text parsing, a pre-trained simulation large model, a pre-trained code generation large model, and a preset modeling tool. The method includes the following steps:
[0156] Step S1, obtain the design requirement description text input for the target 3D model to be generated; among them, the design requirement description text can be obtained by the user through text input or by voice input. For example, the design requirement description text can be "Design a range extender dedicated generator with structural parameter B, requiring the peak power to be greater than or equal to two hundred kilowatts, the highest efficiency to be not less than ninety percent, and ensuring low resource loss."
[0157] Step S2, input the design requirement description text into the pre-trained text parsing large model, and parse the design requirement description text through the text parsing large model to obtain the structural features and performance constraints for the target 3D model. For example, the obtained structural features can be "range extender dedicated generator, structural parameter B", and the performance constraints can be "peak power greater than or equal to two hundred kilowatts, highest efficiency not less than ninety percent, low resource loss".
[0158] Step S3, input the structural features and performance constraints into the pre-trained simulation large model. Through the simulation large model, obtain multiple initial design parameter solutions established based on the structural features, and the predicted performance data of the 3D models generated by each initial design parameter solution; obtain the candidate design parameter solutions whose predicted performance data meet the performance constraints from each initial design parameter solution, and perform multi-objective optimization on the candidate design parameter solutions based on the predicted performance data of each candidate design parameter solution to obtain the optimized design parameter solution; the predicted performance data consists of sub-predicted performance data corresponding to multiple performance evaluation indicators; according to the design requirement description text, obtain the index weights corresponding to each performance evaluation indicator; based on each index weight and each sub-predicted performance data in the predicted performance data corresponding to the current optimized design parameter solution, obtain the evaluation information of the current optimized design parameter solution; the current optimized design parameter solution is any one of the optimized design parameter solutions; obtain the target design parameter solution from the optimized candidate design parameter solutions according to the evaluation information. For example, the simulation large model generates initial design parameter solutions that meet the constraints (such as rotor outer diameter ≤ stator inner diameter - 1mm (assembly gap), winding temperature ≤ 120°C (material heat resistance limit), resource loss ≤ budget upper limit (such as 1500 units of resources), but allows the algorithm to adjust the weights during optimization) based on the historical case library and physical laws, and then uses them as the initial population of the optimization algorithm for dynamic optimization iteration:
[0159] Adopt the improved NSGA-III algorithm for multi-objective optimization, and execute in each round of iteration:
[0160] a. Physical simulation calculation: Perform multi-field coupling simulation on the current parameter combination to obtain performance data;
[0161] b. Large model proxy evaluation: When the simulation takes a long time, the predictive performance of the proxy model for large model training can be enabled to accelerate iteration;
[0162] c. Conflict constraint mediation: Analyze constraint conflicts (such as the game between "resource loss" and "efficiency") through a large model, and dynamically adjust the weight coefficients;
[0163] Among them, the optimization objective functions (metrics to be optimized) include: Efficiency: For example, motor efficiency (output mechanical power / input electrical power), which needs to be maximized. Resource loss: For example, manufacturing resource loss (material resources + processing resources), which needs to be minimized. Weight: For example, the total mass of the motor (kg), which needs to be minimized.
[0164] d. Pareto front update: Retain the non-dominated solution set and eliminate inferior solutions.
[0165] Optimal solution output: Generate a Pareto optimal solution set (candidate motor designs) and recommend the parameter solution with the highest comprehensive score.
[0166] Exemplarily, the comprehensive scoring process can be as follows:
[0167] 1. Generate candidate solutions: After the above multi-objective optimization process, multiple "candidate motor designs" are obtained, for example:
[0168] Solution A: High efficiency (94%), but expensive resource loss (1300), light weight (8.5 kg).
[0169] Solution B: Medium efficiency (92%), moderate resource loss (1100), medium weight (9 kg).
[0170] Solution C: Low efficiency (90%), cheap resource loss (900), heavy weight (10 kg).
[0171] 2. Unify the scoring criteria: Convert different metrics (efficiency, resource loss, weight) into 0 - 1 points:
[0172] Efficiency: The highest 94% gets 1 point, the lowest 90% gets 0 point, and the middle is calculated proportionally (e.g., 92% gets 0.5 point).
[0173] Resource loss: The lowest 900 gets 1 point, the highest $1300 gets 0 point, and the middle is calculated proportionally (e.g., 1100 gets 0.5 point).
[0174] Weight: The lightest 8.5 kg gets 1 point, the heaviest 10 kg gets 0 point, and the middle is calculated proportionally (e.g., 9 kg gets 0.67 point).
[0175] 3. Dynamically adjust the "priority weight": The large model automatically assigns importance to different metrics according to the current design requirements:
[0176] If the user values cost - effectiveness more: The weight of resource consumption is 50%, efficiency is 40%, and weight is 10%.
[0177] If the user pursues extreme performance: The weight of efficiency is 60%, resource consumption is 30%, and weight is 10%.
[0178] 4. Calculate the total score and recommend the best solution: Weight - sum the scores of each solution according to the weights:
[0179] Solution A: Efficiency score of 1 × 40%+Resource consumption score of 0 × 50%+Weight score of 1 × 10% = 0.5 points.
[0180] Solution B: Efficiency score of 0.5 × 40%+Resource consumption score of 0.5 × 50%+Weight score of 0.67 × 10%≈0.52 points.
[0181] Solution C: Efficiency score of 0 × 40%+Resource consumption score of 1 × 50%+Weight score of 0 × 10% = 0.5 points.
[0182] Result: Solution B has the highest total score (0.52) because it balances resource consumption, efficiency, and weight best.
[0183] The above - mentioned technical idea is as follows: Optimization goal: Want the motor to be "high - efficiency, low - resource - consumption, and light - weight" (the three are mutually contradictory). Optimization process: Use an algorithm to find a batch of "non - compromising" candidate solutions (such as A, B, C). Comprehensive scoring: According to the current requirements (such as cost - saving first), assign "importance ratios" to each metric, calculate the total score, and recommend the solution with the highest total score. The objective function is the direction to be optimized (such as efficiency, resource consumption). The comprehensive scoring is the compromise result after "assigning weights according to needs". There is no absolute optimum, only the design that best meets the current requirements.
[0184] In step S4, input the target design parameter solution into the pre - trained code - generating large model, and generate the modeling code corresponding to the target 3D model through the code - generating large model; among them, the training steps of the code - generating large model include: obtaining historical 3D model design instances, extracting historical design description texts, historical design parameter solutions, and historical modeling codes from the historical 3D model design instances; inputting the historical design description texts and historical design parameter solutions into the base large model to obtain predicted modeling codes; obtaining a loss value based on the difference between the predicted modeling code and the historical modeling code; and performing fine - tuning training on the base large model based on the loss value to obtain the code - generating large model.
[0185] This application also provides a pseudo - code example:
[0186] # Automatically generate the 3D model of the motor
[0187] import cadquery as cq
[0188] # Geometric construction based on simulation parameters
[0189] stator_od = {params['stator_outer_diameter']}
[0190] air_gap = {params['air_gap_length']}
[0191] # Stator construction (parameter direct pass-through)
[0192] stator = (cq.Workplane("XY")
[0193] .circle(stator_od / 2)
[0194] .extrude({params['core_length']}))
[0195] # Rotor assembly (parameter association)
[0196] rotor = (cq.Workplane("XY", origin=(0, 0, air_gap))
[0197] .circle({params['rotor_diameter'] / 2})
[0198] .extrude({params['core_length']}))
[0199] # Permanent magnet generation (parametric array)
[0200] for i in range({params['pole_pairs']}):
[0201] angle = 360 * i / {params['pole_pairs']}
[0202] magnet = cq.Workplane("XZ").moveTo({params['magnet_offset']}, 0)
[0203] .rect({params['magnet_width']}, {params['magnet_height']})
[0204] .extrude({params['magnet_length']})
[0205] rotor = rotor.union(magnet.rotate((0, 0, 0), (0, 0, 1), angle))
[0206] # Output parameter verification flag
[0207] show_object(stator, name='stator_ver_{params["version"]}')
[0208] show_object(rotor, name='rotor_opt_{params["optimizer_id"]}')
[0209] Example of input parameters:
[0210] sim_params = {
[0211] # Stator structure parameters
[0212] "stator_outer_diameter": 205.3, # Stator outer diameter (unit: mm), obtained by electromagnetic simulation optimization
[0213] "core_length": 150, # Core axial length (unit: mm), affecting power density
[0214] # Air gap parameters
[0215] "air_gap_length": 0.8, # Air gap length (unit: mm), determining magnetic reluctance of the magnetic circuit
[0216] # Rotor parameters
[0217] "rotor_diameter": 120.5, # Rotor outer diameter (unit: mm), designed to match the inner diameter of the stator
[0218] "pole_pairs": 8, # Number of pole pairs, determined by electromagnetic scheme optimization
[0219] # Permanent magnet parameters (per pole)
[0220] "magnet_width": 15, # Magnet width (unit: mm), affecting magnetic flux distribution
[0221] "magnet_height": 30, # Magnet thickness (unit: mm), determines the magnetic flux density
[0222] "magnet_length": 140, # Axial length of the magnet (unit: mm), aligned with the iron core
[0223] "magnet_offset": 65.2, # Magnet offset distance (unit: mm), optimizes the leakage magnetic design
[0224] # System identification parameters
[0225] "version": "FEA_v12", # Simulation version identification, associated with finite element analysis settings
[0226] "optimizer_id": "OPT_009" # Optimizer number, records the version of the parameter generation algorithm
[0227] }
[0228] After obtaining the modeling code, logical verification and optimization can be performed: The system performs logical verification on the generated code to ensure that the model is correctly constructed, and optimizes parameters such as model complexity and mesh density to improve the running efficiency and model accuracy.
[0229] Step S5, run the modeling code through a preset modeling tool to generate a target 3D model.
[0230] After generating the target 3D model, it is also possible to respond to a parameter modification operation on the target design parameter scheme to obtain the modified design parameter scheme; input the modified design parameter scheme into the code generation large model to obtain the modified modeling code; run the modified modeling code through the modeling tool to obtain the modified 3D model.
[0231] After generating the target 3D model, it is also possible to, in response to an operation of adding a component to the target 3D model, obtain the target component code corresponding to the added component from a pre-stored structured component code library; obtain the assembly information input for the added component, and obtain the target assembly logic code corresponding to the assembly information from a pre-stored assembly logic code library; input the target component code, the target assembly logic code, and the modeling code into a code generation large model to obtain the modeling code after adding the component; run the modeling code after adding the component through a preset modeling tool to obtain the 3D model after adding the component. Among them, in the case where there is no standard component in the structured component code library that matches the parameters of the added component, obtain a candidate standard component whose parameters are closest to those of the added component; in response to a selection operation on the candidate standard component, use the component code of the selected candidate standard component as the target component code. For example, when inputting "Add a GB5783 bolt, M10*30", the system will automatically generate the corresponding part code. Another example is that when the user inputs "Assemble an M10 bolt onto the mobile phone case with the bolt head protruding 2 millimeters", the system will automatically adjust the position and size of the bolt. Boolean operations (such as subtraction operations) can be used to verify and optimize the combination results.
[0232] Through the above process, it can be achieved that during the running process, multiple verifications and debuggings are supported to ensure meeting the user's requirements. For example: Real-time optimization suggestions: During the design process, the system can provide intelligent suggestions based on the user's input. For example: Recommend suitable standard components. Prompt possible design problems (such as too small hole diameter causing processing difficulties). Parametric dynamic adjustment: The generated 3D model has parametric characteristics, and the user can update the model in real time by adjusting the parameters.
[0233] The generated target 3D model can also be exported in multiple formats: The model can be exported to mainstream 3D file formats (such as.obj, step, iges, stl, etc.) to meet the needs of different design and manufacturing scenarios. Support for retaining high-precision meshes and parametric characteristics is provided, facilitating continued editing on other platforms.
[0234] After generating the target 3D model, it is also possible to obtain error feedback information for the target 3D model, input the error feedback information into a text parsing large model to obtain adjusted structured features and performance constraints; input the adjusted structured features and performance constraints into a simulation large model to obtain an adjusted target design parameter scheme; input the adjusted target design parameter scheme into a code generation large model to obtain adjusted modeling code; run the adjusted modeling code through a preset modeling tool to obtain a 3D model adjusted for the error feedback information.
[0235] The above method for automatically generating a 3D model based on a large model may include the following beneficial effects: improving design efficiency: automatically generating a parametric CAD model through natural language input, significantly reducing repetitive drawing work and lowering manual operation costs. Enhancing model accuracy: generating a CAD model based on parametric design that meets engineering accuracy requirements through text parsing large models, simulation large models, and code large models, and can be directly used for secondary design and detail optimization. Strengthening compatibility: supporting multiple CAD tools and file formats to meet the needs of different software platforms and industrial scenarios. Simplifying the engineering process: reducing repetitive work in component drawing and assembly, enabling engineers to focus on design innovation. Standardizing design resources: improving the standardization and consistency of models by incorporating standard components and assembly logic.
[0236] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.
[0237] Based on the same inventive concept, the embodiments of the present application also provide a 3D model generation device for implementing the above-mentioned 3D model generation method. The solution provided by this device to solve problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the 3D model generation device provided below can refer to the limitations on the 3D model generation method in the above text, and will not be repeated here.
[0238] In an exemplary embodiment, as Figure 4 shown, a 3D model generation device 900 is provided, including: a text acquisition module 901, a text parsing module 902, a simulation design module 903, a code generation module 904, and a 3D model generation module 905, where:
[0239] The text acquisition module 901 is configured to acquire a design requirement description text input for the target 3D model to be generated;
[0240] The text parsing module 902 is used to input the above-mentioned design requirement description text into a pre-trained large text parsing model, and parse the above-mentioned design requirement description text through the above-mentioned text parsing model to obtain the structural features and performance constraints for the above-mentioned target 3D model;
[0241] The simulation design module 903 is used to input the above-mentioned structural features and the above-mentioned performance constraints into a pre-trained large simulation model, and obtain the target design parameter scheme of the above-mentioned target 3D model through the above-mentioned simulation model;
[0242] The code generation module 904 is used to input the above-mentioned target design parameter scheme into a pre-trained large code generation model, and generate the modeling code corresponding to the above-mentioned target 3D model through the above-mentioned code generation model;
[0243] The 3D model generation module 905 is used to run the above-mentioned modeling code through a preset modeling tool to generate the above-mentioned target 3D model.
[0244] In an exemplary embodiment, the above-mentioned simulation design module 903 is further used to obtain, through the above-mentioned simulation model, a plurality of initial design parameter schemes established based on the above-mentioned structural features, and the predicted performance data of the 3D models generated by each of the above-mentioned initial design parameter schemes; obtain candidate design parameter schemes whose predicted performance data meets the above-mentioned performance constraints from each of the above-mentioned initial design parameter schemes, and perform multi-objective optimization on the above-mentioned candidate design parameter schemes based on the predicted performance data of each of the above-mentioned candidate design parameter schemes to obtain an optimized design parameter scheme; obtain the evaluation information of each of the above-mentioned optimized design parameter schemes, and obtain the above-mentioned target design parameter scheme from the above-mentioned optimized candidate design parameter schemes according to the above-mentioned evaluation information.
[0245] In an exemplary embodiment, the above-mentioned predicted performance data is composed of sub-predicted performance data corresponding to a plurality of performance evaluation indicators; the above-mentioned simulation design module 903 is further used to obtain the index weights corresponding to each of the above-mentioned performance evaluation indicators according to the above-mentioned design requirement description text; based on each of the above-mentioned index weights and each of the sub-predicted performance data in the predicted performance data corresponding to the current optimized design parameter scheme, obtain the evaluation information of the above-mentioned current optimized design parameter scheme; the above-mentioned current optimized design parameter scheme is any one of each of the above-mentioned optimized design parameter schemes.
[0246] In an exemplary embodiment, the above three-dimensional model generation device further includes a model training module, which is used to obtain historical three-dimensional model design instances, extract historical design description texts, historical design parameter schemes, and historical modeling codes from the historical three-dimensional model design instances; input the historical design description texts and the historical design parameter schemes into a base large model to obtain predicted modeling codes; obtain a loss value based on the difference between the predicted modeling codes and the historical modeling codes; and perform fine-tuning training on the base large model based on the loss value to obtain the above code generation large model.
[0247] In an exemplary embodiment, the above three-dimensional model generation device further includes a parameter modification module, which is used to obtain a modified design parameter scheme in response to a parameter modification operation on the target design parameter scheme; input the modified design parameter scheme into the above code generation large model to obtain a modified modeling code; and run the modified modeling code through the above modeling tool to obtain a modified three-dimensional model.
[0248] In an exemplary embodiment, the above three-dimensional model generation device further includes a component addition module, which is used to obtain a target component code corresponding to the newly added component from a pre-stored structured component code library in response to a component addition operation on the target three-dimensional model; obtain assembly information input for the newly added component, and obtain a target assembly logic code corresponding to the assembly information from a pre-stored assembly logic code library; input the target component code, the target assembly logic code, and the above modeling code into the above code generation large model to obtain a modeling code after component addition; and run the modeling code after component addition through a preset modeling tool to obtain a three-dimensional model after component addition.
[0249] In an exemplary embodiment, the above component addition module is further used to obtain a candidate standard component whose parameters are closest to those of the newly added component in the case where there is no standard component in the structured component code library that matches the parameters of the newly added component; and in response to a selection operation on the candidate standard component, use the component code of the selected candidate standard component as the above target component code.
[0250] In an exemplary embodiment, the above three-dimensional model generation device further includes a feedback adjustment module, which is used to obtain error feedback information for the target three-dimensional model and input the error feedback information into the above text parsing large model to obtain adjusted structured features and performance constraints.
[0251] Input the adjusted structured features and performance constraints into the above simulation large model to obtain the adjusted target design parameter solution; input the adjusted target design parameter solution into the above code generation large model to obtain the adjusted modeling code; run the above adjusted modeling code through a preset modeling tool to obtain a three-dimensional model adjusted for the above error feedback information.
[0252] Each module in the above three-dimensional model generation device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0253] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a three-dimensional model generation method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0254] Those skilled in the art can understand that Figure 5 the structure shown in
[0255] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0256] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0257] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0258] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0259] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0260] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in the present application.
[0261] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A three-dimensional model generation method, characterized in that, The method includes: Obtaining a design requirement description text input for a target 3D model to be generated; Inputting the design requirement description text into a pre-trained text parsing large model, and parsing the design requirement description text through the text parsing large model to obtain the structured features and performance constraints for the target 3D model; Inputting the structured features and the performance constraints into a pre-trained simulation large model, and obtaining a target design parameter scheme for the target 3D model through the simulation large model; Inputting the target design parameter scheme into a pre-trained code generation large model, and generating modeling code corresponding to the target 3D model through the code generation large model; Running the modeling code through a preset modeling tool to generate the target 3D model.
2. The method according to claim 1, characterized in that The obtaining of the target design parameter scheme that matches the performance constraints through the simulation large model includes: Through the simulation large model, obtaining a plurality of initial design parameter schemes established based on the structured features, and prediction performance data of 3D models generated by each of the initial design parameter schemes; Obtaining candidate design parameter schemes whose prediction performance data meets the performance constraints from each of the initial design parameter schemes, and performing multi-objective optimization on the candidate design parameter schemes based on the prediction performance data of each of the candidate design parameter schemes to obtain optimized design parameter schemes; Obtaining evaluation information of each of the optimized design parameter schemes, and obtaining the target design parameter scheme from the optimized candidate design parameter schemes according to the evaluation information.
3. The method according to claim 2, wherein The prediction performance data is composed of sub-prediction performance data corresponding to a plurality of performance evaluation indicators; the obtaining of the evaluation information of each of the optimized design parameter schemes includes: According to the design requirement description text, obtaining the index weights corresponding to each of the performance evaluation indicators; Based on each of the index weights and each sub-prediction performance data in the prediction performance data corresponding to the current optimized design parameter scheme, obtaining the evaluation information of the current optimized design parameter scheme; the current optimized design parameter scheme is any one of each of the optimized design parameter schemes.
4. The method according to claim 1, wherein The training steps of the code generation large model include: Obtaining historical 3D model design instances, and extracting historical design description texts, historical design parameter schemes, and historical modeling codes from the historical 3D model design instances; Inputting the historical design description text and the historical design parameter scheme into a base large model to obtain predicted modeling codes; Based on the difference between the predicted modeling code and the historical modeling code, obtaining a loss value; Performing fine-tuning training on the base large model based on the loss value to obtain the code generation large model.
5. The method according to claim 1, characterized in that After generating the target 3D model, it further includes: In response to a parameter modification operation on the target design parameter scheme, obtaining a modified design parameter scheme; Inputting the modified design parameter scheme into the code generation large model to obtain a modified modeling code; Running the modified modeling code through the modeling tool to obtain a modified 3D model.
6. The method according to claim 1, characterized in that, After generating the target 3D model, it further includes: In response to an operation of adding a component to the target 3D model, obtain a target component code corresponding to the added component from a pre-stored structured component code library; Obtain the assembly information input for the added component, and obtain a target assembly logic code corresponding to the assembly information from a pre-stored assembly logic code library; Input the target component code, the target assembly logic code, and the modeling code into the code generation large model to obtain the modeling code after the component addition; Run the modeling code after the component addition through a preset modeling tool to obtain a 3D model after the component addition.
7. The method according to claim 6, wherein Obtaining the target component code corresponding to the added component from the pre-stored structured component code library includes: In the case where there is no standard component in the structured component code library that matches the parameters of the added component, obtain a candidate standard component whose parameters are closest to those of the added component; In response to a selection operation on the candidate standard component, use the component code of the selected candidate standard component as the target component code.
8. The method according to claim 1, characterized in that, After generating the target 3D model, it further includes: Obtain error feedback information for the target 3D model, and input the error feedback information into the text parsing large model to obtain adjusted structured features and performance constraints; Input the adjusted structured features and performance constraints into the simulation large model to obtain an adjusted target design parameter solution; Input the adjusted target design parameter solution into the code generation large model to obtain adjusted modeling code; Run the adjusted modeling code through a preset modeling tool to obtain a 3D model adjusted for the error feedback information.
9. A three-dimensional model generation device, characterized in that, The device includes: A text acquisition module for acquiring a design requirement description text input for a target 3D model to be generated; A text parsing module for inputting the design requirement description text into a pre-trained text parsing large model, and parsing the design requirement description text through the text parsing large model to obtain structured features and performance constraints for the target 3D model; A simulation design module for inputting the structured features and the performance constraints into a pre-trained simulation large model, and obtaining a target design parameter solution for the target 3D model through the simulation large model; A code generation module for inputting the target design parameter solution into a pre-trained code generation large model, and generating modeling code corresponding to the target 3D model through the code generation large model; A 3D model generation module for running the modeling code through a preset modeling tool to generate the target 3D model.
10. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Cited By
Optimization design method and system for mechanical part driven by large model
CN120822304A
Three-dimensional static layout scheme generation method based on LLM supporting iterative correction
CN121615456A
A three-dimensional static layout scheme generation method based on an LLM supporting iterative correction
CN121615456B
Hierarchical text-driven three-dimensional modeling method, device and medium
CN122021065A