A 3D printing file generation, analysis method and system
By introducing simulation verification into the 3D printing slicing process and optimizing material configuration using finite element analysis software, the problem of repeated iterations in existing technologies is solved. This enables the prediction and optimization of the mechanical properties of 3D printed parts in a virtual environment, reducing the number of physical printing cycles and material usage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONG XIAN SAN WEI KE JI (SU ZHOU) YOU XIAN GONG SI
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-21
AI Technical Summary
Existing 3D printing slicing software cannot perform simulation verification, leading to an iterative process of design-printing-physical testing, which increases the amount of printing material used and reduces the forming speed.
Simulation verification is introduced into the slicing process of 3D printing. Finite element analysis software is used to test and optimize the 3D printing structure and material configuration in a virtual environment, generating multiple printing schemes to reduce the number of physical printing operations.
By optimizing material configuration through simulation verification, the number of physical printing operations was reduced, lowering the barrier to entry and enabling the prediction and optimization of the mechanical properties of 3D printed parts in a virtual environment.
Smart Images

Figure CN122425899A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D printing, and more particularly to a method and system for generating and analyzing 3D printing files. Background Technology
[0002] Slicing software is the core tool that converts 3D designs into layer-by-layer printing instructions that can be executed by the printer. It transforms 3D model files into G-code instructions for the printer. Slicing software cuts the model into thin slices according to preset conditions, plans the movement path, speed, and amount of each layer of the print head, allows users to set all printing parameters (such as temperature, speed, and support), and ultimately controls the printer to complete the printing process.
[0003] However, current slicing software cannot perform simulation verification. That is, after designing the printing path, speed and amount of the 3D model, there is no intuitive understanding of the printed product before it is printed. For example, it is impossible to obtain the mechanical properties of the printed product before testing it.
[0004] The core task of current slicing software is to generate efficient, reliable, and error-free machine instructions. Its algorithms focus on path planning, supporting generation, avoiding collisions, and ensuring printability. However, predicting the final mechanical properties of 3D printed parts requires specialized solvers and powerful computing capabilities, which current slicing software cannot meet.
[0005] Traditional 3D printing requires an iterative process of "design-printing-physical testing-modification". Each iteration requires multiple physical printings, which not only increases the amount of printing material used, but also reduces the forming speed of 3D printing.
[0006] The disclosure of the above background technical content is only for the purpose of assisting in understanding the concept and technical solution of this application, and does not necessarily provide technical instruction. Summary of the Invention
[0007] The purpose of this invention is to provide a 3D printing solution that incorporates simulation verification into the slicing process of 3D printing. By testing and optimizing the configuration of 3D printed structures and isotropic and anisotropic material models in a virtual environment, the number of physical printing operations is greatly reduced.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for generating and analyzing 3D printing files includes the following steps: S100: Slices the 3D model file to be printed according to preset printing parameters and generates corresponding G-code; S200: Construct a 3D model with a surface mesh format corresponding to the 3D model to be printed based on the 3D model file, and divide the surface of the 3D model into meshes according to the preset surface mesh parameters; S300: Parse G-code to obtain material configuration information and printing information, and determine the material category, quantity, and material category used for each slice layer based on the material configuration information. The material category includes a first material and a second material. S400: Create static mechanical analysis conditions, calculate the stress and strain data of the infilled 3D model according to the material configuration information and printing information, and obtain the printing scheme of the infilled 3D model; S500: If the printing scheme does not meet the expected requirements, adjust the material category of each slice layer according to the preset material configuration information adjustment scheme and update the printing information. Repeat step S400 to obtain the stress and strain data of the infilled 3D model and the printing scheme of the infilled 3D model corresponding to the adjustment scheme, until the printing scheme meets the expected requirements.
[0009] Furthermore, following any one or a combination of the aforementioned technical solutions, step S300, in which the G-code is parsed to obtain the material configuration information, includes: each slice layer is filled with the first material.
[0010] Furthermore, following any one or a combination of the aforementioned technical solutions, step S500, which adjusts the material category of each slice layer and updates the printing information according to the preset material configuration information adjustment scheme, includes: replacing the first material with the second material in at least some slice layers according to the adjustment scheme to obtain the adjusted material configuration information, and adjusting and updating the printing information based on the distribution of the first material and the second material in each slice layer.
[0011] Furthermore, following any one or a combination of the aforementioned technical solutions, the adjustment scheme includes setting the number of slice layers filled with the first material and the number of slice layers filled with the second material, as well as the positions of each slice layer filled with the first material and each slice layer filled with the second material in the total number of slice layers.
[0012] Furthermore, following any one or a combination of the aforementioned technical solutions, the adjustment scheme includes setting the number of slice layers filled with the first material and the number of slice layers filled with the second material, including: The number of slices filled with the second material is increased and the number of slices filled with the first material is decreased according to the preset quantity change step.
[0013] Furthermore, following any one or a combination of the aforementioned technical solutions, the positions of each slice layer filled with the first material and each slice layer filled with the second material within the total slice layers include: After determining the adjusted number of slice layers filled with the first material and the number of slice layers filled with the second material, the different distribution patterns of each slice layer filled with the second material in the total number of slice layers are obtained.
[0014] Furthermore, following any one or a combination of the aforementioned technical solutions, the printing information includes information on motion and positioning control, extrusion control, temperature settings, and fan control, used to obtain a printing plan. The printing plan includes printing time, 3D model weight, printing cost, and a safety factor characterizing whether stress and strain are acceptable.
[0015] Furthermore, following any one or a combination of the aforementioned technical solutions, static mechanical analysis conditions are created in the following manner to calculate the stress and strain data of the infilled 3D model according to the material configuration information and printing information: In the simulation software, the first material and the second material are bound to the element sets of the 3D model according to the material configuration information through the properties of each section, and then assigned to the finite element model. Anchor points and loads are applied to the 3D model, and the static mechanical analysis conditions include the location of the anchor points and the direction and force of the load application; The solver of the simulation software considers the material type of each element set, calculates the stiffness matrix of each finite element in the model according to the mesh, and then assembles the overall stiffness matrix and solves it to obtain stress and strain data.
[0016] Furthermore, in accordance with any of the aforementioned technical solutions or combinations thereof, when one of the first material and the second material is a fiber material, when the slice layer of the 3D model is subjected to tensile and compressive loads, the fibers are laid in a consistent manner along the load direction; when the slice layer of the 3D model is subjected to bending loads, the fibers are laid in a concentric manner.
[0017] Furthermore, following any one or a combination of the aforementioned technical solutions, the first material is a fiber material and the second material is a substrate material. If the stress and strain data of the 3D model after filling is calculated based on filling each slice layer with fiber material and does not meet the expected requirements, a prompt indicating that printing is not possible will be issued. Alternatively, a printing scheme under static mechanical analysis conditions will be generated, wherein the printing scheme includes part or all of the following: printing time, 3D model weight, printing cost, and a safety factor characterizing whether the stress and strain are qualified.
[0018] According to another aspect of the present invention, a 3D printing file generation and analysis system is provided, comprising: The 3D printing slicing software subsystem is configured to slice the 3D model file to be printed according to preset printing parameters in order to generate corresponding G-code. The simulation software subsystem is configured to construct a 3D model in surface mesh format for simulation based on the 3D model file, and to mesh the surface of the 3D model according to preset surface mesh parameters. A G-code parser is configured to parse G-code to determine material configuration information and printing information. The material configuration information includes material type, quantity, and material type used for each slice layer. The G-code parser sends the parsing results to the simulation software subsystem. The simulation software subsystem creates static mechanical analysis conditions, calculates the stress and strain data of the infilled 3D model according to the material configuration information and printing information, and obtains the printing scheme of the infilled 3D model.
[0019] According to another aspect of the present invention, a 3D printing system is provided, including a 3D modeling system, a 3D printer, and a 3D printing file generation and analysis system, wherein the 3D modeling system is configured to construct a 3D model file of a 3D model to be printed, and the 3D printer is configured to receive and execute a printing scheme that meets the expected requirements obtained by the 3D printing file generation and analysis system.
[0020] The beneficial effects of the technical solution provided by this invention are as follows: a. A 3D printing solution that incorporates simulation verification and adjustment during the slicing process of 3D printing. By using FEM software, which includes simulation programs, to test and optimize 3D printed structures and isotropic and anisotropic material models in a virtual environment, one or more printing solutions can be generated, greatly reducing the number of physical prototypes. b. The simulation function adjusts the material configuration information of each slice layer of the 3D model, and then updates the printing parameters to comprehensively optimize the printing scheme, including printing time, 3D model weight, printing cost, and safety factor characterizing whether stress and strain are qualified. It can be used to optimize one or more of the following, or achieve a comprehensive balance, such as 3D printing cost, printing time, and 3D model weight, while meeting the stress and strain strength requirements: c. Lowering the barrier to entry: Unlike traditional simulation software that requires professional knowledge and time-consuming analysis, the simulation function of this application is simple and intuitive to operate: users only need to input basic parameters such as anchor points and load strength, and click to verify in order to run the simulation and generate recommended solutions. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart illustrating a 3D printing file generation and analysis method provided as an exemplary embodiment of the present invention; Figure 2 A schematic diagram of an interface for importing a 3D model file into FEM software, provided as an exemplary embodiment of the present invention; Figure 3 A schematic diagram of an interface for selecting the object range for creating a mesh in FEM software, provided as an exemplary embodiment of the present invention; Figure 4 A schematic diagram of the interface of FEM software that automatically generates surface triangular meshes based on parameters, provided as an exemplary embodiment of the present invention; Figure 5 A schematic diagram of an interface provided for an exemplary embodiment of the present invention, showing how corresponding materials are filled into a 3D model according to the printing path obtained by parsing G-code; Figure 6 A schematic diagram of a simulation interface for a user anchor point provided as an exemplary embodiment of the present invention; Figure 7 A schematic diagram of a simulation interface for setting loads by a user, provided as an exemplary embodiment of the present invention; Figure 8 A schematic diagram of the interface after obtaining stress and strain data by solving the overall stiffness matrix of the assembly using simulation software, provided as an exemplary embodiment of the present invention; Figure 9 A flowchart illustrating the core steps for evaluating the mechanical properties of 3D printed parts, provided as an exemplary embodiment of the present invention; Figure 10 A flowchart illustrating the stiffness matrix of each finite element in a computational model provided for an exemplary embodiment of the present invention. Figure 11 A schematic diagram illustrating the process of assembling the overall stiffness matrix and solving it to obtain stress and strain data, provided as an exemplary embodiment of the present invention; Figure 12 An architecture diagram of a 3D printing file generation and analysis system provided as an exemplary embodiment of the present invention; Figure 13 An architecture diagram of a 3D printing system provided for an exemplary embodiment of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0025] This invention attempts to incorporate simulation verification into the 3D printing slicing process. For example, PrePoMax is a free and open-source software based on the open-source finite element solver CalculiX, which is mainly used for finite element analysis. It provides a complete analysis process from geometry import, mesh generation, material definition, boundary condition setting to solving and post-processing.
[0026] In one embodiment of the present invention, a method for generating and analyzing 3D printing files is provided, such as... Figure 1 As shown, the method includes the following steps: S100: Slices the 3D model file to be printed according to preset printing parameters and generates corresponding G-code; Specifically, 3D model files in formats such as STL and OBJ can be imported into slicing software, such as the 3D printing slicing software subsystem. The slicing software generates corresponding G-code based on preset printing parameters. The preset printing parameters are key parameters set by the user, such as layer height (thickness of each layer of material in the slice), infill data (including but not limited to infill density, infill pattern, and one or more infill materials), wall thickness (thickness of the 3D model shell, or the thickness of the slice layer wall), support structure, nozzle, material type and diameter, material configuration, printing speed, heated bed temperature, etc. Based on existing technology, no specific details are provided here.
[0027] Subsequently, these parameter information and / or information reflecting and implementing these parameter information can be obtained by parsing the G code.
[0028] S200: Construct a 3D model with a surface mesh format corresponding to the 3D model to be printed based on the 3D model file, and divide the surface of the 3D model into meshes according to the preset surface mesh parameters; This step is not for creating a generation path, but rather for preparing a discretized geometric model for stress-strain simulation calculations. Its core lies in transforming the continuous 3D model surface into a "network" composed of countless small polygonal units, so that simulation software (such as finite element analysis software) can perform calculations. In this embodiment, the simulation software can be a simulation software subsystem within FEM software, such as... Figure 2 As shown, import the 3D model file and G-code into the FEM software. Then, select the object range for creating the mesh on the interface, such as... Figure 3 As shown.
[0029] Users can preset surface mesh parameters according to the simulation accuracy, control the overall density of the mesh and increase the density in key local areas, and strictly set the warpage, aspect ratio, interior angle, etc. of polygonal elements to ensure calculation stability and accuracy; for example Figure 4 As shown, the FEM software automatically generates a surface triangular mesh based on the parameters.
[0030] Specifically, when performing surface mesh generation, the mesh must be sufficiently fine. In one embodiment, it must be ensured that at least two mesh element nodes are distributed in the thickness direction at any location of the model, and within the thickness range of any slice layer. That is, the mesh generation satisfies that each slice layer is covered by at least two mesh elements in the thickness direction. This ensures sufficient spatial resolution in the thickness direction during simulation calculations to accurately capture and calculate physical quantities (such as stress gradient, temperature change, flow velocity distribution, etc.) in that direction, avoiding the loss of key information due to an overly coarse mesh, thereby ensuring the accuracy and reliability of the simulation results.
[0031] The generated high-quality surface mesh files (such as STL, INP, CAS, CDB, etc.) will be imported into the solver of the simulation software and used as the geometric basis for simulation calculations, realizing the transformation from a "geometric model" to a "computable model".
[0032] S300: Parse G-code to obtain material configuration information and printing information, and determine the material category, quantity, and material category used for each slice layer based on the material configuration information. The material category includes at least a first material and a second material. The two materials must differ in at least strength and density. Here, one material is a fiber material, and the other is a substrate material. The substrate material can be a plastic material, such as PLA (polylactic acid), PA (nylon), or ABS (acrylonitrile (A)-butadiene (B)-styrene (S) terpolymer). In 3D printing, fibers are usually anisotropic, while substrates are isotropic. However, fiber materials have higher tensile strength than substrates, which can improve the strength of 3D models. In addition, under the same stress and strain conditions, 3D models printed with fiber filling are lighter. However, the high price of fiber materials and the increased printing time limit their application. Therefore, in 3D printing, it is necessary to comprehensively consider the configuration of substrate and fiber materials as filling materials. Under the premise that the stress and strain of the 3D model meet the expected requirements, a printing scheme that meets the expected requirements is obtained by comprehensively considering one or more of the expected requirements of printing time, 3D model weight, and printing cost. The material configuration information and printing information, or the G-code corresponding to the material configuration information and printing information, are the schemes that need to be input into the printer for execution.
[0033] The core task of the G-code parser is to interpret the G-code file to extract two types of key information for simulation: the material category configuration information mentioned above and the printing information, which includes information on motion and positioning control, extrusion control, temperature settings, and fan control, to obtain the printing plan. The printing plan includes printing time, 3D model weight, printing cost, and a safety factor characterizing whether stress and strain are acceptable.
[0034] The motion and positioning control in G-code here is typically used to guide and control the movement distance, direction, and speed of one or more printheads, including print path information, accurately reconstructing the contour and filling path of each slice layer. This forms the geometric basis for material deposition in the simulation. Additionally, extrusion control, temperature settings, and fan control information are used to guide and control the feed rate of the printing material, printhead switching when multiple printheads are present, consumable heating temperature control, and heat dissipation control. Referring to existing G-code information, without specific details here, for example, based on the printhead movement distance, direction, speed, and the type of filling material for each slice layer, the printing time, the amount of the first and second materials used, and consequently the printing cost and the weight of the 3D model can be calculated. The G-code parser sends the parsing results to the simulation software. After the parser completes the parsing, it sends the structured data results to the simulation software. Specifically, it can transmit the printing information and material category configuration information to the simulation software synchronously through internal APIs or data interfaces.
[0035] By deeply integrating G-code parsing into simulation, a seamless connection between the manufacturing process and performance prediction is achieved, addressing the pain point of traditional simulations that rely on idealized geometric models and ignore actual printing paths and material distribution differences. This approach enables high-precision prediction and optimization of part performance under specific printing strategies before actual printing, significantly improving the reliability and success rate of composite material 3D printing and reducing trial-and-error costs. This represents a paradigm shift from "post-design verification" to "in-process prediction."
[0036] S400: Create static mechanical analysis conditions, calculate the stress and strain data of the infilled 3D model according to the material configuration information and printing information, and obtain the printing scheme of the infilled 3D model; It is understood that the static mechanical analysis conditions are related to the mesh after generation; the finer the mesh, the more accurate the simulation results. This step is the core step in evaluating the mechanical properties of fiber-reinforced composite 3D printed parts, and the specific method is as follows: Figures 9 to 11 As shown below, the first material and the second material are used as filling materials within the 3D model and also as filling materials for each slice layer. In the actual 3D printing process, the 3D model has an outer shell, and each slice layer has walls. The walls are usually constructed using the base material from the first material and the second material. However, the influence of the walls is not considered when calculating the stress and strain data of the 3D model after filling in step S400. In particular, when the filling material of the slice layer is a fiber material, the influence of the base material as a wall on the stress and strain data is not considered, and the slice layer is treated as being entirely made of fiber material.
[0037] S500: If the printing scheme does not meet the expected requirements, adjust the material category of each slice layer according to the preset material configuration information adjustment scheme and update the printing information. Repeat step S400 to obtain the stress and strain data of the infilled 3D model and the printing scheme of the infilled 3D model corresponding to the adjustment scheme, until the printing scheme meets the expected requirements.
[0038] Here, the material configuration information and printing information in S300 and S400 are corresponding. Updating the printing information in S500 involves adjusting the material categories of each slice layer. Steps S400 and S500 can involve obtaining a printing scheme and determining if it meets the expected requirements. If not, adjusting the scheme according to a preset quantity change step size and repeating step S400 until the printing scheme meets the expected requirements. Alternatively, steps S400 and S500 can be performed simultaneously in the software. Multiple material configuration information is obtained based on the adjustment scheme to generate multiple printing schemes. Each printing scheme is then judged to meet the expected requirements, and a printing scheme that meets the expected requirements is obtained. Therefore, step S500 can also be: adjusting the material categories of each slice layer according to the preset material configuration information adjustment scheme and updating the printing information; repeating step S400 to obtain the stress-strain data of each infilled 3D model and the printing scheme of the infilled 3D model corresponding to the adjustment scheme; and obtaining a printing scheme that meets the expected requirements based on the printing scheme that meets the expected requirements. The printing solutions here do not meet the expected requirements in at least the following six situations: The first scenario is that the first material is a fiber material and the second material is a substrate material. If the stress and strain data of the 3D model after filling is calculated based on filling each slice layer with fiber material for reinforcement, it still does not meet the expected requirements. In this case, a prompt indicating that printing is not possible is issued. Alternatively, a printing scheme under static mechanical analysis conditions is generated, wherein the printing scheme includes part or all of the following: printing time, 3D model weight, printing cost, and a safety factor characterizing whether the stress and strain are qualified.
[0039] The second scenario involves filling each slice layer with fiber material for reinforcement and confirming that the stress-strain data of the 3D model under full fiber filling conditions has sufficient safety margin. In this case, it is expected that at least part of the expensive fiber material can be replaced with a substrate, which can also reduce printing time.
[0040] The third scenario is that each slice layer is filled with substrate material and it is confirmed that the stress and strain data of the 3D model under the condition of full substrate material filling has sufficient safety margin. In this case, it is expected that at least part of the substrate material can be replaced with fiber material to reduce the weight of the 3D model.
[0041] The fourth scenario is that each slice layer is filled with substrate material and it is confirmed that the stress and strain data of the 3D model under the condition of full substrate material filling does not meet the expected requirements. In this case, it is expected that at least part of the substrate material can be replaced with fiber material to enhance the strength of the 3D model, make the stress and strain data of the 3D model meet the expected requirements, and reduce the weight of the 3D model.
[0042] The fifth scenario involves a portion of the total slice layers filled with fiber material and another portion filled with substrate material. It is confirmed that the stress and strain data of the corresponding 3D model does not meet the expected requirements. In this case, it is expected that at least part of the substrate material can be replaced with fiber material to enhance the strength of the 3D model, make the stress and strain data of the 3D model meet the expected requirements, and reduce the weight of the 3D model.
[0043] The sixth scenario involves a portion of the total slice layers filled with fiber material and another portion filled with substrate material. It is confirmed that the stress and strain data of the corresponding 3D model meet the expected requirements. In this case, it is anticipated that at least part of the substrate material can be replaced with fiber material, or at least part of the fiber material can be replaced with substrate material, to obtain printing schemes with different printing times, 3D model weights, printing costs, and safety factors characterizing whether stress and strain are acceptable, thereby selecting the printing scheme that meets the expected requirements.
[0044] It is understandable that in parsing G-code to obtain material configuration and printing information, there are no specific restrictions on the number of slices filled with the first material and the number of slices filled with the second material in the total slice layers, nor on the positions of each slice filled with the first material and each slice filled with the second material in the total slice layers. Typically, when slicing the 3D model file to be printed according to preset printing parameters and generating the corresponding G-code, it can be set that a portion of the total slice layers are filled with the first material and another portion are filled with the second material, or all slice layers are filled with the first material, or all slice layers are filled with the second material. None of these will affect the final printing solution that meets the expected requirements of this application.
[0045] In one specific embodiment, the material configuration information obtained by parsing the G-code in step S300 includes that each slice layer is filled with a first material. For example, the first material is a fiber material for reinforcement, and the second material is a substrate material.
[0046] Step S500, which adjusts the material category of each slice layer and updates the printing information according to a preset material configuration information adjustment scheme, includes: replacing the first material with the second material in at least some slice layers according to the adjustment scheme to obtain adjusted material configuration information; and adjusting and updating the printing information based on the distribution of the first material and the second material in each slice layer. The adjustment scheme includes setting the number of slice layers filled with the first material and the number of slice layers filled with the second material, as well as the positions of each slice layer filled with the first material and each slice layer filled with the second material within the total number of slice layers.
[0047] In the adjustment scheme, setting the number of sliced layers for filling the first material and the number of sliced layers for filling the second material includes increasing the number of sliced layers for filling the second material and decreasing the number of sliced layers for filling the first material according to a preset increment. The position of each sliced layer of the first material and each sliced layer of the second material in the total sliced layers includes determining the adjusted number of sliced layers for filling the first material and the number of sliced layers for filling the second material, and then obtaining different distribution patterns of each sliced layer of the second material in the total sliced layers. For example, if it is confirmed that the stress-strain data of the 3D model under the full fiber filling condition has sufficient safety margin, a preset number of fiber material slices can be taken at preset upper, middle, and lower heights respectively / in turn, and replaced with substrate material. The distribution pattern of the replacement layers can be continuous or intermittent. This invention does not limit this adjustment scheme; any scheme that replaces or adjusts between fiber material and substrate material is within the scope of protection of this invention.
[0048] Here, the positions of the slices filled with the first material and the slices filled with the second material in the total slices can be set to be uniformly distributed in the total slices. For example, X layers of slices filled with the first material and X layers of slices filled with the second material can be alternately stacked (X≥1 and is an integer). For example, the first material is a fiber material for reinforcement and the second material is a substrate material. It can also be set to have the slices filled with the first material concentrated and the slices filled with the second material evenly distributed and set at both ends or approximately both ends of the thickness direction of the slices filled with the first material. Alternatively, it can be set to have the slices filled with the second material concentrated and located in the middle of the slices filled with the first material. No specific restrictions are made here.
[0049] In the preferred embodiment, a brute-force approach that traverses all combinations is not used because it is too inefficient. The sampling method in this embodiment prioritizes replacing layers that have the least impact on the overall structural performance (such as stiffness and strength). These layers are often located in low-stress or non-primary load-bearing areas of the structure and may be continuous or discontinuous. Specifically, the slice layer containing the fiber material to be replaced is determined as follows: S510: Calculate the strain energy density or stress value of each element based on the stiffness matrix of each finite element. S520: Calculate the average strain energy density or average stress value of multiple units in each slice layer; S530: Sort the sliced layers from low to high according to the average strain energy density or the average stress value; S540: Prioritize changing the material of the first-order slices from fiber to substrate. This can be done layer by layer, replacing fibers with substrate, or in batches for efficiency. After each layer or several layers are replaced, a rapid FEM software simulation is performed to ensure performance still meets requirements. The process stops when performance fails to meet requirements after replacing a layer, and the previous 3D printing solution is considered the optimal solution.
[0050] This strategy is usually a discontinuous, dispersed replacement, because low-stress areas may be scattered throughout the model, and the number of layers replaced with the substrate as a whole is relatively larger while ensuring that performance still meets the standards.
[0051] As described above, replacement can be done layer by layer or in batches. Specifically, in this embodiment, if the stress-strain data meets the expected requirements, the quantity of the fiber material to be replaced with the substrate is determined according to the following method: The quantity or proportion of stress-strain data exceeding the expected requirements is calculated, and the replacement ratio associated with the quantity or proportion exceeding the expected requirements is determined in a preset mapping table. The mapping table can be established based on experience or experiments, and the relationship between the quantity exceeding the expected requirements and the replacement quantity in the mapping table is continuously updated and optimized in practice. Generally speaking, the higher the quantity or proportion exceeding the expected requirements, the higher the replacement ratio.
[0052] By replacing fiber materials with substrates according to a determined substitution ratio, a new printing solution is obtained; If the new printing scheme meets the expected requirements, such as recalculating the stress and strain data of the 3D model under the new printing scheme, until the number or proportion that meets or exceeds the expected requirements reaches the convergence range, then the current printing scheme will be used as the final optimized printing scheme.
[0053] The core step S400 in this embodiment will be described in detail below. First, refer to... Figure 9 : S410: In the simulation software, the first material and the second material are bound to the element sets of the 3D model according to the material configuration information through the properties of each section, and then assigned to the finite element model. Specifically, based on the material configuration information, the configuration of the first and second materials in each slice layer of the 3D model can be determined. In the simulation software, the 3D model is divided into one or more unit sets. Based on the configuration of the first and second materials in each slice layer of the 3D model, the configuration of the first and second materials in one or more unit sets can be obtained. Furthermore, when the first and second materials contain fiber materials, based on the printing information, the G-code parser defines the direction of the fiber material at each point on the printing path of each slice layer, thus obtaining the direction of the fiber material in the unit set containing fiber materials. Typically, when the slice layer of the 3D model is subjected to tensile and compressive loads, the fibers are laid out consistently along the load direction; when the slice layer of the 3D model is subjected to bending loads, the fibers are laid out concentrically. The operation interface is as follows: Figure 5 As shown: the corresponding material is filled into the 3D model according to the printing path obtained by parsing the G code. In the simulation model, the fibers are no longer uniformly or randomly distributed, but have a spatial distribution and orientation that is completely consistent with the real printing deposition process. This is the most critical step in simulating the fiber reinforcement effect.
[0054] Besides binding the first and second materials to the element sets of the 3D model according to their material configuration information through the cross-sectional properties in the simulation software and assigning them to the finite element model, printing information can also be converted and fed into the simulation software. Here, the material configuration information and printing information have a mapping relationship with the input in the simulation software. This mapping converts the material configuration information and printing information into a format and parameters required and recognizable by the simulation software. Specifically, the material configuration information of the first and second materials is bound to the element sets of the 3D model through the cross-sectional properties and assigned to the finite element model. Materials can be isotropic or anisotropic; for example, the first material is isotropic PET, and the second material is orthotropic. Anisotropic fibers; printing information includes motion and positioning control, extrusion control, temperature settings, and fan control information. For example, motion and positioning control may include printing speed, path, and direction, which can determine material orientation, anisotropic direction, and interlayer bonding path in simulation. Extrusion control may include extrusion ratio, line width, layer height, and flow rate, which can determine cross-sectional geometric parameters (cross-sectional shape and size) in simulation. Of course, this printing information can be selectively mapped to the simulation as needed. Therefore, cross-sectional properties in the simulation can be determined and / or constrained based on material configuration information and printing information. For example, when there are fibers in the first and second materials, the fiber direction and filling method of the filling area can be determined according to the printing information.
[0055] In one possible implementation, in the simulation software, the 3D model is divided into one or more element sets. Material configuration information of the first material and the second material is obtained to indicate the material category used by each element set and is bound to each element set through cross-sectional properties. This information is then assigned to the finite element model. The obtained printing information is used to constrain the cross-sectional geometric parameters and material property parameters of the cross-sectional properties. Here, regarding the division of element sets, the element sets are divided first, and then the information is obtained. Then, cross-sectional properties are assigned to each element set according to the obtained information. For example, the 3D model is meshed using finite element methods to generate multiple elements. Based on the geometric features and slice layer information of the 3D model, the elements are divided into multiple element sets. For example, each element set corresponds to a spatial region or one or more slice layers of the 3D model. Here, the 3D model is divided into multiple element sets.
[0056] In another possible implementation, material configuration information of the first material and the second material is obtained to indicate the material category of each slice layer of the 3D model. The obtained printing information is used to divide the 3D model into one or more element sets. The material configuration information of the first material and the second material is bound to each element set of the 3D model through each section attribute, and then assigned to the finite element model. The cross-sectional geometric parameters and material attribute parameters of the cross-sectional attributes are constrained by the obtained printing information. Regarding the division of element sets, the material configuration information and printing information are obtained first, and the division of element sets is guided by the material configuration information and printing information to ensure that the material type in each element set is consistent. For example, the 3D model is meshed by finite element to generate multiple elements. Elements of the same material type are grouped into the same element set. Here, the same material type requires the same material category and material orientation.
[0057] S420: Apply anchor points and loads to the 3D model, wherein the static mechanical analysis conditions include the location of the anchor points and the direction and force of the load application; This step involves setting the boundary conditions for the anchor points and loads, i.e., defining the simulation conditions. The simulation software performs static mechanical analysis, primarily analyzing the conditions set by the user, such as the creation of anchor points (e.g., ...). Figure 6 (as shown), or other settings such as selecting the direction of force on the cross section, load (e.g.) Figure 7 (As shown).
[0058] Regarding the application of anchor points: Anchor points apply displacement constraints to specific nodes or regions of the model's surface mesh, simulating parts of the part that are clamped, bolted, or bonded during actual assembly. The extent of the anchor points depends on the actual application of the part, and determines the size of the constrained area, directly affecting stress transfer and distribution.
[0059] Regarding load application: Force is applied to the local surface mesh, excluding anchor points. The direction of application determines the type of load (e.g., tension, compression, bending, shear, etc.), and the applied force sets the magnitude of the load. Users can apply loads based on the expected magnitude and direction of the loads that the corresponding part in the 3D model needs to withstand.
[0060] S430: The solver of the simulation software considers the material type of each element set, calculates the stiffness matrix of each finite element in the model according to the mesh, then assembles the overall stiffness matrix and solves it to obtain stress and strain data. The software interface is shown below. Figure 8 As shown. Specifically, when the material type includes fiber materials or other anisotropic materials, the solver of the simulation software considers the material orientation of each slice layer, calculates the stiffness matrix of each finite element in the model according to the mesh, and then assembles the overall stiffness matrix and solves it to obtain stress and strain data.
[0061] In some implementation methods, one of the first and second materials is a fiber material. When the sliced layer of the 3D model is subjected to tensile and compressive loads, the fibers are laid out consistently along the load direction; when the sliced layer of the 3D model is subjected to bending loads, the fibers are laid out concentrically. This laying method allows for a high degree of matching between the fiber direction and the principal stress direction. While meeting the mechanical performance requirements of the 3D model, it reduces the amount of fiber used. Specifically, by precisely matching the fiber direction with the principal stress field, the required mechanical properties can be achieved with minimal fiber usage. Specifically, when subjected to tensile and compressive loads, the consistent laying of fibers along the load direction fully utilizes the axial properties of the fibers. The continuous laying of fibers along the principal load direction allows the load to be directly borne by high-strength, high-modulus fibers, without load deflection or secondary stress, achieving maximum axial stiffness and strength with minimal structural mass. When subjected to bending loads, the concentric laying of fibers continuously changes the fiber direction with the curvature and along the stress trace, achieving a global continuous match between the fibers and the principal stress, improving fiber utilization, enhancing buckling resistance and local stability, and significantly reducing interlaminar stress.
[0062] Step S430 is the core of the solver's calculations. It consists of two parts: first, traversing each finite element and solving for the element stiffness matrix for each element; second, assembling the stiffness matrices of each element after traversal to obtain the overall stiffness matrix, which is then used to solve for the stress and strain data.
[0063] As an feasible approach, the free and open-source software PrePoMax, based on the open-source finite element solver CalculiX, can be used for finite element analysis. It can serve as the execution subject for the above steps S410 to S430. This invention does not impose any specific limitations on PrePoMax.
[0064] As another feasible approach, the following section will first explain the part in the first part: "The solver of the simulation software considers the material orientation of each element set and calculates the stiffness matrix of each finite element in the model according to the mesh." See [link to previous section]. Figure 10 : S431: Considering the material orientation of each slice layer, the elastic matrix [D] is... material The global material matrix [D] is obtained by transforming from the local material coordinate system to the global coordinate system. global The conversion method is [D]. global =[T] T ×[D] material T Where [T] is the transformation matrix, which is defined by the elasticity matrix [D]. material The direction cosine of the local material coordinate system is determined by the direction of the material. S432: Based on the nodal coordinates of the element geometry and the global material matrix transformed to the global coordinate system [D] global The stiffness matrix [k] of the finite element is calculated by numerical integration. e ]=∫∫∫ _V [B] T ×[D] global ×[B]dV, where, ∫∫∫ _V This indicates a triple integral over the element volume V, where [B] represents the strain-displacement matrix. T dV represents the inversion of the matrix, and dV represents a volume element.
[0065] The following section will explain the second part, "Assembling the overall stiffness matrix and solving it to obtain stress and strain data." See [link to relevant documentation]. Figure 11 : S433: Based on the global node number of each finite element in the finite element model, the stiffness matrix [k] of the finite element is... e Add to the corresponding row and column of the global stiffness matrix [K]; If multiple finite element elements correspond to the same row and column, the contributions of these multiple finite element elements to the same position are automatically accumulated. S434: Solve the linear system of equations [K]{U}={F}, where {U} represents the displacement vector of all nodal degrees of freedom, and {F} represents the equivalent nodal force vector of all nodal degrees of freedom corresponding to the global stiffness matrix [K]. Solve to obtain the displacement vector {U} of all nodal degrees of freedom. S435: The solver of the simulation software solves for the stress-strain data based on the displacement vector {U} of the nodal degrees of freedom. The stress-strain data includes one or more of the following: maximum principal stress, minimum principal stress, shear stress, equivalent strain, principal strain, and support reaction force.
[0066] In one embodiment of the present invention, a 3D printing file generation and analysis system is provided, such as... Figure 12 As shown: The 3D printing slicing software subsystem is configured to slice the 3D model file to be printed according to preset printing parameters in order to generate corresponding G-code. The simulation software subsystem is configured to construct a 3D model in surface mesh format for simulation based on the 3D model file, and to mesh the surface of the 3D model according to preset surface mesh parameters. A G-code parser is configured to parse G-code to determine material configuration information and printing information. The material configuration information includes material type, quantity, and material type used for each slice layer. The G-code parser sends the parsing results to the simulation software subsystem. The simulation software subsystem creates static mechanical analysis conditions, calculates the stress and strain data of the infilled 3D model according to the material configuration information and printing information, and obtains the printing scheme of the infilled 3D model.
[0067] It should be noted that the 3D printing file generation and analysis system provided in this embodiment and the 3D printing file generation and analysis method provided in the above embodiments belong to the same inventive concept. Here, all the contents of the 3D printing file generation and analysis method embodiment are incorporated into this 3D printing file generation and analysis system embodiment by reference, and will not be repeated.
[0068] In one embodiment of the present invention, a 3D printing system is provided, such as... Figure 13 As shown, it includes a 3D modeling system, a 3D printer, and a 3D printing file generation and analysis system as described above. The 3D modeling system is configured to construct a 3D model file of the 3D model to be printed, and the 3D printer is configured to receive and execute a printing scheme that meets the expected requirements obtained by the 3D printing file generation and analysis system.
[0069] It is important to understand that the printing scheme received by the 3D printer refers to the material configuration information and printing information of the printing scheme, or the G-code corresponding to the material configuration information and printing information. In other words, the material configuration information and printing information, or the G-code corresponding to the material configuration information and printing information, are the schemes that need to be input into the printer for execution.
[0070] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0071] The above description is only a specific embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating and analyzing 3D printing files, characterized in that, Includes the following steps: S100: Slices the 3D model file to be printed according to preset printing parameters and generates corresponding G-code; S200: Construct a 3D model with a surface mesh format corresponding to the 3D model to be printed based on the 3D model file, and divide the surface of the 3D model into meshes according to the preset surface mesh parameters; S300: Parse G-code to obtain material configuration information and printing information, and determine the material category, quantity, and material category used for each slice layer based on the material configuration information. The material category includes a first material and a second material. S400: Create static mechanical analysis conditions, calculate the stress and strain data of the infilled 3D model according to the material configuration information and printing information, and obtain the printing scheme of the infilled 3D model; S500: If the printing scheme does not meet the expected requirements, adjust the material category of each slice layer according to the preset material configuration information adjustment scheme and update the printing information. Repeat step S400 to obtain the stress and strain data of the infilled 3D model and the printing scheme of the infilled 3D model corresponding to the adjustment scheme, until the printing scheme meets the expected requirements.
2. The 3D printing file generation and analysis method according to claim 1, characterized in that, In step S300, parsing the G-code to obtain material configuration information includes: each slice layer is filled with the first material.
3. The 3D printing file generation and analysis method according to claim 2, characterized in that, Step S500, which involves adjusting the material category of each slice layer and updating the printing information according to the preset material configuration information adjustment scheme, includes: replacing the first material with the second material in at least some slice layers according to the adjustment scheme to obtain the adjusted material configuration information, and adjusting and updating the printing information based on the distribution of the first material and the second material in each slice layer.
4. The 3D printing file generation and analysis method according to claim 3, characterized in that, The adjustment scheme includes setting the number of slice layers filled with the first material and the number of slice layers filled with the second material, as well as the position of each slice layer filled with the first material and each slice layer filled with the second material in the total number of slice layers.
5. The 3D printing file generation and analysis method according to claim 4, characterized in that, The adjustment scheme includes setting the number of slice layers filled with the first material and the number of slice layers filled with the second material, including: The number of slices filled with the second material is increased and the number of slices filled with the first material is decreased according to the preset quantity change step.
6. The 3D printing file generation and analysis method according to claim 4, characterized in that, The positions of each slice layer filled with the first material and each slice layer filled with the second material within the total slice layers include: After determining the adjusted number of slice layers filled with the first material and the number of slice layers filled with the second material, the different distribution patterns of each slice layer filled with the second material in the total number of slice layers are obtained.
7. The 3D printing file generation and analysis method according to claim 1, characterized in that, The printing information includes motion and positioning control, extrusion control, temperature settings, and fan control information, which are used to obtain a printing plan. The printing plan includes printing time, 3D model weight, printing cost, and a safety factor characterizing whether stress and strain are acceptable.
8. The 3D printing file generation and analysis method according to claim 1, characterized in that, The static mechanical analysis conditions are created in the following way to calculate the stress and strain data of the infilled 3D model according to the material configuration and printing information: In the simulation software, the first material and the second material are bound to the element sets of the 3D model according to the material configuration information through the properties of each section, and then assigned to the finite element model. Anchor points and loads are applied to the 3D model, and the static mechanical analysis conditions include the location of the anchor points and the direction and force of the load application; The solver of the simulation software considers the material type of each element set, calculates the stiffness matrix of each finite element in the model according to the mesh, and then assembles the overall stiffness matrix and solves it to obtain stress and strain data.
9. The 3D printing file generation and analysis method according to claim 8, characterized in that, When one of the first material and the second material is a fiber material, when the slice layer of the 3D model is subjected to tensile and compressive loads, the fibers are laid in a consistent manner along the load direction; when the slice layer of the 3D model is subjected to bending loads, the fibers are laid in a concentric manner.
10. The 3D printing file generation and analysis method according to claim 1, characterized in that, The first material is a fiber material, and the second material is a substrate material. If the stress and strain data of the 3D model after filling is calculated based on filling each slice layer with fiber material and does not meet the expected requirements, a prompt indicating that printing is not possible will be issued. Alternatively, a printing scheme under static mechanical analysis conditions will be generated, wherein the printing scheme includes part or all of the following: printing time, 3D model weight, printing cost, and a safety factor characterizing whether the stress and strain are qualified.
11. A 3D printing file generation and analysis system, characterized in that, include: The 3D printing slicing software subsystem is configured to slice the 3D model file to be printed according to preset printing parameters in order to generate corresponding G-code. The simulation software subsystem is configured to construct a 3D model in surface mesh format for simulation based on the 3D model file, and to mesh the surface of the 3D model according to preset surface mesh parameters. A G-code parser is configured to parse G-code to determine material configuration information and printing information. The material configuration information includes material type, quantity, and material type used for each slice layer. The G-code parser sends the parsing results to the simulation software subsystem. The simulation software subsystem creates static mechanical analysis conditions, calculates the stress and strain data of the infilled 3D model according to the material configuration information and printing information, and obtains the printing scheme of the infilled 3D model.
12. A 3D printing system, characterized in that, The system includes a 3D modeling system, a 3D printer, and a 3D printing file generation and analysis system as described in claim 11, wherein the 3D modeling system is configured to construct a 3D model file of a 3D model to be printed, and the 3D printer is configured to receive and execute a printing scheme that meets the expected requirements obtained by the 3D printing file generation and analysis system.