3D printing simulation method and device for artware
Through finite element analysis and Voronoi diagram technology, the problem of unreasonable stiffener design in 3D printed crafts is solved, accurate identification of stress concentration areas and automatic optimization of stiffeners are achieved, reducing material consumption and printing costs.
Patent Information
- Application Number
- CN202411380903.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
When the prior art 3D printing of handicrafts, it is difficult to accurately identify areas of stress concentration, resulting in unreasonable reinforcement rib design, resulting in waste of materials and increased printing costs.
Through the limited element analysis and Volorinoto technology, the area where the stress concentration in the model is accurately identified, automated the distribution position of the reinforcement of reinforcement, and the size of the enhanced reinforcement was adjusted under the requirements of the structural strength.
A precise recognition of the stress distribution of crafts, automated optimization and strengthening the design of reinforcement, saving manufacturing materials, and reducing the cost of crafts printing.
Smart Images

Figure CN119358315A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a 3D printing simulation method and device for handicrafts. Background Art
[0002] 3D printing, also known as Additive Manufacturing (AM), is a technology that creates three-dimensional objects by stacking materials layer by layer. Unlike traditional manufacturing that removes materials (such as turning, milling, etc.), 3D printing builds the shape of an object by adding materials (usually plastic, metal, ceramic, etc.). With the development of technology, 3D printing has become an important tool in modern manufacturing.
[0003] When 3D printing is used to process handicrafts, since handicrafts usually have lower strength and rigidity, thinner parts are difficult to withstand external loads and stresses, and are prone to deformation, fracture or breakage during processing and use. Therefore, reinforcing ribs are often added to the non-visible surface to reinforce the weak parts of the handicraft while maintaining the neatness of the handicraft surface.
[0004] Currently, the setting of ribs mainly relies on the designer's work experience, which cannot accurately identify the areas of stress concentration in the model, often resulting in over-reinforcement of some places, while other places that really need reinforcement do not get enough support. At the same time, the lack of specific size and shape optimization of the ribs may lead to the design size of the ribs being too large or the shape being unreasonable, resulting in material waste and increased printing costs. Summary of the invention
[0005] In order to solve the technical problem that the current setting of reinforcing ribs mainly relies on the work experience of designers, and the stress concentration areas in the model cannot be accurately identified, which often leads to over-reinforcement in some places, while other places that really need reinforcement do not get enough support, and lack of specific size and shape optimization of the reinforcing ribs, which may lead to the design size of the reinforcing ribs being too large or the shape being unreasonable, thereby causing material waste and increased printing costs, the present invention provides a 3D printing simulation method and device for handicrafts.
[0006] The technical solution provided by the embodiment of the present invention is as follows:
[0007] First aspect:
[0008] An embodiment of the present invention provides a 3D printing simulation method for handicrafts, comprising:
[0009] S1: Obtain a 3D simulation model of the craft;
[0010] S2: Meshing the 3D simulation model of the handicraft;
[0011] S3: Perform finite element analysis on the 3D simulation model of the craft after meshing to determine the stress field distribution;
[0012] S4: Generate random seeds for the Voronoi diagram according to the stress field distribution;
[0013] S5: Mapping the random seeds to a 2D parameter domain to generate a Voronoi diagram;
[0014] S6: Determine the intersection between the Voronoi diagram and the edge of the model grid;
[0015] S7: Mapping the intersection points between the Voronoi diagram and the model grid edge back to the surface of the handicraft 3D simulation model to determine the distribution position of each reinforcing rib;
[0016] S8: Adjust the size of the reinforcement at each position with the goal of minimizing material consumption while meeting the structural strength requirements.
[0017] Second aspect:
[0018] An embodiment of the present invention provides a 3D printing simulation device for handicrafts, comprising:
[0019] processor;
[0020] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the 3D printing simulation method for handicrafts as described in the first aspect is implemented.
[0021] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0022] In the present invention, through finite element analysis and Voronoi diagram, the stress concentration areas in the model are accurately identified, the distribution positions of each reinforcement rib are automatically and reasonably determined, and under the requirement of structural strength, the size of the reinforcement ribs at each position is automatically adjusted with the goal of minimizing material consumption, thereby saving manufacturing materials and reducing the printing cost of handicrafts. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A schematic diagram of a flow chart of a 3D printing simulation method for handicrafts provided in an embodiment of the present invention;
[0025] Figure 2 A schematic structural diagram of a 3D printing simulation device for handicrafts provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0027] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0028] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0029] Reference Manual Attached Figure 1 , showing a flow chart of a 3D printing simulation method for handicrafts provided by an embodiment of the present invention.
[0030] The embodiment of the present invention provides a 3D printing simulation method for handicrafts, which can be implemented by a 3D printing simulation device for handicrafts, and the 3D printing simulation device for handicrafts can be a terminal or a server. The processing flow of the 3D printing simulation method for handicrafts can include the following steps:
[0031] S1: Obtain a 3D simulation model of the handicraft.
[0032] S2: Mesh the 3D simulation model of the handicraft.
[0033] Optionally, the handicraft 3D simulation model may be meshed in the form of a triangular mesh, a quadrilateral mesh, a hexagonal mesh, or the like.
[0034] In a possible implementation, S2 specifically includes sub-steps S201 to S204:
[0035] S201: using triangular meshes to perform preliminary mesh division on the handicraft 3D simulation model.
[0036] S202: After the initial meshing, the stress field distribution of the craft 3D simulation model is calculated.
[0037] S203: Determine the stress gradient at each position according to the stress field distribution of the 3D simulation model of the craft.
[0038] S204: Adaptively adjust the mesh size at the corresponding position according to the stress gradient at each position:
[0039]
[0040] Among them, h x represents the grid size at position x, h0 represents the initial grid size, α represents the refinement coefficient, represents the gradient operator, represents the stress gradient at position x.
[0041] In the present invention, by adaptively adjusting the grid size according to the stress gradient, a smaller grid can be used in the area where the stress is concentrated to improve the calculation accuracy. In the area where the stress is small or changes slowly, a larger grid size is maintained, which significantly reduces the number of grids required for the overall calculation, thereby reducing the calculation time and resource consumption and improving the calculation efficiency.
[0042] S3: Perform finite element analysis on the 3D simulation model of the craft after meshing to determine the stress field distribution.
[0043] Among them, finite element analysis (FEA) is a numerical method used to solve complex engineering and physical problems, especially stress, strain and deformation analysis in the fields of structure, heat, fluid, vibration, etc. The basic idea of FEA is to decompose a complex object into many small, simple units (called "finite elements"), and approximate the behavior of the entire object through the combination of these units.
[0044] In a possible implementation, S3 specifically includes sub-steps S301 to S307:
[0045] S301: Define the generalized displacement of each finite element and the nodal displacements within the finite element:
[0046] q=[u,v,w,θ x ,θ y ] T
[0047] Among them, q represents displacement, u represents displacement in the x direction, v represents displacement in the y direction, w represents displacement in the z direction, and θ x represents the rotation angle in the x direction, θ y represents the rotation angle in the y direction, T Represents matrix transpose.
[0048] q n =[u n , v n , w n ,θ xn ,θ yn ]T =[q mn ,q bn ] T
[0049] q mn =[u n , v n ] T
[0050] q bn =[w n ,θ xn ,θ yn ] T
[0051] Among them, q n represents the displacement of the nth node, u n represents the displacement of the nth node in the x direction, v n represents the displacement of the nth node in the y direction, w n represents the displacement of the nth node in the z direction, θ xn Indicates the rotation angle of the nth node in the x direction, θ yn Indicates the rotation angle of the nth node in the y direction.
[0052] The relationship between the generalized displacement of the finite element and the node displacement within the finite element satisfies:
[0053]
[0054] Among them, N n represents the shape function matrix of the nth node, and I5 represents the 5×5 identity matrix.
[0055] It should be noted that by specifying the generalized displacement and nodal displacement of each finite element, the deformation behavior of the model under load can be described more accurately. Combining displacement and rotation angle helps to fully understand the response of the structure.
[0056] S302: Determine the strain according to the strain-displacement equation:
[0057]
[0058] in, represents the linear membrane strain, represents the linear membrane strain displacement matrix of the nth node, ε b represents the bending strain, B bn represents the bending strain displacement matrix of the nth node, ε s represents shear strain, B sn represents the shear strain displacement matrix of the nth node, represents the nonlinear membrane strain, represents the nonlinear membrane strain displacement matrix of the nth node, H represents the nonlinear term coefficient matrix, G n represents the nonlinear strain contribution matrix of the nth node.
[0059]
[0060] Among them, N n Represents the shape function matrix of the nth node, N n,x represents the partial derivative of the shape function matrix of the nth node in the x direction, N n,y Represents the partial derivative of the shape function matrix of the nth node in the y direction.
[0061] It should be noted that the strain displacement equation can accurately calculate the strain of each node, which is crucial for analyzing material properties and structural stability. At the same time, by introducing nonlinear strain, complex material behavior can be better captured in practical applications, especially in the case of large deformation or high stress.
[0062] Arrange the parameters of all nodes into vector form:
[0063] q=[… q n …] T
[0064]
[0065] G=[… G n …] T
[0066] B b =[… B bn …] T
[0067] B s =[… B sn …] T
[0068] Where q represents the displacement vector, represents the linear membrane strain displacement vector, represents the nonlinear membrane strain displacement vector, G represents the nonlinear strain contribution vector, B b represents the bending strain displacement vector, B s represents the shear strain displacement vector of the nth node.
[0069] S303: Calculate the strain component according to the determined strain:
[0070]
[0071] δεb =B b δq.
[0072] δε s =B s δq
[0073] S304: According to the principle of virtual work, determine the total potential energy equation:
[0074] S = ∫ V (N T δε m +M T δε b +Q T δε s )dV-f T δq
[0075] Among them, S represents the total potential energy, N represents the internal force vector, δε m represents the variation of membrane strain, M represents the bending moment vector, δε b represents the variation of bending strain, Q represents the shear force vector, δε s represents the variation of shear strain, V represents volume, F represents the nodal force vector, and δq represents the variation of displacement.
[0076] Among them, the principle of virtual work means that the sum of the virtual work done by all external forces on any set of virtual displacements in the equilibrium state is equal to zero.
[0077] It should be noted that the total potential energy equation is established using the principle of virtual work to ensure the stability of the structure in the equilibrium state. This method can effectively handle the effects of multiple forces and ensure the physical rationality of the calculation.
[0078] S305: Substitute the change in the strain component into the total potential energy equation:
[0079]
[0080] S306: Linearize the total potential energy equation:
[0081]
[0082] δM=D b B b δq
[0083] δQ=D s B s δq
[0084] Among them, δS represents the potential energy variation, δN represents the in-plane force component, δM represents the in-plane bending moment component, δQ represents the in-plane shear force component, and D m represents the membrane stress stiffness matrix, D brepresents the bending stress stiffness matrix, D s represents the shear stress stiffness matrix.
[0085] It should be noted that by linearizing the total potential energy equation, complex nonlinear problems can be transformed into linear problems, making the solution process simpler and more efficient. This processing method is very important for iterative solution and convergence analysis.
[0086] S307: Solve the linearized equations using the Newton-Raphson method to determine the displacement field, strain field, and stress field distribution of each node.
[0087] Among them, the Newton-Raphson method is an iterative method for solving nonlinear equations. The Newton-Raphson method is based on the idea of Taylor series expansion and uses the tangent of a function to gradually approximate its root. The Newton-Raphson method is a very mature prior art and will not be described in detail in the present invention.
[0088] In the present invention, the Newton-Raphson method is used to solve the linearized equations to determine the displacement field, strain field and stress field distribution of each node, which can improve the efficiency and accuracy of the solution and provide a solid data foundation for structural optimization and safety assessment.
[0089] S4: Generate random seeds for the Voronoi diagram based on the stress field distribution.
[0090] Among them, the Voronoi Diagram is based on the spatial partitioning generated by a set of discrete points (called seed points or generating points), and its purpose is to divide the space into multiple regions so that the distance from the points in each region to its corresponding seed point is less than the distance to other seed points.
[0091] In a possible implementation, S4 specifically includes sub-steps S401 and S402:
[0092] S401: According to the stress field distribution, calculate the probability of each finite element being selected as the Voronoi diagram seed:
[0093]
[0094] Among them, pi represents the probability that the i-th finite element is selected as the seed of the Voronoi graph, max represents the maximum value, σ i represents the stress at the i-th finite element, a i represents the material strength at the i-th finite element.
[0095] S402: Generate a random number between 0 and 1 for each finite element, and determine whether the random number is greater than the selection probability. If so, select the finite element as a Voronoi graph seed. Otherwise, do not select the finite element as a Voronoi graph seed.
[0096] In the present invention, the probability of selecting each finite element as a seed is calculated based on the stress field distribution, so that the selection is more in line with the actual mechanical requirements. High stress areas are given a higher probability of seed selection, thereby ensuring that reinforcement ribs are added in these key areas to improve structural performance.
[0097] In a possible implementation, S4 specifically includes: taking the maximum stress improvement as the goal, generating a random seed of the Voronoi diagram through a fireworks optimization algorithm.
[0098] Among them, the Fireworks Algorithm (FWA) is a heuristic optimization algorithm that simulates the process of fireworks blooming and exploding to search for the optimal solution.
[0099] Furthermore, S4 specifically includes sub-steps S401 and S402:
[0100] S401: With the goal of maximizing stress improvement, determine the seed selection objective function:
[0101]
[0102] Among them, 1 represents the seed selection objective function, X represents the random seed scheme, max represents maximization, and τ represents the stress improvement degree. It represents the average stress after adding reinforcements of preset sizes according to the generated random seeds. represents the original stress average value, It represents the maximum stress value after adding reinforcements of preset size according to the generated random seeds. represents the original maximum stress value, Calculated according to the stress field distribution determined by S3, λ represents the weight coefficient of the stress average value.
[0103] Among them, those skilled in the art can set the weight coefficient λ of the stress average value according to actual conditions, and the present invention does not limit this.
[0104] It should be noted that the stress improvement degree takes into account the changes in both the average stress and the maximum stress, and can fully reflect the improvement in structural stress after adding stiffeners, which helps to more accurately evaluate the effectiveness of the design.
[0105] S402: Maximizing the seed selection objective function through the fireworks optimization algorithm to determine the random seed of the Voronoi graph.
[0106] Specifically, the seed selection objective function can be used as the fitness function of the fireworks optimization algorithm.
[0107] Initialize the firework individuals. Each firework individual is composed of multiple dimensional components. Each firework individual represents a feasible random seed scheme. Each component represents whether a finite element is selected as a Voronoi diagram seed. If it is selected, the component is 1, and if it is not selected, the component is 0.
[0108] Perform explosion operations on each individual firework:
[0109]
[0110] Among them, A i represents the explosion radius of the i-th firework, x i represents the i-th firework individual, f represents the fitness function, N represents the total number of firework individuals, min represents the minimum value, ε represents the hyperparameter to avoid division by zero, C A Indicates the explosion radius adjustment factor, S i represents the number of explosion sparks of the i-th firework, max represents the maximum value, C S Indicates the explosion spark number adjustment factor.
[0111] In the present invention, the explosion radius is dynamically calculated according to the fitness of each individual, and individuals with higher fitness will have a larger explosion radius. This dynamic adjustment enables better solutions to explore a larger search space, thereby promoting global search, and can more effectively explore the solution space around it, reducing the risk of falling into a local optimal solution.
[0112] Furthermore, the number of explosion sparks is calculated based on the individual fitness, and individuals with high fitness will generate more sparks. This means that better solutions will be explored more, thereby improving the overall optimization efficiency.
[0113] Limit the number of explosion sparks generated by explosion operation:
[0114]
[0115] in, represents the number of explosion sparks of the i-th firework after restriction processing, S max Indicates the maximum explosion spark number, S min Indicates the minimum number of explosion sparks.
[0116] In the present invention, by setting the maximum number of explosion sparks, it is possible to prevent individual high-fitness fireworks from generating too many sparks, thereby controlling the scale of the search space and maintaining the controllability of the calculation. At the same time, by setting the minimum number of explosion sparks, it is possible to ensure that each individual firework generates at least a certain number of sparks, thus ensuring that the algorithm has basic search capabilities at each step and avoiding search stagnation.
[0117] Displace the fireworks explosion according to the explosion radius:
[0118] y ijk =x ij +rand(0,A ij )
[0119] Among them, y ijk represents the j-th dimension component of the k-th explosion spark produced by the i-th firework individual, x ij represents the jth dimension component in the i-th firework individual, rand(0, A ij ) means between 0 and A ij Pick a random number between ij Represents the j-th dimension component in the explosion radius of the i-th firework individual.
[0120]
[0121] Among them, x rj represents the j-th dimension component of a randomly selected firework individual, x gsj represents the j-th dimension component of the global optimal firework individual, x lsj represents the j-th dimensional component of the optimal fireworks individual in the previous iteration, λ1 represents the weight of the random fireworks individual, λ2 represents the weight of the global optimal fireworks individual, λ3 represents the weight of the optimal fireworks individual in the previous iteration, γ represents the displacement coefficient, and f s It represents the variance of the fitness values of all fireworks individuals, and f0 represents the preset variance value.
[0122] Among them, those skilled in the art can set the size of the preset variance value f0 according to actual conditions, and the present invention does not limit it.
[0123] In the present invention, the explosion radius can be dynamically adjusted based on the comparison of the variance of the fitness, thereby flexibly controlling the displacement of the individual fireworks. When the variance of the fitness is small, there may be more similar individuals. At this time, more randomness is introduced to encourage diversity. When the variance is large, more emphasis is placed on guiding local excellent solutions.
[0124] Randomly select some fireworks individuals, generate a random number, and determine whether the random number is less than the mutation probability. If so, perform Gaussian mutation operation:
[0125]
[0126] in, represents the jth dimension component of the i-th firework individual after Gaussian mutation, x ij represents the j-th dimensional component in the i-th firework individual, and e represents a random number that satisfies a Gaussian distribution with a mean of 1 and a variance of 1.
[0127] Among them, those skilled in the art can set the size of the mutation probability according to actual conditions, and the present invention does not limit it.
[0128] In the present invention, Gaussian mutation can effectively increase the diversity of solutions by introducing randomness, preventing the algorithm from falling into a local optimal solution during the optimization process. This random adjustment makes the search space wider and helps to explore new potential solutions.
[0129] Map each firework:
[0130] x′ ij =L j +|x ij |%(U j -L j )
[0131] Among them, x′ ij represents the j-th dimension component in the i-th firework individual after the mapping operation, L j Indicates the lower limit of the j-th dimension, U j Represents the upper limit of the j-th dimension, and % represents the modulo operation.
[0132] In the present invention, the mapping operation ensures that the parameters of each individual firework remain between the defined lower and upper limits, avoiding calculation errors or instability caused by individual parameters exceeding the allowed range.
[0133] Perform a selection operation on each firework individual, and the probability of each firework individual being selected is:
[0134]
[0135] Among them, P represents the selection probability, D represents the sum of the distances between the current individual and other individuals except itself, d represents the Euclidean distance between two individuals, and N represents the total number of firework individuals.
[0136] In the present invention, the selection probability is proportional to the distance between individuals, which means that in a group, individuals with higher fitness and farther distance from other individuals are more likely to be retained, which helps to ensure the stability and sustainability of high-quality solutions and avoid their elimination during iterations.
[0137] Determine whether the current number of iterations has reached the maximum number of iterations. If so, sort the fireworks individuals in descending order of fitness, and output the random seed solution represented by the fireworks individual with the highest fitness value as the optimal solution. Otherwise, return to continue iterating.
[0138] In the present invention, random seeds of the Voronoi diagram are generated by the fireworks optimization algorithm, with the goal of maximizing stress improvement, which can achieve highly targeted and effective global search optimization design, improve structural performance, reduce material waste, and speed up the design process.
[0139] S5: Map the random seeds to the 2D parameter domain and generate the Voronoi diagram.
[0140] In a possible implementation, S5 specifically includes: using least squares conformal mapping to map the random seeds to a 2D parameter domain to generate a Voronoi diagram.
[0141] Among them, Least Squares Conformal Mapping (LSCM) is a technology used to map a three-dimensional surface to a two-dimensional plane, and its purpose is to keep the angle invariance of the original surface as much as possible during the mapping process, that is, conformal mapping. Least Squares Conformal Mapping technology is a mature prior art and will not be described in detail in the present invention.
[0142] Specifically, the Voronoi diagram can be generated by using the divide-and-conquer method, the Delaunay triangulation method, the nearest neighbor search method, etc.
[0143] Taking the nearest neighbor method as an example, for each point on the 2D plane, calculate its distance to all seed points. Assign the points on the 2D plane to the nearest seed point, thereby defining the Voronoi unit of each seed point. Determine the boundaries of each Voronoi unit, which are the sets of all points that are equidistant to two or more seed points.
[0144] S6: Determine the intersection points between the Voronoi diagram and the edges of the model mesh.
[0145] It should be noted that each unit in the Voronoi diagram is defined by the nearest neighbor site (seed point). These units naturally divide the space so that the distance from the point inside each unit to the nearest neighbor site is the shortest. This division method can ensure the uniform distribution of the reinforcement ribs on the entire structure and avoid the problem of uneven stress distribution caused by over-dense or sparse areas in some areas. The intersection between the Voronoi diagram and the edge of the model grid is used as the distribution position of the reinforcement ribs. This is because the intersection is often where the stress in the structure is more concentrated or requires additional support. It can effectively improve the stability and manufacturing feasibility of the structure, and also meet the needs of stress optimization.
[0146] S7: Map the intersection points between the Voronoi diagram and the model mesh edge back to the surface of the craft 3D simulation model to determine the distribution position of each reinforcement rib.
[0147] In a possible implementation, S7 specifically includes: using least squares conformal inverse mapping to map the intersection between the Voronoi diagram and the model grid edge back to the surface of the handicraft 3D simulation model to determine the distribution position of each reinforcement rib.
[0148] It should be noted that least squares conformal inverse mapping is a technology used to inversely map points in a two-dimensional parameter domain back to the surface of a three-dimensional model, and is the inverse process of least squares conformal mapping in S5. The core of least squares conformal inverse mapping is to maintain the invariance of angles during the inverse mapping process. During the inverse mapping process, it is necessary to ensure that the points mapped from the two-dimensional plane back to the three-dimensional space still maintain the original angular relationship, so as to retain the geometric features of the original three-dimensional model as much as possible. The least squares conformal inverse mapping technology is a mature prior art and will not be described in detail in the present invention.
[0149] S8: Adjust the size of the reinforcement at each position with the goal of minimizing material consumption while meeting the structural strength requirements.
[0150] In a possible implementation, S8 specifically includes: determining the optimal size of the reinforcing ribs at various positions by a fireworks optimization algorithm while meeting the structural strength requirement and aiming to minimize material consumption.
[0151] Furthermore, S8 specifically includes sub-steps S801 to S803:
[0152] S801: To meet the structural strength, set the size optimization constraints:
[0153] h min ≤h j ≤h max
[0154] w min ≤w j ≤w max
[0155]
[0156] Among them, h j represents the height of the jth reinforcement, h min Indicates the minimum height limit, h max Indicates the maximum height limit, w j represents the width of the jth reinforcement, w min Indicates the minimum width limit, w max Indicates the maximum width limit. represents the equivalent stress of the workpiece at the jth reinforcement, represents the equivalent stress in the jth stiffener, and σ0 represents the stress safety threshold.
[0157] Among them, those skilled in the art can set the size of the stress safety threshold according to actual conditions, and the present invention does not limit it.
[0158] S802: With the goal of minimizing material consumption, determine the size optimization objective function:
[0159]
[0160] Among them, f2 represents the size optimization objective function, min represents minimization, l j represents the length of the jth reinforcement, l j In this step, it is a known quantity (determined by S7), and m represents the total number of reinforcing ribs.
[0161] S803: Minimize the size optimization objective function through the fireworks optimization algorithm to determine the optimal size of the reinforcement ribs at each position.
[0162] Specifically, the process of optimizing by the fireworks optimization algorithm can refer to the process of determining the random seed of the Voronoi graph by the fireworks optimization algorithm mentioned above, and to avoid repetition, the present invention will not go into details.
[0163] It is worth noting that in the process of optimization through the fireworks optimization algorithm, the inverse of the size optimization objective function needs to be used as the fitness function of the fireworks optimization algorithm to meet the requirement that the larger the fitness function, the better.
[0164] In the present invention, the optimal size of the reinforcing rib is determined by a fireworks optimization algorithm, which can minimize material consumption and reduce the printing cost of handicrafts while meeting the structural strength requirements.
[0165] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0166] In the present invention, through finite element analysis and Voronoi diagram, the stress concentration areas in the model are accurately identified, the distribution positions of each reinforcement rib are automatically and reasonably determined, and under the requirement of structural strength, the size of the reinforcement ribs at each position is automatically adjusted with the goal of minimizing material consumption, thereby saving manufacturing materials and reducing the printing cost of handicrafts.
[0167] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a 3D printing simulation device for handicrafts provided by the present invention.
[0168] The present invention also provides a 3D printing simulation device 20 for handicrafts, comprising:
[0169] Processor 201;
[0170] The memory 202 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 201, the 3D printing simulation method for handicrafts as described in the method embodiment is implemented.
[0171] The 3D printing simulation device 20 for handicrafts provided by the present invention can execute the above-mentioned 3D printing simulation method for handicrafts and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0172] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0173] In the present invention, through finite element analysis and Voronoi diagram, the stress concentration areas in the model are accurately identified, the distribution positions of each reinforcement rib are automatically and reasonably determined, and under the requirement of structural strength, the size of the reinforcement ribs at each position is automatically adjusted with the goal of minimizing material consumption, thereby saving manufacturing materials and reducing the printing cost of handicrafts.
[0174] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0175] There are a few points to note:
[0176] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0177] (2) For the sake of clarity, the thickness of a film or region in the drawings used to describe the embodiments of the present invention is enlarged or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a film, a region or a substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0178] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0179] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A 3D printing simulation method for handicrafts, characterized in that: include: S1: Obtain a 3D simulation model of the craft; S2: Meshing the 3D simulation model of the handicraft; S3: Perform finite element analysis on the 3D simulation model of the craft after meshing to determine the stress field distribution; S4: Generate random seeds for the Voronoi diagram according to the stress field distribution; S5: Mapping the random seeds to a 2D parameter domain to generate a Voronoi diagram; S6: Determine the intersection between the Voronoi diagram and the edge of the model grid; S7: Mapping the intersection points between the Voronoi diagram and the model grid edge back to the surface of the handicraft 3D simulation model to determine the distribution position of each reinforcing rib; S8: Adjust the size of the reinforcement at each position with the goal of minimizing material consumption while meeting the structural strength requirements.
2. The 3D printing simulation method for handicrafts according to claim 1, characterized in that: The S2 specifically includes: S201: using triangular meshes to perform preliminary mesh division on the 3D simulation model of the handicraft; S202: After the initial grid division, calculating the stress field distribution of the 3D simulation model of the craft; S203: determining the stress gradient at each position according to the stress field distribution of the 3D simulation model of the craft; S204: Adaptively adjust the mesh size at the corresponding position according to the stress gradient at each position: Among them, h x represents the grid size at position x, h0 represents the initial grid size, α represents the refinement coefficient, represents the gradient operator, represents the stress gradient at position x.
3. The 3D printing simulation method for handicrafts according to claim 1, characterized in that: The S3 specifically includes: S301: define the generalized displacement of each finite element and the node displacements within the finite element; S302: Determine the strain according to the strain-displacement equation; S303: Calculating strain components according to the determined strain; S304: Determine the total potential energy equation according to the principle of virtual work; S305: Substituting the variation of the strain component into the total potential energy equation; S306: Linearizing the total potential energy equation; S307: Solve the linearized equations using the Newton-Raphson method to determine the displacement field, strain field, and stress field distribution of each node.
4. The 3D printing simulation method for handicrafts according to claim 1, characterized in that: The S4 specifically includes: S401: According to the stress field distribution, calculate the probability of each finite element being selected as the Voronoi diagram seed: Among them, pi represents the probability that the i-th finite element is selected as the seed of the Voronoi graph, max represents the maximum value, σ i represents the stress at the i-th finite element, a i represents the material strength at the i-th finite element; S402: Generate a random number between 0 and 1 for each finite element, and determine whether the random number is greater than the selection probability; if so, select the finite element as a Voronoi graph seed; otherwise, do not select the finite element as a Voronoi graph seed.
5. The 3D printing simulation method for handicrafts according to claim 1, characterized in that: The S4 is specifically: With the goal of maximizing stress improvement, random seeds of the Voronoi diagram are generated through the fireworks optimization algorithm.
6. The 3D printing simulation method for handicrafts according to claim 5, characterized in that: The S4 specifically includes: S401: With the goal of maximizing stress improvement, determine the seed selection objective function: Among them, f1 represents the seed selection objective function, X represents the random seed scheme, max represents maximization, and τ represents the stress improvement degree. It represents the average stress after adding reinforcements of preset sizes according to the generated random seeds. represents the original stress average value, It represents the maximum stress value after adding reinforcements of preset size according to the generated random seeds. represents the original maximum stress value, and λ represents the weight coefficient of the stress average value; S402: Maximizing the seed selection objective function through a fireworks optimization algorithm to determine a random seed of the Voronoi diagram.
7. The 3D printing simulation method for handicrafts according to claim 1, characterized in that: The S5 is specifically: The random seeds are mapped to a 2D parameter domain using least squares conformal mapping to generate a Voronoi diagram; The S7 is specifically: The intersection points between the Voronoi diagram and the model mesh edge are mapped back to the surface of the 3D simulation model of the handicraft by using least squares conformal inverse mapping to determine the distribution position of each reinforcing rib.
8. The 3D printing simulation method for handicrafts according to claim 1, characterized in that: The S8 is specifically: While meeting the requirements of structural strength and aiming to minimize material consumption, the fireworks optimization algorithm is used to determine the optimal size of the reinforcement ribs at each position.
9. The 3D printing simulation method for handicrafts according to claim 8, characterized in that: The S8 specifically includes: S801: To meet the structural strength, set the size optimization constraints: h min ≤h j ≤h max In min ≤in j ≤in max Among them, h j represents the height of the jth reinforcement, h min Indicates the minimum height limit, h max Indicates the maximum height limit, w j represents the width of the jth reinforcement, w min Indicates the minimum width limit, w max Indicates the maximum width limit. represents the equivalent stress of the workpiece at the jth reinforcement, represents the equivalent stress in the jth stiffener, σ0 represents the stress safety threshold; S802: With the goal of minimizing material consumption, determine the size optimization objective function: Among them, f2 represents the size optimization objective function, min represents minimization, l j represents the length of the jth reinforcement rib, and m represents the total number of reinforcement ribs; S803: Minimizing the size optimization objective function by using a fireworks optimization algorithm to determine the optimal size of the reinforcing ribs at each position.
10. A 3D printing simulation device for handicrafts, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the 3D printing simulation method for handicrafts according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Load spectrum filtering method based on microscopic damage threshold of continuous fiber reinforced composite material
CN116187041A
Method and device for determining point cloud filtering threshold value, point cloud filtering method and device and mine car
CN116644275A
Rail transit anti-impact structure design method, device, equipment and medium
CN118468452A