3D printing method, system, device, medium and program in virtual environment
Through the 3D printing method in the virtual environment, the high-quality printing path and virtual printer modeling are used to plan the high-quality printing path and virtual printer modeling, and the efficiency and quality problems of traditional 3D printing technology in different environments are solved, and efficient and accurate virtual simulation and Real-time rendering improves printing efficiency and resource utilization.
Patent Information
- Application Number
- CN202411203357.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Traditional 3D printing technology is difficult to adapt to different printing environments in real physical environments, resulting in poor printing quality and low efficiency, and easy to waste consumables.
Using 3D printing methods in a virtual environment, through multi-dimensional type feature extraction and model quality evaluation, the graph attention model is trained to plan high-quality printing paths, and virtual printer modeling and real-time process rendering are carried out to achieve high-precision simulation of the printing process. and efficiency improvement.
It improves the efficiency and accuracy of 3D printing, saves physical printing resources, reduces waste of consumables, and displays printing effects in real time, making it convenient for users to adjust parameters and improves printing efficiency.
Smart Images

Figure CN118709579B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of virtual simulation technology, and in particular to a 3D printing method, system, device, medium and program in a virtual environment. Background Art
[0002] 3D printing is an advanced manufacturing technology, also known as Additive Manufacturing (AM). Unlike traditional subtractive manufacturing, 3D printing creates objects by stacking materials layer by layer, manufacturing physical objects directly from digital models. This manufacturing method makes design and production more flexible and can produce objects of various shapes and structures, including complex geometries.
[0003] Traditional 3D printing technology is a printing method based on a real physical environment, that is, the printing path is designed according to the 3D model to be printed, and 3D printing is performed in a real physical environment. In actual applications, the printing path design method based on the real physical environment cannot be adapted to various printing environments, which may result in poor printing quality. In addition, if printing errors occur in the real physical environment, it will lead to a waste of printing consumables, which may lead to low efficiency in 3D printing. Summary of the invention
[0004] The present disclosure provides a 3D printing method, system, device, medium and program in a virtual environment, which uses artificial intelligence methods to analyze high-quality printing paths, uses a virtual engine to render model printing results, and performs animation rendering on the printing process, thereby realizing 3D printing in a virtual environment, realizing high-precision simulation of 3D printing, saving resources for physical printing of samples, and improving the efficiency of 3D printing.
[0005] In a first aspect, the present disclosure provides a 3D printing method in a virtual environment, comprising: performing multi-dimensional type feature extraction and model quality evaluation on a pre-acquired real 3D printing data set to obtain a model geometric feature set, a model printing path set, a model printing quality set and a real printer feature set; training a preset graph attention model according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a printing path planning model; acquiring virtual printing data, and analyzing a virtual printing path corresponding to the virtual printing data according to the printing path planning model; performing virtual printer modeling according to the virtual printing data to obtain a virtual 3D printer; performing printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation.
[0006] In some embodiments, the multi-dimensional type feature extraction and model quality assessment of the pre-acquired real 3D printing data set to obtain a model geometric feature set, a model printing path set, a model printing quality set and a real printer feature set include: type splitting the pre-acquired real 3D printing data set to obtain a real 3D model data set, a real printer parameter group set and a model printing path set; file classification of the real 3D model data set to obtain a model sample file set and a corresponding model slicing file set; feature encoding of each real printer parameter group in the real printer parameter group set to obtain a real printer feature set; file parsing and geometric feature extraction of the model sample file set to obtain a model geometric feature set; printing quality calculation of the model slicing file set to obtain a model printing quality set.
[0007] In some embodiments, the file parsing and geometric feature extraction of the model sample file set to obtain the model geometric feature set includes: format extraction and format parsing of the model sample file set to obtain a parsed sample file set; file header extraction of the parsed sample file set to obtain a sample file header set; content parsing of the parsed sample file set according to the sample file header set to obtain a sample triangle face group set; and geometric feature extraction of the sample triangle face group set to obtain a model geometric feature set.
[0008] In some embodiments, the printing quality calculation of the model slicing file set to obtain the model printing quality set includes: performing file parsing on the model slicing file set to obtain a slicing triangular face group set; performing boundary calculation and boundary size comparison on the slicing triangular face group set to obtain a size accuracy set; performing inter-layer normal vector fluctuation analysis on the slicing triangular face group set to obtain a surface smoothness set; performing inter-layer thickness calculation on the slicing triangular face group set to obtain an inter-layer thickness set; performing wall thickness standard deviation analysis on the slicing triangular face group set to obtain a wall thickness consistency coefficient set; and calculating the model printing quality set based on the size accuracy set, the surface smoothness set, the inter-layer thickness set, and the wall thickness consistency coefficient set.
[0009] In some embodiments, the preset graph attention model is trained according to the model geometric feature set, the model printing path set, the model print quality set and the real printer feature set to obtain a printing path planning model, including: performing a topological graph structure representation on the model geometric feature set according to the preset graph attention model to obtain a graph structure model feature set; performing graph structure encoding on the graph structure model feature set and the real printer feature set using the graph attention model to obtain a graph node input feature set; performing attention weighted update and forward propagation on the graph node input feature set using the graph attention model to obtain an attention printing path set; performing supervised error calculation on the attention printing path set according to the model print quality set and the model printing path set to obtain a path loss set; performing back-propagation optimization on the graph attention model according to the path loss set to obtain a printing path planning model.
[0010] In some embodiments, analyzing the virtual printing path corresponding to the virtual printing data according to the printing path planning model includes: performing type splitting on the virtual printing data to obtain a virtual printer parameter group and a virtual model sample file; performing file parsing and geometric feature extraction on the virtual model sample file to obtain virtual model geometric features; performing topological graph structure representation on the virtual model geometric features to obtain virtual graph structure model features; performing feature encoding on the virtual printer parameter group to obtain virtual printer features; performing graph structure encoding on the virtual graph structure model features and the virtual printer features using the printing path planning model to obtain virtual input features; and performing attention weighting and forward propagation on the virtual input features using the printing path planning model to obtain a virtual printing path.
[0011] In some embodiments, the virtual printer modeling is performed according to the virtual printing data to obtain a virtual 3D printer, including: extracting parameters from the virtual printing data to obtain a virtual printer parameter group; performing parameter decomposition on the virtual printer parameter group to obtain a printer type, a printing process, a printing parameter group, and a material parameter group; performing primary modeling according to the printer type to obtain a virtual printer model; performing material simulation on the virtual printer according to the printing process and the material parameter group to obtain a simulated printer model; and setting parameters on the simulated printer model according to the printing parameter group to obtain a virtual 3D printer.
[0012] In some embodiments, the virtual printing path is subjected to printing simulation and real-time process rendering according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation, including: initializing the engine environment of the virtual 3D printer to obtain a rendering printer; performing file parsing and path frame segmentation on the virtual printing path to obtain a printing path frame; performing dynamic printing simulation on the rendering printer according to the printing path frame to obtain a virtual printing model; performing layer-by-layer animation rendering on the rendering printer according to the printing path frame to obtain a virtual printing animation.
[0013] In a second aspect, the present disclosure provides a 3D printing system in a virtual environment, comprising: a data classification module, used to perform multi-dimensional type feature extraction and model quality evaluation on a pre-acquired real 3D printing data set to obtain a model geometric feature set, a model printing path set, a model printing quality set and a real printer feature set; a model training module, used to train a preset graph attention model according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a printing path planning model; a path planning module, used to obtain virtual printing data, and analyze a virtual printing path corresponding to the virtual printing data according to the printing path planning model; a virtual modeling module, used to perform virtual printer modeling according to the virtual printing data to obtain a virtual 3D printer; a printing rendering module, used to perform printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation.
[0014] In a third aspect, the present disclosure provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of a 3D printing method in a virtual environment described in the above aspect.
[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a 3D printing method in a virtual environment described in the above aspect.
[0016] In a fifth aspect, the present disclosure provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the steps of a 3D printing method in a virtual environment described in the above aspects.
[0017] The present disclosure provides a 3D printing method, system, device, medium and program in a virtual environment. By performing multi-dimensional type feature extraction and model quality assessment, it is possible to extract the quality of the finished product after the printer prints different 3D models according to different printing paths in different printing environments, thereby facilitating subsequent model training for solving a high-quality printing path model.
[0018] By using the collected printing path-related training data to train the graph attention model, it is possible to determine the printing paths corresponding to different 3D models under different printing environments when the printing quality is high. By analyzing the virtual printing path corresponding to the virtual printing data according to the printing path planning model, it is possible to analyze the high-quality printing path suitable for the virtual printing data, thereby improving the efficiency of model printing.
[0019] By modeling a virtual printer according to the virtual printing data to obtain a virtual 3D printer, the printer and printing materials can be virtualized, thereby reducing the waste caused by physical printing. By performing printing simulation and real-time process rendering, physical resources and costs can be saved, and the printing process and the effect of the printed sample can be displayed in real time and vividly, so that users can estimate the printing effect and adjust the printing parameters without waiting for the actual printing time such as heating and dissolving, model cooling and nozzle movement, thereby improving printing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The present disclosure will be described in more detail below based on embodiments and with reference to the accompanying drawings:
[0021] Figure 1 A schematic flow chart of a 3D printing method in a virtual environment according to a first embodiment of the present disclosure is shown.
[0022] Figure 2 A schematic diagram of the process of training a printing path planning model in the first embodiment of the present disclosure is shown.
[0023] Figure 3 A schematic diagram of the process of performing printing simulation and real-time process rendering in the first embodiment of the present disclosure is shown.
[0024] Figure 4 A schematic flow chart of a 3D printing method in a virtual environment according to a second embodiment of the present disclosure is shown.
[0025] Figure 5 The functional module diagram of the 3D printing system in the virtual environment of the third embodiment of the present disclosure is shown.
[0026] In the drawings, the same reference numerals are used for the same components, and the drawings are not drawn to scale. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, and to fully understand and implement how the present disclosure applies technical means to solve technical problems and achieve the corresponding technical effects, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. The embodiments of the present disclosure and the various features in the embodiments can be combined with each other without conflict, and the technical solutions formed are all within the scope of protection of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0029] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Embodiment 1
[0031] Figure 1 The following is a flow chart of a 3D printing method in a virtual environment provided by an embodiment of the present disclosure. Figure 1 As shown, a 3D printing method in a virtual environment includes:
[0032] S1. Perform multi-dimensional type feature extraction and model quality assessment on the pre-acquired real 3D printing data set to obtain a model geometry feature set, a model printing path set, a model printing quality set, and a real printer feature set.
[0033] In detail, each real 3D printing data in the real 3D printing data set contains multiple data for 3D printing in a real physical environment, and the real 3D printing data includes real 3D model data, a real printer parameter group and a corresponding model printing path.
[0034] Specifically, the real 3D model data includes a model sample file of the real printed 3D model and a corresponding model slicing file. The model sample file refers to a model data file in a data format such as STL, OBJ, PLY, etc. The model slicing file refers to various data obtained after slicing and analyzing the real model obtained after printing. The real printer parameter group includes the printer type, resolution, printing speed, build volume, material compatibility, print bed, nozzle, accuracy and stability and post-processing method. The model printing path is a G-code file or a similar path information file, which is used to describe in detail the movement path and movement speed of the printer's print head.
[0035] In detail, each model geometric feature in the model geometric feature set corresponds to the geometric features of the model sample file of the real 3D model data in each real 3D printing data in the real 3D printing data set, including information such as vertices, edges, faces, normals, volume, surface area, curvature, holes and proportions of the model, and each model printing path in the model printing path set corresponds to the model printing path in each real 3D printing data in the real 3D printing data set.
[0036] Specifically, each model printing quality in the model printing quality set corresponds to the quality of the printed model corresponding to the model slicing file in each real 3D printing data in the real 3D printing data set, and the model printing quality includes parameters such as dimensional accuracy, surface smoothness, interlayer thickness and wall thickness consistency coefficient. Each real printer feature in the real printer feature set corresponds to the feature corresponding to the real printer parameter group of each real 3D printing data in the real 3D printing data set.
[0037] In the disclosed embodiment, the multi-dimensional type feature extraction and model quality assessment of the pre-acquired real 3D printing data set to obtain a model geometric feature set, a model printing path set, a model printing quality set and a real printer feature set include: type splitting the pre-acquired real 3D printing data set to obtain a real 3D model data set, a real printer parameter group set and a model printing path set; file classification of the real 3D model data set to obtain a model sample file set and a corresponding model slicing file set; feature encoding of each real printer parameter group in the real printer parameter group set to obtain a real printer feature set; file parsing and geometric feature extraction of the model sample file set to obtain a model geometric feature set; print quality calculation of the model slicing file set to obtain a model print quality set.
[0038] In detail, the type splitting refers to classification according to the data format type of each real 3D printing data in the real 3D printing data set. For example, the data format type of the real 3D model data set is OBJ, FBX or GLTF format, the data format type of the model printing path set is the format of a G-code file, and the data format type of the real printer parameter group set is XML or YAML format.
[0039] Specifically, the file classification refers to splitting each real 3D model data into a model sample file and a corresponding model slice file according to the file identifier of the real 3D model data set. File classification can be performed according to a keyword matching method. For example, the real 3D model data containing the keyword "original" is a model sample file, and the real 3D model data containing the keyword "print" is a model slice file.
[0040] In detail, the feature coding refers to characterizing and fusing the encoding operations on each parameter in the real printer parameter group according to a preset encoding format and sorting scheme to obtain the real printer feature.
[0041] Specifically, the file parsing and geometric feature extraction of the model sample file set to obtain the model geometric feature set includes: format extraction and format parsing of the model sample file set to obtain a parsed sample file set; file header extraction of the parsed sample file set to obtain a sample file header set; content parsing of the parsed sample file set according to the sample file header set to obtain a sample triangle face group set; geometric feature extraction of the sample triangle face group set to obtain a model geometric feature set.
[0042] Specifically, the format extraction refers to analyzing the encoding format of each model sample file in the model sample file set, and the encoding format may be a binary encoding format or an ASCII encoding format. The format parsing refers to parsing each model sample file according to the encoding format.
[0043] In detail, the file header extraction refers to extracting the file header of each parsing sample file in the parsing sample file set, the file header refers to the descriptive information of several bytes at the beginning of the file of the parsing sample file, and the content parsing refers to parsing the partial content of the corresponding parsing sample file in the parsing sample file set except the file header according to each sample file header, and each sample triangle face group in the sample triangle face group set corresponds to a combination of model geometric triangle faces of each model sample file in the model sample file set.
[0044] Specifically, the content parsing method may be parsing using a parsing library such as numpy-stl, trimesh or PyWavefront, and the geometric feature extraction method may be the stl.mesh.Mesh.from_file() method of the numpy-stl library or the pywavefront.Wavefront() method of the PyWavefront library.
[0045] In detail, the printing quality calculation of the model slicing file set is performed to obtain the model printing quality set, including: file parsing of the model slicing file set to obtain a slicing triangular face group set; boundary calculation and boundary size comparison of the slicing triangular face group set to obtain a size accuracy set; inter-layer normal vector fluctuation analysis of the slicing triangular face group set to obtain a surface smoothness set; inter-layer thickness calculation of the slicing triangular face group set to obtain an inter-layer thickness set; wall thickness standard deviation analysis of the slicing triangular face group set to obtain a wall thickness consistency coefficient set; and the model printing quality set is calculated based on the size accuracy set, the surface smoothness set, the inter-layer thickness set and the wall thickness consistency coefficient set.
[0046] Specifically, the boundary calculation refers to extracting the minimum coordinates and maximum coordinates of the model in each slice triangle face group in the slice triangle face group set, thereby calculating the boundary of the model; the size comparison refers to calculating the length, width, and height of the model based on the boundary of the model, and comparing the size with the corresponding model sample file in the model sample file set to obtain the size accuracy.
[0047] In detail, the inter-layer normal vector fluctuation analysis refers to extracting the inter-layer normal vectors corresponding to each slicing triangular face group and calculating the standard deviation of the angles between adjacent normal vectors. The wall thickness standard deviation analysis refers to calculating the standard deviation of the wall thickness corresponding to each slicing triangular face group. The model printing quality is the weighted sum of the dimensional accuracy, the surface smoothness, the inter-layer thickness and the wall thickness consistency coefficient.
[0048] In the disclosed embodiment, by performing multi-dimensional type feature extraction and model quality assessment, the quality of the finished product after the printer prints different 3D models according to different printing paths in different printing environments can be extracted, thereby facilitating subsequent model training for solving high-quality printing paths.
[0049] S2. Train a preset graph attention model according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a printing path planning model.
[0050] In detail, the graph attention network (GAT) is a neural network model for processing graph structure data. It uses the attention mechanism to transfer information between nodes on the graph. The graph attention model introduces the attention mechanism in the process of updating node features, so that each node can weightedly aggregate the information of neighbor nodes according to the importance of neighbor nodes, thereby more effectively capturing the complex relationships in the graph structure. The printing path planning model is a graph attention model whose input is the model geometric features and real printer features, and whose output is the model printing path.
[0051] In the present disclosure, refer to Figure 2 As shown, the preset graph attention model is trained according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a printing path planning model, including:
[0052] S21, performing a topological graph structure representation on the model geometric feature set according to a preset graph attention model to obtain a graph structure model feature set;
[0053] S22, using the graph attention model to perform graph structure encoding on the graph structure model feature set and the real printer feature set to obtain a graph node input feature set;
[0054] S23, using the graph attention model to perform attention weighted update and forward propagation on the graph node input feature set to obtain an attention printing path set;
[0055] S24, performing supervision error calculation on the attention printing path set according to the model printing quality set and the model printing path set to obtain a path loss set;
[0056] S25. Perform back-propagation optimization on the graph attention model according to the path loss set to obtain a printing path planning model.
[0057] Specifically, the topological graph structure representation refers to performing node feature conversion on each model geometric feature in the model geometric feature set according to the topological structure of the model corresponding to the model geometric feature set to obtain a graph structure model feature set.
[0058] In detail, the graph structure encoding refers to using the graph convolution layer of the graph attention model to perform feature convolution encoding on the graph structure model feature set and the real printer feature set, and the attention weighted update refers to using the attention layer of the graph attention model to assign different weights to the features of different nodes in the graph node input feature set.
[0059] Specifically, the supervised error calculation refers to calculating a primary path error set between the model printing path set and the attention printing path set, and using the print quality set to perform supervised weighting on the primary path error set to obtain a path loss set.
[0060] In the disclosed embodiment, by training the preset graph attention model into a printing path planning model, the printing paths corresponding to different 3D models under different printing environments when the printing quality is high can be determined, thereby improving the printing efficiency of the 3D model.
[0061] S3. Acquire virtual printing data, and analyze a virtual printing path corresponding to the virtual printing data according to the printing path planning model.
[0062] In detail, the virtual printing data is the relevant data of the 3D model that needs to be simulated and printed and the printer used for printing. The virtual printing data includes a virtual printer parameter group and a virtual model sample file, wherein the virtual printer parameter group includes the type of printer that needs to be simulated and related printing parameters, and the virtual model sample file refers to the model sample file of the 3D model that needs to be simulated and printed. The virtual printing data can be obtained by using methods such as database retrieval or client input.
[0063] In the disclosed embodiment, the virtual printing path corresponding to the virtual printing data is analyzed according to the printing path planning model, including: performing type splitting on the virtual printing data to obtain a virtual printer parameter group and a virtual model sample file; performing file parsing and geometric feature extraction on the virtual model sample file to obtain virtual model geometric features; performing topological graph structure representation on the virtual model geometric features to obtain virtual graph structure model features; performing feature encoding on the virtual printer parameter group to obtain virtual printer features; performing graph structure encoding on the virtual graph structure model features and the virtual printer features using the printing path planning model to obtain virtual input features; and performing attention weighting and forward propagation on the virtual input features using the printing path planning model to obtain a virtual printing path.
[0064] In detail, the type splitting, the file parsing, the geometric feature extraction and the feature encoding methods are consistent with the method in the above step S1, and the graph structure encoding, the attention weighting and the forward propagation methods are consistent with the method in the above step S2.
[0065] In the disclosed embodiment, by analyzing the virtual printing path corresponding to the virtual printing data according to the printing path planning model, a high-quality printing path suitable for the virtual printing data can be analyzed, thereby improving the efficiency of model printing.
[0066] S4. Modeling a virtual printer according to the virtual printing data to obtain a virtual 3D printer.
[0067] In detail, the virtual 3D printer is a 3D printer used for printing simulation in a virtual environment.
[0068] In the disclosed embodiment, the virtual printer modeling is performed according to the virtual printing data to obtain a virtual 3D printer, including: extracting parameters from the virtual printing data to obtain a virtual printer parameter group; performing parameter decomposition on the virtual printer parameter group to obtain a printer type, a printing process, a printing parameter group, and a material parameter group; performing primary modeling according to the printer type to obtain a virtual printer model; performing material simulation on the virtual printer according to the printing process and the material parameter group to obtain a simulated printer model; and setting parameters on the simulated printer model according to the printing parameter group to obtain a virtual 3D printer.
[0069] In detail, the printer type refers to the model of the printer, such as DJ4825, G3800 or M1520D, etc. The printing process includes Fused Deposition Modeling (FDM), Stereolithography (SLA), Selective Laser Sintering (SLS), Multi Jet Fusion (MJF), Digital Light Processing (DLP), Powder Bed Fusion (PBF) or Material Jetting, etc.
[0070] Specifically, the printing parameter group includes parameters such as printing layer height and printing speed, and the material parameter group includes the geometric shape, color and material of the material.
[0071] In detail, the primary modeling refers to selecting or modeling a virtual printer model corresponding to the printer type, and the material simulation, for example, uses the placement of linear virtual objects to simulate the material of fused deposition modeling, and uses multi-nozzle array virtual objects to simulate PolyJet printing materials.
[0072] In the disclosed embodiment, by modeling a virtual printer according to the virtual printing data to obtain a virtual 3D printer, the virtualization of the printer and printing materials can be achieved, thereby reducing the waste caused by physical printing.
[0073] S5. Perform printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation.
[0074] In detail, the virtual printing model refers to a virtual model obtained by printing and rendering with a virtual 3D printer in a virtual environment, and the virtual printing animation is an animation of the entire process of the virtual 3D printer printing out the virtual printing model.
[0075] In the present disclosure, refer to Figure 3 As shown, the virtual printing path is subjected to printing simulation and real-time process rendering according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation, including:
[0076] S31, initializing the engine environment of the virtual 3D printer to obtain a rendering printer;
[0077] S32, performing file parsing and path frame segmentation on the virtual printing path to obtain a printing path frame;
[0078] S33, performing dynamic printing simulation on the rendering printer according to the printing path frame to obtain a virtual printing model;
[0079] S34, performing layer-by-layer animation rendering on the rendering printer according to the printing path frame to obtain a virtual printing animation.
[0080] In detail, the engine environment can be initialized using 3D rendering engines such as Unity, Unreal Engine, Blender or WebGL, and the file can be parsed using C language. The path frame segmentation refers to splitting the virtual printing path into printing path frames composed of multiple line segments or curves.
[0081] Specifically, the dynamic printing simulation refers to using a running loop to simulate the deposition effect of the rendering material moving in each frame of the printing path frame, and using the deposition effect of the final printing material as a virtual printing model. The layer-by-layer animation rendering refers to the animation process of rendering and printing according to the printing path frame, showing the movement of the print head and the deposition process of the material, and recording the entire process into a virtual printing animation.
[0082] In detail, after performing printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation, the method further includes performing real 3D printing according to the virtual printing model and the virtual printing animation.
[0083] The real 3D printing refers to judging the printing effect according to the virtual printing model, updating the virtual printing data according to the virtual printing animation to obtain updated printing data, and performing physical 3D printing using the updated printing data when the virtual printing model meets the requirements.
[0084] In the disclosed embodiment, by performing printing simulation and real-time process rendering, physical resources and costs can be saved, and the printing process and the effect of the printed sample can be displayed in real time and vividly, so that users can estimate the printing effect and adjust the printing parameters without having to wait for the actual printing time such as heating and dissolving, model cooling, and nozzle movement, thereby improving printing efficiency.
[0085] Embodiment 2
[0086] On the basis of the above embodiments, in order to more clearly understand the present disclosure, refer to Figure 4 As shown, a second embodiment is used below to further explain the situation in which the first embodiment of the present disclosure needs to be more quickly planned for the printing path.
[0087] S41, performing multi-dimensional type feature extraction and model quality assessment on a pre-acquired real 3D printing data set to obtain a model geometry feature set, a model printing path set, a model printing quality set, and a real printer feature set.
[0088] S42. Train a preset graph neural network model according to the model geometric feature set, the model printing path set, the model printing quality set, and the real printer feature set to obtain a standard path planning model.
[0089] In detail, the graph neural network (GNN) is a type of neural network model used to process graph structure data, wherein the graph structure data includes nodes and edges. The standard path planning model is a graph neural network model whose input is model geometric features and printer features and whose output is a printing path.
[0090] Specifically, the preset graph neural network model is trained according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a standard path planning model, including: performing a topological graph structure representation on the model geometric feature set according to the preset graph neural network model to obtain a graph structure model feature set; performing convolutional neural encoding on the graph structure model feature set and the real printer feature set to obtain a standard input feature set; performing forward propagation on the standard input feature set using the graph neural network model to obtain a standard printing path set; performing supervised error calculation on the standard printing path set according to the model print quality set and the model printing path set to obtain a path loss set; and performing back-propagation optimization on the graph neural network model according to the path loss set to obtain a standard path planning model.
[0091] Among them, the convolutional neural encoding refers to encoding the graph structure model feature set and the real printer feature set using a convolutional neural network layer, and each standard input feature in the standard input feature set is the input of the graph neural network.
[0092] S43, acquiring virtual printing data, and analyzing a standard printing path corresponding to the virtual printing data according to the standard path planning model.
[0093] Specifically, the standard printing path corresponding to the virtual printing data is analyzed according to the standard path planning model, including: type splitting the virtual printing data to obtain a virtual printer parameter group and a virtual model sample file; file parsing and geometric feature extraction of the virtual model sample file to obtain virtual model geometric features; topological graph structure representation of the virtual model geometric features to obtain virtual graph structure model features; feature encoding of the virtual printer parameter group to obtain virtual printer features; and convolutional neural encoding and forward propagation of the virtual graph structure model features and the virtual printer features using the standard path planning model to obtain a standard printing path.
[0094] S44, performing virtual printer modeling according to the virtual printing data to obtain a virtual 3D printer.
[0095] S45 , performing printing simulation and real-time process rendering on the standard printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation.
[0096] Embodiment 3
[0097] Based on the above embodiments, Figure 5 This is a functional module diagram of a 3D printing system in a virtual environment provided by an embodiment of the present disclosure. Figure 5 As shown, a 3D printing system in a virtual environment includes:
[0098] The 3D printing system 500 in the virtual environment described in this embodiment can be installed in an electronic device. According to the functions implemented, the 3D printing system 500 in the virtual environment can include a data classification module 501, a model training module 502, a path planning module 503, a virtual modeling module 504 and a printing rendering module 505. The module described in the present disclosure can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0099] In this embodiment, the functions of each module / unit are as follows:
[0100] The data classification module 501 is used to perform multi-dimensional type feature extraction and model quality assessment on the pre-acquired real 3D printing data set to obtain a model geometry feature set, a model printing path set, a model printing quality set and a real printer feature set;
[0101] The model training module 502 is used to train a preset graph attention model according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a printing path planning model;
[0102] The path planning module 503 is used to obtain virtual printing data and analyze the virtual printing path corresponding to the virtual printing data according to the printing path planning model;
[0103] The virtual modeling module 504 is used to perform virtual printer modeling according to the virtual printing data to obtain a virtual 3D printer;
[0104] The printing rendering module 505 is used to perform printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation.
[0105] In detail, each module described in the 3D printing system 500 in the virtual environment described in the embodiment of the present disclosure adopts the same technical means as the 3D printing method in the virtual environment described in Example 1 when used, and can produce the same technical effects, which will not be repeated here.
[0106] Embodiment 4
[0107] On the basis of the above embodiments, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the above embodiments.
[0108] In some implementations of this 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 of the method described in the above embodiment are implemented.
[0109] In some implementations of this embodiment, a computer program product is provided, including a computer program / instructions, and when the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.
[0110] The processor may include, but is not limited to, one or more processors or microprocessors, etc. Each processor may be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components to execute the methods in the above embodiments.
[0111] The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, and the computer-readable storage medium may include but is not limited to, for example, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (e.g., hard disk, floppy disk, solid-state drive, removable disk, CD ROM, DVD ROM, Blu-ray disc, etc.).
[0112] The computer-readable storage medium may also store at least one computer executable program / instruction, which may be, for example, a computer-readable instruction. The computer-readable storage medium includes, but is not limited to, for example, a volatile memory and / or a non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The computer-readable storage medium may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. For example, a non-transitory computer-readable storage medium may be connected to a computing device such as a computer, and then, when the computing device runs the computer-readable instructions stored on the computer-readable storage medium, the various methods described above may be performed.
[0113] In addition, the computer device may also include (but not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (eg, keyboard, mouse, speaker, etc.), etc.
[0114] The processor may communicate with external devices via an I / O bus via a wired or wireless network.
[0115] In one embodiment, the at least one computer executable instruction may also be compiled into or constitute a software product / computer program product, wherein one or more computer executable instructions are executed by a processor to perform the various functions and / or method steps in the embodiments described in the present technology.
[0116] In the embodiments provided in the present disclosure, it should be understood that the disclosed systems and methods can also be implemented in other ways. The system embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to the multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the above-mentioned module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0117] It should be noted that in the present disclosure, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element limited by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0118] Although the embodiments disclosed in the present disclosure are as above, the above contents are only embodiments adopted for facilitating the understanding of the present disclosure and are not intended to limit the present disclosure. Any technician in the technical field to which the present disclosure belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present disclosure, but the scope of patent protection of the present disclosure shall still be subject to the scope defined in the attached claims.
Claims
1. A 3D printing method in a virtual environment, characterized in that: include: Perform multi-dimensional type feature extraction and model quality assessment on the pre-acquired real 3D printing data set to obtain a model geometry feature set, a model printing path set, a model printing quality set, and a real printer feature set; The preset graph attention model is trained according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a printing path planning model, wherein the training of the preset graph attention model according to the model geometric feature set, the model printing path set, the model printing quality set and the real printer feature set to obtain a printing path planning model includes: performing a topological graph structure representation on the model geometric feature set according to the preset graph attention model to obtain a graph structure model feature set; performing graph structure encoding on the graph structure model feature set and the real printer feature set by using the graph attention model to obtain a graph node input feature set; performing attention weighted update and forward propagation on the graph node input feature set by using the graph attention model to obtain an attention printing path set; performing supervised error calculation on the attention printing path set according to the model print quality set and the model printing path set to obtain a path loss set; performing back propagation optimization on the graph attention model according to the path loss set to obtain a printing path planning model; Acquire virtual printing data, and analyze a virtual printing path corresponding to the virtual printing data according to the printing path planning model; Perform virtual printer modeling according to the virtual printing data to obtain a virtual 3D printer; Performing printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation; The multi-dimensional type feature extraction and model quality evaluation of the pre-acquired real 3D printing data set are performed to obtain a model geometry feature set, a model printing path set, a model printing quality set and a real printer feature set, including: The pre-acquired real 3D printing data set is split into types to obtain a real 3D model data set, a real printer parameter set, and a model printing path set; Classifying the real 3D model data set to obtain a model sample file set and a corresponding model slice file set; Performing file parsing and geometric feature extraction on the model sample file set to obtain a model geometric feature set; Print quality calculation is performed on the model slice file set to obtain a model print quality set.
2. The 3D printing method in a virtual environment according to claim 1, characterized in that: The multi-dimensional type feature extraction and model quality evaluation are performed on the pre-acquired real 3D printing data set to obtain a model geometry feature set, a model printing path set, a model printing quality set and a real printer feature set, including: Feature encoding is performed on each real printer parameter group in the real printer parameter group set to obtain a real printer feature set.
3. The 3D printing method in a virtual environment according to claim 2, characterized in that: The step of performing print quality calculation on the model slice file set to obtain a model print quality set includes: Parsing the model slice file set to obtain a slice triangle face group set; Perform boundary calculation and boundary size comparison on the slice triangle face group set to obtain a size accuracy set; Performing inter-layer normal vector fluctuation analysis on the sliced triangular face group set to obtain a surface smoothness set; Calculating the interlayer thickness of the slice triangle face group set to obtain an interlayer thickness set; Performing a wall thickness standard deviation analysis on the slice triangle face group set to obtain a wall thickness consistency coefficient set; A model printing quality set is calculated according to the dimensional accuracy set, the surface smoothness set, the interlayer thickness set, and the wall thickness consistency coefficient set.
4. The 3D printing method in a virtual environment according to claim 1, characterized in that: The step of analyzing the virtual printing path corresponding to the virtual printing data according to the printing path planning model includes: Splitting the virtual printing data into different types to obtain a virtual printer parameter group and a virtual model sample file; Performing file parsing and geometric feature extraction on the virtual model sample file to obtain virtual model geometric features; Performing a topological graph structure representation on the geometric features of the virtual model to obtain virtual graph structure model features; Performing feature encoding on the virtual printer parameter group to obtain virtual printer features; Using the printing path planning model, the virtual graph structure model features and the virtual printer features are graph-structured to obtain virtual input features; The printing path planning model is used to perform attention weighting and forward propagation on the virtual input features to obtain a virtual printing path.
5. The 3D printing method in a virtual environment according to claim 1, characterized in that: The step of modeling a virtual printer according to the virtual printing data to obtain a virtual 3D printer includes: Extracting parameters from the virtual printing data to obtain a virtual printer parameter group; Performing parameter splitting on the virtual printer parameter group to obtain printer type, printing process, printing parameter group and material parameter group; Perform primary modeling according to the printer type to obtain a virtual printer model; Perform material simulation on the virtual printer according to the printing process and the material parameter group to obtain a simulated printer model; Parameters of the simulated printer model are set according to the printing parameter group to obtain a virtual 3D printer.
6. The 3D printing method in a virtual environment according to claim 1, characterized in that: The step of performing printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation includes: Initializing the engine environment of the virtual 3D printer to obtain a rendering printer; Performing file parsing and path frame segmentation on the virtual printing path to obtain a printing path frame; Performing dynamic printing simulation on the rendering printer according to the printing path frame to obtain a virtual printing model; The rendering printer is subjected to layer-by-layer animation rendering according to the printing path frame to obtain a virtual printing animation.
7. A 3D printing system in a virtual environment, characterized in that: A 3D printing method in a virtual environment according to any one of claims 1 to 6, comprising: A data classification module is used to extract multi-dimensional type features and evaluate model quality of a pre-acquired real 3D printing data set, and obtain a model geometry feature set, a model printing path set, a model printing quality set, and a real printer feature set; A model training module, used for training a preset graph attention model according to the model geometric feature set, the model printing path set, the model print quality set and the real printer feature set to obtain a printing path planning model, wherein the training of the preset graph attention model according to the model geometric feature set, the model printing path set, the model print quality set and the real printer feature set to obtain a printing path planning model comprises: performing a topological graph structure representation on the model geometric feature set according to the preset graph attention model to obtain a graph structure model feature set; performing graph structure encoding on the graph structure model feature set and the real printer feature set by using the graph attention model to obtain a graph node input feature set; performing attention weighted update and forward propagation on the graph node input feature set by using the graph attention model to obtain an attention printing path set; performing supervised error calculation on the attention printing path set according to the model print quality set and the model printing path set to obtain a path loss set; performing back propagation optimization on the graph attention model according to the path loss set to obtain a printing path planning model; A path planning module, used for acquiring virtual printing data and analyzing a virtual printing path corresponding to the virtual printing data according to the printing path planning model; A virtual modeling module, used for performing virtual printer modeling according to the virtual printing data to obtain a virtual 3D printer; The printing rendering module is used to perform printing simulation and real-time process rendering on the virtual printing path according to the virtual 3D printer to obtain a virtual printing model and a corresponding virtual printing animation.
8. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the 3D printing method in a virtual environment according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the 3D printing method in a virtual environment described in any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program is executed by a processor, the steps of the 3D printing method in a virtual environment described in any one of claims 1 to 6 are implemented.
