A digital image generation method and system for a trend toy

By performing defect diagnosis and graph neural network repair on the 3D model output by generative AI, combined with adaptive remeshing and printability optimization, the structural defect problem of generative AI model is solved, and the automated conversion from generative AI output to production-ready printable documents is realized.

CN122176244BActive Publication Date: 2026-07-07SHENYANG JIUCHENG TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENYANG JIUCHENG TECH CO LTD
Filing Date
2026-05-11
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technologies produce 3D models with structural defects that prevent them from being directly used for 3D printing, and they also lack printability optimization capabilities for additive manufacturing.

Method used

By loading the original mesh model, defect diagnosis is performed to generate a defect map. Geometric topology repair is performed using a graph neural network, and a manifold mesh model is output. Through adaptive remeshing and printability optimization, an engineering-grade model file is generated.

Benefits of technology

It achieves comprehensive identification and repair of non-manifold edges, holes, self-intersecting surfaces, inconsistent normals, and insufficient wall thickness, and outputs engineering-level model files that meet printability requirements, realizing end-to-end automated conversion from generative AI output to production-ready printable files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176244B_ABST
    Figure CN122176244B_ABST
Patent Text Reader

Abstract

The application discloses a trend toy digital image generation method and system, and relates to the technical field of digital image generation.The method comprises the following steps: loading an original grid model output by a generative AI model; performing defect diagnosis on the original grid model to generate a defect atlas; performing geometric topology repair on the defect atlas by using a graph neural network to output a manifold grid model; performing adaptive remeshing on the manifold grid model to output a remeshed model; inputting the remeshed model into a printability optimization engine, and sequentially performing automatic shell extraction and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic parting and mortise design to output an engineering-level model file and a printability report.The application realizes end-to-end automatic conversion from an original model output by a generative AI to a production-ready printable file, and solves the technical problems of limited grid repair precision and lack of printability optimization for additive manufacturing in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital character generation technology, specifically to a method and system for generating digital characters for trendy toys. Background Technology

[0002] Optimization of 3D mesh models is a technology that urgently needs to be mastered in the field of toy digital character generation.

[0003] In the prior art, CN103617603A discloses a voxel-based mesh repair method, which obtains a watertight two-dimensional manifold model by converting the model into a volume representation and then extracting the surface mesh. However, this method relies on a fixed rule table to generate patches, which limits the repair accuracy, and it only outputs a basic mesh without optimizing for printability in manufacturing. In addition, CN113538689A discloses a neural network-based mesh simplification method, which achieves model simplification by fusing a quadratic error metric with curvature features. However, this method is geared towards mesh simplification scenarios and cannot handle structural defects such as non-manifold edges and self-intersecting surfaces that are common in AI-generated models.

[0004] Therefore, how to automate and intelligently repair the original 3D model output by generative AI, and further optimize it into a production-ready printable file, has become an urgent problem to be solved. Summary of the Invention

[0005] This invention addresses the technical problems of existing generative artificial intelligence models, which generally suffer from structural defects in the original 3D mesh models and lack the ability to optimize the printability for additive manufacturing. It provides a method and system for generating digital images of trendy toys.

[0006] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0007] In a first aspect, the present invention provides a method for generating digital images of trendy toys, comprising:

[0008] Load the original mesh model output by the generative AI model, wherein the original mesh model contains 3D mesh data of vertices, edges and faces;

[0009] Perform defect diagnosis on the original mesh model to generate a defect map;

[0010] Based on the defect map, a pre-trained graph neural network is used to perform geometric topology repair on the original mesh model, and output a manifold mesh model.

[0011] Adaptive remeshing is performed on the manifold mesh model to output an isotropic and curvature-adaptive remeshed model;

[0012] The remesh model is input into the printability optimization engine, which sequentially performs automatic shelling and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic part separation and tenon design, and outputs an engineering-level model file and a printability report. The engineering-level model file contains the mesh of each part after part separation, the intelligent support structure and assembly features, and the printability report contains defect diagnosis results, printing process parameters and assembly instructions.

[0013] Secondly, the present invention provides a digital character generation system for trendy toys, comprising:

[0014] The model loading module is used to load the original mesh model output by the generative AI model, wherein the original mesh model contains 3D mesh data of vertices, edges and faces;

[0015] The defect diagnosis module is used to perform defect diagnosis on the original mesh model and generate a defect map;

[0016] The topology repair module is used to perform geometric topology repair on the original mesh model based on the defect map using a pre-trained graph neural network, and output a manifold mesh model.

[0017] An adaptive remeshing module is used to perform adaptive remeshing on the manifold mesh model and output an isotropic and curvature-adaptive remeshing model.

[0018] The printability optimization module is used to input the remeshized model into the printability optimization engine, and sequentially execute automatic shelling and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic part separation and tenon design, and output engineering-level model files and printability reports; wherein the engineering-level model files include the mesh of each part after part separation, intelligent support structures and assembly features, and the printability report includes defect diagnosis results, printing process parameters and assembly instructions.

[0019] The beneficial effects of this invention are:

[0020] Compared to existing technologies, this invention first generates a defect map through defect diagnosis, achieving comprehensive identification of five types of defects: non-manifold edges, holes, self-intersecting surfaces, inconsistent normals, and insufficient wall thickness. Secondly, based on the defect map, a graph neural network is used for geometric topology repair, automatically completing hole filling, non-manifold edge splitting, self-intersecting surface removal, and normal unification, outputting a manifold mesh model. Thirdly, curvature-adaptive remeshing achieves isotropic uniform meshes while preserving geometric features. Finally, a printability optimization engine sequentially executes automatic shelling, support generation, shrinkage compensation, automatic part separation, and tenon design, outputting engineering-level model files and printability reports. This achieves end-to-end automated conversion from the original model output by generative AI to a production-ready printable file, solving the technical problems of limited mesh repair accuracy and lack of printability optimization for additive manufacturing in existing technologies. Attached Figure Description

[0021] Figure 1 A flowchart illustrating a method for generating digital avatars for trendy toys provided by the present invention;

[0022] Figure 2 This is a schematic diagram of the structure of a digital character generation system for trendy toys provided by the present invention.

[0023] In the attached diagram, the components represented by each number are as follows:

[0024] Model loading module 11, defect diagnosis module 12, topology repair module 13, adaptive remeshing module 14, printability optimization module 15. Detailed Implementation

[0025] Example 1, as Figure 1 As shown, this embodiment of the invention provides a method for generating digital images of trendy toys, including:

[0026] S10: Load the original mesh model output by the generative AI model, wherein the original mesh model contains 3D mesh data of vertices, edges and faces;

[0027] First, the original mesh model output by the generative AI model is loaded. In the context of trendy toy design, designers typically use text descriptions or sketches as input, and then use a generative AI model to quickly generate multiple 3D concept designs. This generative AI model can be a 3D generative model based on a diffusion architecture, a generative model based on a neural radiation field, or a 3D generative model based on a variational autoencoder. Its output original mesh model contains 3D mesh data of vertices, edges, and faces. Vertices are coordinate points in 3D space, edges are line segments connecting two vertices, and faces are triangles formed by three sides or quadrilaterals formed by four sides. Multiple faces are pieced together to form the 3D shape of the toy.

[0028] However, during the rapid generation of 3D models, generative AI models often suffer from various structural defects in their output mesh models due to the lack of explicit modeling of geometric and topological constraints. For example, non-manifold edges prevent the model from having clearly defined boundaries, holes compromise the model's closure, self-intersecting surfaces cause volume calculation errors, inconsistent normals result in black spots in the rendering, and insufficient wall thickness directly renders the model unsuitable for 3D printing. These defects prevent the output of generative AI from being directly used in subsequent 3D printing production. Therefore, it is necessary to load this original mesh model as input to provide a processing object for subsequent defect diagnosis, geometric repair, and printability optimization.

[0029] Specifically, this step aims to connect the creative generation capabilities of generative AI with the engineering-based printable optimization capabilities, enabling designers to quickly transform creative concepts into production-ready digital models.

[0030] S20: Perform defect diagnosis on the original mesh model and generate a defect map;

[0031] Secondly, a defect diagnosis is performed on the loaded original mesh model to generate a defect map. The original mesh model is rapidly generated by a generative AI model. Due to the lack of explicit modeling of geometric topological constraints, it commonly exhibits five types of structural defects: non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness. These defects can lead to errors or failures in subsequent mesh repair, surface subdivision, Boolean operations, and 3D printing slicing. Therefore, a comprehensive examination of the original mesh model is necessary before repair to accurately identify the location, type, and severity of various defects, providing a targeted basis for subsequent geometric topological repair.

[0032] A defect map is a data structure that spatially labels various geometric defects in an original mesh model. Using a 3D mesh model as its basis, the defect map uses a heatmap format to attach defect type labels to each vertex, edge, or facet of the model, forming a multi-channel defect labeling map. For example, for non-manifold edges, a non-manifold defect identifier is marked on the corresponding edge; for holes, a hole defect identifier and boundary length information are marked on the vertex sequence of the hole boundary; for self-intersecting surfaces, a self-intersecting defect identifier is marked on the intersecting facet; for regions with inconsistent normals, normal defect identifiers are marked on the facets with abnormal normal directions; and for regions with insufficient wall thickness, wall thickness defect identifiers are marked on the voxels or facets with insufficient thickness.

[0033] By overlaying the aforementioned defect markers, a multi-channel heatmap-like defect map is formed. This defect map not only visually displays the distribution of defects at various locations on the model but also provides structured input features for subsequent geometric topology repair using graph neural networks. This allows the repair network to adopt differentiated repair strategies based on defect type, improving the targeting and accuracy of the repair. Specifically, this step aims to transform implicit defects in the original mesh model into explicit structured markers, enabling the defect information to be directly utilized by subsequent intelligent repair algorithms.

[0034] Specifically, defect diagnosis is performed on the original mesh model to generate a defect map, wherein the defect map is marked in the form of a heatmap of non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness in the original mesh model, including:

[0035] Traverse each edge and count the number of faces associated with the edge. If the number is not equal to the preset standard number, mark it as a non-manifold edge.

[0036] All open loops are identified using a boundary edge tracing algorithm. Each closed loop boundary is marked as a hole, and the boundary length, bounding box size, and boundary vertex sequence of the hole are recorded.

[0037] A spatial hash grid or hierarchical bounding box tree is used to detect whether all triangular faces have intersections with other faces. If an intersection exists, it is marked as a self-intersecting face.

[0038] Select the face near the center of the bounding box as the seed face, perform breadth-first traversal, compare the angle between the normals of adjacent faces, if the angle exceeds the normal consistency angle threshold, the normal is determined to be reversed, and the proportion of normals pointing outward of the model is counted. If the proportion is lower than the preset orientation proportion threshold, it is marked as a normal inconsistency region.

[0039] Voxel sampling is performed on the model or rays are emitted along the normal direction. The distance from each sampling point to the opposite surface along the inner normal direction is calculated. If the distance is less than the minimum printable wall thickness threshold, it is marked as an area with insufficient wall thickness.

[0040] The marking results of the above-mentioned non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness are superimposed into a multi-channel heat map, which serves as the defect map.

[0041] Specifically, the defect map uses a heatmap format to mark non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness in the original mesh model. These five types of defects are the most common geometric quality problems in the 3D mesh models output by generative AI models, collectively rendering the models unusable for direct 3D printing.

[0042] Among them, non-manifold edges refer to edges with more than two associated faces, making it impossible to define a clear interior and exterior, thus making the original mesh model topologically unorientable; holes are open loops in the mesh formed by boundary edges, which destroy the closure of the original mesh model, causing the model to fail to meet watertightness requirements; self-intersecting surfaces are triangular faces that penetrate each other in the mesh, causing geometric errors and causing volume calculations and Boolean operations to fail; regions with inconsistent normals refer to adjacent faces with normals pointing in opposite directions, causing black edges or cutouts during rendering and printing; regions with insufficient wall thickness are local thicknesses of the original mesh model that are below the printable lower limit, which can easily lead to printing breakage or structural fragility.

[0043] First, traverse each edge and count the number of faces associated with that edge. If the number is not equal to a preset standard number, it is marked as a non-manifold edge. In a closed manifold mesh, each edge should be shared by exactly two faces, i.e., the number of associated faces should be two. When the number of associated faces is one or more, the edge is a non-manifold edge. The preset standard number refers to the number of reference faces that an edge should be associated with in a closed manifold mesh, which can be set to two. By traversing all edges, all non-manifold edges can be identified and their positions marked in the defect map.

[0044] Secondly, all open loops are identified using a boundary edge tracing algorithm. Each closed loop boundary is marked as a hole, and the boundary length, bounding box size, and boundary vertex sequence of the hole are recorded. A boundary edge is an edge used by only one face, meaning there are no adjacent faces on the other side of the edge. Starting from any boundary edge, adjacent boundary edges are traced sequentially along the boundary direction until the starting point is reached, forming a closed boundary loop, which is a hole. For each hole, its boundary length, bounding box size, and the vertex sequence constituting the boundary are recorded to provide geometric information for subsequent hole filling.

[0045] Simultaneously, a spatial hash grid or hierarchical bounding box tree is used to detect whether all triangular faces intersect with other faces. If an intersection exists, it is marked as a self-intersecting face. Due to the large number of faces in the grid, performing intersection detection on each face individually is computationally complex. The spatial hash grid divides the 3D space into a uniform grid, assigning each face to its covered grid cells, detecting only face pairs within the same or adjacent grid cells, significantly reducing the number of detections. The hierarchical bounding box tree recursively groups faces and constructs bounding boxes, accelerating detection by quickly eliminating non-intersecting bounding box pairs. When an intersection is detected between two faces, both faces are marked as self-intersecting faces.

[0046] Then, a face near the center of the bounding box is selected as the seed face. A breadth-first traversal is performed, comparing the angle between the normals of adjacent faces. If the angle exceeds the normal consistency angle threshold, the normals are determined to be reversed. The proportion of normals pointing outwards from the model is counted. If this proportion is lower than a preset orientation proportion threshold, it is marked as a region with inconsistent normals. Specifically, in most manifold meshes, normals should uniformly point outwards from the model. The normal consistency angle threshold represents the critical angle value used to determine whether the normal directions of two adjacent faces are consistent. Its function is to distinguish between adjacent faces with normal directions and those with opposite normal directions. This normal consistency angle threshold is set according to the maximum allowable normal deviation angle in the mesh model and can be set to 90 degrees.

[0047] When the angle between the normals of adjacent faces is greater than 90 degrees, it indicates that the normal direction of one face is inconsistent with its surroundings. After breadth-first traversal, the proportion of faces with normals pointing outwards is counted. If this proportion is lower than a preset orientation proportion threshold, it indicates a serious problem with inconsistent normals, and the face needs to be marked as an inconsistent normal region. The orientation proportion threshold is a critical value used to determine whether the normal directions of the entire mesh model are consistent. It represents the lower limit of the proportion of faces with normals pointing outwards within the model. This threshold is set based on model quality requirements and the sensitivity of subsequent printing to normal consistency; for example, it can be set to 50%. When the proportion of faces with normals pointing outwards is less than 50%, it indicates that more than half of the faces have incorrect normal directions, and these faces need to be marked as inconsistent normal regions and global normal unification repair should be performed.

[0048] Furthermore, the model is voxelized and sampled or rays are emitted along the normal direction. The distance from each sampling point to the opposite surface along the inner normal direction is calculated. If the distance is less than the minimum printable wall thickness threshold, it is marked as an area with insufficient wall thickness.

[0049] Voxel sampling is the process of discretizing a continuous 3D mesh model into regular 3D mesh cells. Specifically, first, the bounding box of the original mesh model is calculated, which is the cuboid space defined by the minimum and maximum values ​​of the model along the X, Y, and Z coordinate axes. This bounding box is then divided into uniform voxel meshes according to a preset resolution, for example, 150 intervals per dimension, forming a voxel space composed of small cubic cells. The side length of each voxel cell is equal to the side length of the bounding box divided by the number of intervals in that dimension. Each voxel cell is traversed, and it is determined whether the center point of the voxel is inside the model. This can be done using ray casting, where a ray is emitted from the voxel in any direction, and the number of intersections between the ray and a model face is counted. If the number of intersections is odd, the point is inside the model; if it is even, the point is outside. For voxels determined to be inside the model, a ray is emitted from the center of the voxel along the model's internal normal direction to the opposite surface. The distance between the two intersection points is the wall thickness at that location. If no intersection is found within the preset search radius, the voxel is marked as a thin-walled region. The preset search radius can be set to, for example, 10% of the diagonal length of the bounding box or directly to 5 mm.

[0050] The minimum printable wall thickness threshold refers to the minimum material thickness that a 3D printing device can stably form. It represents the minimum allowable size of the printed layer or wall without breakage or deformation. This minimum printable wall thickness threshold is set according to the process capabilities of the 3D printing device. For example, it can be set to 0.5 mm for resin photopolymer 3D printing devices and 0.8 mm for fused deposition modeling (FDM) devices. If the calculated wall thickness is less than this minimum printable wall thickness threshold, it means that the structure at that location is too weak and is prone to breakage, warping, or failure to form during printing. This voxel area needs to be marked as an area with insufficient wall thickness for subsequent thickness compensation or structural reinforcement.

[0051] Finally, the labeled results for non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness are superimposed to form a multi-channel heatmap, serving as a defect map. Each channel corresponds to a type of defect, with the value at the corresponding location in the model representing the defect type. Using this defect map, the subsequent graph neural network can accurately identify the defect types in each region of the original mesh model, thereby enabling targeted repair strategies.

[0052] S30: Based on the defect map, a pre-trained graph neural network is used to perform geometric topology repair on the original mesh model, and output a manifold mesh model;

[0053] Furthermore, based on the aforementioned defect map, a pre-trained graph neural network is used to perform geometric topological repair on the original mesh model, outputting a manifold mesh model. A manifold mesh model refers to a triangular mesh that satisfies manifold geometric properties, mathematically defined as follows: each edge in the mesh is shared by at most two triangular faces, and the neighboring triangular faces of each vertex are topologically equivalent to a disk or semi-disk. Meshes satisfying manifold properties have well-defined internal and external boundaries and do not exhibit topological anomalies such as non-manifold edges, holes, or self-intersections. Specifically, a manifold mesh model is a prerequisite for subsequent operations such as remeshing, shelling, and support generation; non-manifold meshes will cause slicing software to fail to process correctly or print incorrectly.

[0054] The defect map records the spatial locations and defect types of non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness in the original mesh model, providing structured repair guidance for the graph neural network. Graph neural networks are deep learning models specifically designed for processing graph-structured data, effectively capturing the topological relationships between mesh vertices connected by edges. In this step, the original mesh model is converted into a graph structure, where nodes correspond to mesh vertices and edges correspond to mesh connections. Each node's features include 3D coordinates, normal vectors, Gaussian curvature, and defect type identifiers sampled from the defect map. The graph neural network, through an encoder-decoder architecture, aggregates information from nodes and their neighboring subgraphs to learn the mapping relationship from a defective mesh to a manifold mesh.

[0055] Specifically, graph neural networks are used to perform geometric topology repair on the original mesh model. This repair includes four subtasks: hole filling, non-manifold edge splitting, self-intersecting surface removal, and global normal unification. The repair outputs a manifold mesh model that satisfies manifold geometry, providing topologically correct input for subsequent adaptive remeshing.

[0056] Specifically, geometric topology repair is performed using a graph neural network based on the defect map, wherein the geometric topology repair includes hole filling, non-manifold edge splitting, self-intersecting surface removal, and global normal unification, including:

[0057] The original mesh model is converted into a graph structure, where the nodes of the graph are vertices and the edges of the graph are mesh connections. The features of each node include three-dimensional coordinates, normal vector, Gaussian curvature, and defect type identifier sampled from the defect map.

[0058] For each hole, the encoder of the graph neural network aggregates the information of the hole boundary vertices and their neighborhood subgraphs to output a latent geometric feature vector. Then, the decoder predicts the three-dimensional coordinates of the new vertex autoregressively. Curvature continuity constraints are used to minimize the rate of change of the angle between the normal of the newly generated patch and the normal of the surrounding existing patches. Finally, Delaunay triangulation is performed on the newly added vertex sequence to generate patch patches.

[0059] For each non-manifold edge, all faces associated with the edge are sorted according to the angle around the edge. For each pair of adjacent faces, the original edge is split into a new edge and the shared vertices are copied, so that each new edge is associated with only a preset standard number of faces.

[0060] For each pair of self-intersecting faces, extract the minimum bounding box of the intersection region, remove all faces within the bounding box to form a local hole, then call the hole filling submodule to re-triangulate the local hole, and verify by random sampling that the newly generated face does not intersect with the outer face;

[0061] Select a face with outward-pointing normals as the seed face, and adjust the normal directions of adjacent faces to be consistent with the seed face through connectivity propagation, so that the normals of all faces point outwards, and output the manifold mesh model.

[0062] First, the original mesh model is converted into a graph structure, where the nodes of the graph are vertices and the edges of the graph are mesh connections. The features of each node include three-dimensional coordinates, normal vector, Gaussian curvature, and defect type identifier sampled from the defect map.

[0063] In this system, 3D coordinates are the position vectors of vertices in 3D space, used to determine the geometry of the mesh model; normal vectors are unit vectors perpendicular to the local surface where a vertex is located, used to characterize the orientation of the surface at that vertex; Gaussian curvature is a quantitative measure of the degree of curvature of the surface at a vertex, calculated by the product of the two principal curvatures, with positive values ​​representing elliptical points, negative values ​​representing hyperbolic points, and zero values ​​representing parabolic points, used to identify the edges and planar regions of the model. Furthermore, defect type identifiers specifically include non-manifold edge identifiers, hole boundary identifiers, self-intersecting surface identifiers, inconsistent normal identifiers, and insufficient wall thickness identifiers. By converting the original mesh model into a graph structure, the graph neural network can aggregate information from each node and its neighborhood subgraph using graph convolution operations, capturing the topological connections between mesh vertices.

[0064] Secondly, for each hole, the encoder of the graph neural network aggregates the information of the hole boundary vertices and their neighborhood subgraphs to output a potential geometric feature vector. Then, the decoder predicts the three-dimensional coordinates of the new vertex autoregressively. Curvature continuity constraints are used to minimize the rate of change of the angle between the normal of the newly generated patch and the normal of the surrounding existing patches. Finally, Delaunay triangulation is performed on the newly added vertex sequence to generate patch patches.

[0065] Graph neural networks are deep learning models used to process graph-structured data. In this step, an encoder-decoder architecture is used to construct a hole-filling network. Optionally, the encoder consists of three stacked graph convolutional layers. The first graph convolutional layer takes 13 input node features, including 3D coordinates, 3D normal vectors, 1D Gaussian curvature, and 6D defect type identifiers, and outputs 64 features. The second graph convolutional layer takes 64 input features and outputs 128 features. The third graph convolutional layer takes 128 input features and outputs 256 features. Each graph convolutional layer is followed by a batch normalization layer and a ReLU activation function. The encoder finally aggregates the features of all nodes into a fixed-dimensional latent geometric feature vector with a dimension of 256 through global average pooling. The decoder consists of three fully connected layers. The first layer takes 256 input features and outputs 128; the second layer takes 128 input features and outputs 64; the third layer takes 64 input features and outputs 3, outputting the 3D coordinates of the new vertex. The decoder uses an autoregressive prediction method, which uses the coordinates of the previous predicted vertex as part of the input to gradually generate the next vertex.

[0066] Specifically, the encoder aggregates features such as the spatial position, normal, and defect type of all vertices within the hole boundary vertex and its k-order neighborhood subgraph through multi-layer graph convolution. Let the sequence of hole boundary vertices be v1, v2, ..., v m For each boundary vertex v i The k-th order neighborhood subgraph is extracted, where k can be set to 2 or 3. The graph convolution is calculated as follows: the feature of a node in layer (l+1) equals the feature of the node in layer l multiplied by its own weight matrix, plus the sum of the features of all neighboring nodes multiplied by their neighbor weight matrices, and then passed through an activation function. After three layers of graph convolution, the feature dimension of each boundary vertex expands from 13 dimensions to 256 dimensions. Global average pooling is then used to average the features of all boundary vertices, outputting a 256-dimensional latent geometric feature vector. This vector encodes the geometric shape and defect information of the hole boundary and its neighborhood.

[0067] The decoder uses the geometric feature vector as a condition and employs an autoregressive approach to predict the 3D coordinates of new vertices point by point. The decoder's initial input is a zero vector, which, combined with the geometric feature vector, predicts the coordinates of the first new vertex. Using the coordinates of the first predicted vertex as a known point, the decoder is input again to predict the coordinates of the second new vertex. This process is repeated, each time using all the generated vertex coordinates as context to progressively predict the next vertex, until the predicted vertex sequence forms a closed patch boundary. During prediction, the decoder's loss function consists of two parts: the mean squared error between the predicted and true coordinates, and a curvature continuity constraint term.

[0068] The curvature continuity constraint refers to ensuring that the change in the normal direction of a newly generated patch is as gradual as possible when it is joined with surrounding existing patches. In practice, for the predicted i-th new vertex, the normal of the new patch centered on that vertex is first calculated, then the angle between this normal and the normals of adjacent existing patches on the hole boundary is calculated, and the square of this angle is used as the curvature loss of that vertex. The curvature losses of all new vertices are summed to obtain the curvature continuity constraint term. The decoder's total loss function equals the mean square error of the vertex coordinate prediction plus the weight coefficient of the curvature continuity constraint term multiplied by the curvature loss. The weight coefficient can be set between 0.1 and 0.5. By minimizing this total loss, the decoder can simultaneously consider the accuracy of the geometric position and the smooth transition between the newly generated surface and the surrounding surfaces when predicting the coordinates of new vertices, ensuring first-order geometric continuity between the new patch and the original surface at the boundary, thus avoiding creases or visual discontinuities.

[0069] After prediction, a new vertex sequence is obtained. This vertex sequence is merged with the vertex sequence of the hole boundary to form a complete closed boundary. Delaunay triangulation is performed on the point set within the closed boundary: first, the two-dimensional projected coordinates of the point set are calculated, a Delaunay triangulation is constructed in the projection plane, and then the projected coordinates are mapped back to three-dimensional space to generate patch faces that fill the holes.

[0070] Through the above steps, the hole is completely filled, and the newly generated patch is geometrically first-order continuous with the surrounding original surface.

[0071] Furthermore, for each non-manifold edge, all faces associated with that edge are sorted according to their angle around the edge. For each pair of adjacent faces, the original edge is split into a new edge and its shared vertices are copied, ensuring that each new edge is associated with only a preset standard number of faces. The preset standard number is two, meaning each edge should be associated with exactly two faces. By splitting non-manifold edges into multiple independent new edges, each associated with only one pair of adjacent faces, the non-manifold edge defect can be eliminated.

[0072] Furthermore, for each pair of self-intersecting patches, the minimum bounding box of the intersection region is extracted, and all patches within the bounding box are removed to form local holes. The hole-filling submodule is then called to re-triangulate the local holes, and random sampling is used to verify that the newly generated patches do not intersect with the outer patches. The hole boundaries formed after removing self-intersecting patches are usually complex and irregular shapes. By calling the aforementioned hole-filling submodule to re-triangulate, patch patches without self-intersecting patches can be generated.

[0073] To ensure the validity of the repair results, multiple points are randomly sampled within the patch area, and rays are emitted in each direction to verify whether there are intersections with other patches. If there are no intersections, the repair is considered successful.

[0074] Furthermore, a face with outward-pointing normals is selected as the seed face. Through connectivity propagation, the normal directions of adjacent faces are adjusted to align with the seed face, ensuring all face normals point outwards, thus outputting a manifold mesh model. Specifically, starting from the seed face, a breadth-first search is used to visit all adjacent faces. For each adjacent face, the dot product of its normal and the current face's normal is calculated. If the dot product is negative, the normal direction of that adjacent face is flipped to align with the seed face's normal direction. Through this propagation, the face normals within all connected regions are uniformly pointed outwards.

[0075] In summary, through the above repair steps, non-manifold edges, holes, self-intersecting surfaces, and inconsistent normals in the original mesh model are repaired one by one, outputting a manifold mesh model that satisfies manifold geometry, providing topologically correct input for subsequent adaptive remeshing. Specifically, this step aims to leverage the modeling capabilities of graph neural networks for mesh topology to achieve integrated automated repair of the five types of defects, replacing the traditional manual repair method that relies on fixed rule tables, thus improving repair accuracy and efficiency.

[0076] S40: Perform adaptive remeshing on the manifold mesh model to output an isotropic and curvature-adaptive remeshed model;

[0077] Furthermore, adaptive remeshing is performed on the aforementioned manifold mesh model to output an isotropic and curvature-adaptive remeshed model. Although the manifold mesh model has a correct topological structure after geometric topology repair, its mesh cells often suffer from uneven side lengths and inconsistent triangle shapes. Specifically, this manifests as excessively long or short sides in flat regions, insufficient mesh density to capture geometric details in regions with drastic curvature changes, and overly dense meshes causing computational redundancy in regions with gentle curvature. Poor mesh quality in the manifold mesh model directly affects the stability and accuracy of subsequent operations such as shelling, Boolean operations, and finite element analysis. Therefore, remeshing is necessary.

[0078] Adaptive remeshing adjusts the mesh density adaptively based on the curvature distribution of the model, making the mesh edge length inversely proportional to the curvature magnitude. Specifically, it generates dense short edges in regions of high curvature to preserve geometric details, and sparse long edges in regions of low curvature to reduce data volume. Simultaneously, it aims to make all mesh cells approximate equilateral triangles, achieving isotropy. This process sets a target edge length for each vertex based on the curvature field and uses iterative operations such as edge folding, edge splitting, edge flipping, and vertex Laplacian smoothing to ensure that the deviation of all edge lengths from the target edge length is less than a preset deviation threshold, and that the minimum angle of all triangles is greater than a preset minimum angle threshold.

[0079] Specifically, this step stems from the fact that while the repaired manifold mesh model has correct topology, its mesh quality is poor and cannot be directly used for high-precision printability optimization. Adaptive remeshing yields a high-quality mesh model with uniform mesh cells and adapted curvature, ensuring accurate representation of the model's geometric features while reducing the computational complexity of subsequent processing. This provides an ideal input mesh for operations such as shelling and support generation. Furthermore, the isotropic mesh properties contribute to the stability of numerical computation and the smoothness of printing path planning.

[0080] Specifically, adaptive remeshing is performed on the manifold mesh model, wherein the adaptive remeshing sets the target edge length based on the curvature field, and through iterative operations of edge folding, edge splitting, edge flipping, and vertex Laplacian smoothing, the deviation of all edge lengths from the target edge length is less than a preset deviation threshold, including:

[0081] Calculate the curvature value at each vertex and normalize the curvature value to a preset interval to obtain the curvature field;

[0082] The target side length of each vertex is set according to the curvature field, where the target side length is inversely proportional to the curvature value;

[0083] An iterative optimization loop is used to perform the following operations sequentially until the deviation of all side lengths from the target side length is less than a preset deviation threshold, and the minimum angle of all triangles is greater than a preset minimum angle threshold: For edges with a length less than the first proportional threshold of the target side length, edge folding is performed, merging the two endpoints into a new vertex; For edges with a length greater than the second proportional threshold of the target side length, edge splitting is performed, inserting a new vertex at the midpoint of the edge; For edges where the Delaunay condition of two adjacent triangles is improved after flipping, edge flipping is performed; Each vertex is moved to the average position of its adjacent vertices, with the movement distance limited not to more than the movement limit ratio of the original position, and the smoothing weight is inversely proportional to the curvature;

[0084] After each modification, the maximum geometric deviation between the current mesh and the manifold mesh model is calculated. If the maximum geometric deviation exceeds a preset geometric deviation threshold, the modification is rolled back, and the remeshized model is output.

[0085] First, the curvature value at each vertex is calculated and normalized to a preset interval to obtain a curvature field. The curvature value reflects the degree of curvature of the surface at that vertex and can be measured using mean curvature or Gaussian curvature. After calculating the curvature values ​​for all vertices, they are normalized to a preset interval of 0 to 1. A larger curvature value indicates richer geometric details in the region, requiring a denser mesh for depiction; a smaller curvature value indicates a flatter region, allowing for a sparser mesh. The normalized curvature values ​​constitute the curvature field, which guides the subsequent setting of the target edge length.

[0086] Secondly, the target side length of each vertex is set according to the curvature field, where the target side length is inversely proportional to the curvature value. Specifically, the target side length equals the reference side length divided by the curvature value, where the reference side length is a reference value used to control the overall mesh density. It can be set according to the overall size of the model and the desired mesh density, for example, it can be set to 1% of the diagonal length of the model bounding box or set to 2 mm. Regions with larger curvature values ​​have smaller target side lengths and denser meshes; regions with smaller curvature values ​​have larger target side lengths and sparser meshes.

[0087] It is important to note that when the curvature value approaches zero, the target side length will tend to infinity. To avoid computational anomalies, a lower threshold can be set for the curvature value, for example, a minimum curvature value of 0.001. When the original curvature value at a point is less than this threshold, the target side length is calculated according to the threshold. Through the above inverse relationship and protective measures, adaptive remeshing can minimize the number of mesh cells while preserving geometric details.

[0088] Then, an iterative optimization loop is adopted to sequentially perform edge folding, edge splitting, edge flipping and vertex Laplacian smoothing operations until the deviation of all edge lengths from the target edge length is less than the preset deviation threshold, and the minimum angle of all triangles is greater than the preset minimum angle threshold.

[0089] The preset deviation threshold is used to determine whether the current side length is close to the allowable error range of the target side length. It represents the maximum relative deviation limit at which the side length adjustment operation can be terminated. This preset deviation threshold is set based on a balance between remeshing accuracy requirements and computational efficiency; for example, it can be set to 10% of the target side length. When the difference between the actual length of a side and the target side length divided by the absolute value of the target side length is less than 10%, the side length is considered to meet the requirements and no further adjustment is needed. The preset minimum angle threshold is the minimum angle critical value used to determine whether the triangle shape is acceptable. It represents the minimum acceptable interior angle of a triangular mesh element. This preset minimum angle threshold is set based on the mesh quality requirements of finite element analysis or printed slices; for example, it can be set to 30 degrees. When the minimum interior angle of all triangles is greater than 30 degrees, it indicates that there are no excessively long triangles in the mesh, and the mesh shape quality is acceptable. If the minimum angle of a triangle is less than 30 degrees, the triangle is too long and needs to be improved by edge flipping.

[0090] Specifically, in each round of the iterative optimization loop, the following four operations are performed in sequence.

[0091] First, for edges whose length is less than a first proportional threshold of the target side length, edge folding is performed, merging the two endpoints into a new vertex. The first proportional threshold is used to determine if an edge is too short; its value is less than 1, for example, it can be set to 0.6 times the target side length. When the actual length of an edge is less than 0.6 times the target side length, the edge folding operation is triggered, merging the two endpoints of that edge into a new vertex. The position of the new vertex can be the midpoint or the average of the two endpoints, thereby eliminating excessively short edges and preventing overly dense regions in the mesh.

[0092] Second, for edges whose length exceeds the second proportional threshold of the target edge length, edge splitting is performed, inserting a new vertex at the edge's midpoint. The second proportional threshold is used to determine if an edge is too long; its value is greater than 1, for example, it can be set to 1.4 times the target edge length. When the actual length of an edge exceeds the target edge length multiplied by 1.4, the edge splitting operation is triggered, inserting a new vertex at the edge's midpoint and splitting the original edge into two new edges, thereby subdividing excessively long edges and increasing the mesh density in areas with high curvature.

[0093] Third, edge flipping is performed on edges where the Delaunay condition of two adjacent triangles is improved after flipping. Edge flipping involves swapping the shared diagonals of two adjacent triangles, i.e., deleting the shared edges and connecting opposite vertices to form new edges. When the minimum angle of the two triangles after flipping is greater than the minimum angle before flipping, the Delaunay condition is considered improved, and the edge flipping operation is performed. By flipping edges, elongated triangles can be eliminated, making the mesh cell shape closer to an equilateral triangle and improving mesh quality.

[0094] Fourth, each vertex is moved to the average position of its neighboring vertices. The movement distance is limited to no more than the proportion of the original position's movement limit, and the smoothing weight is inversely proportional to the curvature. Vertex Laplacian smoothing refers to updating the vertex position to the average position of all its neighboring vertices, making the surface smoother. The movement distance limit is the maximum allowed offset of the new position relative to the original position, obtained by multiplying the original position by the movement limit proportion. This movement limit proportion can be set to 0.5 to prevent excessive vertex movement from causing model volume shrinkage or loss of detail. The smoothing weight controls the degree to which vertices move closer to the average position of their neighborhood. This smoothing weight is inversely proportional to the curvature value at the vertex: the greater the curvature, the smaller the weight, and the weaker the smoothing, thus preserving fine features such as facial features and joints; the flatter the curvature, the larger the weight, and the stronger the smoothing, to eliminate noise and edges.

[0095] Finally, after each modification, the maximum geometric deviation between the current mesh and the original manifold mesh model is calculated. If the maximum geometric deviation exceeds a preset geometric deviation threshold, the modification is rolled back. The maximum geometric deviation is used to control the shape fidelity during the remeshing process. It is calculated as follows: a dense set of sampling points is taken on the current mesh, and the nearest distance from each sampling point to the surface of the original manifold mesh model is calculated. The maximum value of this distance among all sampling points is taken as the maximum geometric deviation.

[0096] The preset geometric deviation threshold is the maximum allowable deviation value used to limit the degree of mesh deformation during remeshing. It represents the maximum acceptable distance between the remeshed model surface and the original manifold mesh model surface. This preset geometric deviation threshold is set comprehensively based on the geometric accuracy requirements of the model and the shape fidelity requirements of subsequent printability optimization. For example, it can be set to 0.1% of the diagonal length of the model's bounding box. When a folding, splitting, flipping, or vertex Laplacian smoothing operation causes the maximum geometric deviation to exceed this threshold, it indicates that the modification has caused the mesh shape to deviate excessively from the original model, which may result in loss of detail or volume anomalies. In this case, the modification is rolled back, the current operation is abandoned, and the remeshing process is prevented from deviating excessively from the geometry of the original model. Through this geometric deviation control mechanism, the original geometry of the model can be effectively maintained while improving mesh quality.

[0097] Finally, the above iterative optimization loop is repeated until the deviation of all side lengths from the target side length is less than a preset deviation threshold, and the minimum angle of all triangles is greater than a preset minimum angle threshold. At this point, the iteration stops, and the remeshed model is output. Through the above adaptive remeshing process, a high-quality mesh model with uniform mesh cells and adapted curvature can be obtained. This ensures the accurate expression of the model's geometric features and provides an ideal input mesh for subsequent operations such as shelling and support generation.

[0098] S50: Input the remeshized model into the printability optimization engine, and sequentially execute automatic shelling and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic part separation and tenon design, and output engineering-level model files and printability reports; wherein the engineering-level model files include the mesh of each part after part separation, intelligent support structures and assembly features, and the printability reports include defect diagnosis results, printing process parameters and assembly instructions.

[0099] Finally, the remeshized model obtained through adaptive remeshization is input into the printability optimization engine. Although the remeshized model has good mesh quality and curvature adaptation, it still presents many engineering problems when used directly for 3D printing: the model is a solid structure, which wastes material and increases printing time; suspended parts lack support during printing; the cooling and shrinkage of the printing material can lead to dimensional deviations; for multi-color or multi-part toys, it is necessary to print them in parts and design the assembly structure.

[0100] Therefore, to address the aforementioned engineering challenges, this step employs a printability optimization engine to automate the engineering processing of the remeshed model. The printability optimization engine is an automated toolchain integrating multiple geometric processing algorithms, used to convert remeshed models with good mesh quality into engineering-grade model files directly usable for 3D printing production. Based on the characteristics of additive manufacturing processes, this printability optimization engine sequentially executes five sub-steps: automatic shell extraction and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance allowance, automatic part separation, and tenon / locking mechanism design. Each sub-step automates the processing of a specific type of engineering problem. Specifically, it includes:

[0101] First, automatic shell extraction and wall thickness control. Automatic shell extraction and wall thickness control is the process of converting a solid mesh model into a hollow shell model with a set wall thickness, and increasing the thickness of local stress concentration areas. At the same time, based on fluid dynamics principles, drainage holes are opened at the high and low points of the model to reduce material consumption, shorten printing time, and ensure that liquid resin can be completely drained.

[0102] Specifically, the automatic shell extraction and wall thickness control include:

[0103] The outer surface of the remesh model is offset inward along the normal direction by a preset reference wall thickness value to generate an inner surface, wherein the local wall thickness is increased to a preset thickened wall thickness value in the region where the curvature value exceeds a preset curvature threshold.

[0104] The outer surface and the inner surface of the remesh model are combined to form a closed shell model, and the internal entities of the remesh model are deleted.

[0105] Identify the highest and lowest points of the shell-like model, generate a preset number of drainage holes at the lowest point, and generate a preset number of drainage holes at the highest point. The positions of the drainage holes are determined by solving an optimization problem that minimizes the internal liquid residue.

[0106] First, the outer surface of the remesh model is offset inward along the normal direction by a preset reference wall thickness value to generate the inner surface. The preset reference wall thickness value is the standard wall thickness of the main body area of ​​the model, for example, it can be set to 1.5 mm. This reference wall thickness value must be greater than the minimum printable wall thickness of the 3D printing equipment to ensure that the model can be successfully printed, and must be less than the maximum thickness allowed by the material to avoid excessive material consumption and prolonged printing time. The specific method of offset operation is as follows: each vertex on the outer surface is moved in the opposite direction of its normal direction by the preset reference wall thickness value, thereby generating an inwardly contracting inner surface.

[0107] During the aforementioned offset process, for regions where the curvature value exceeds a preset curvature threshold, the local wall thickness is increased to a preset thickened wall thickness value. The curvature value reflects the degree of curvature of the surface at that location. The preset curvature threshold can be set to, for example, 0.5. When the curvature value of a region exceeds 0.5, it indicates that the region has a large degree of curvature and belongs to the tip, edge, or stress concentration area of ​​the model, requiring enhanced structural strength. In this case, the local wall thickness of the region is increased from the baseline wall thickness value to the preset thickened wall thickness value, for example, to 2.5 mm, to prevent breakage in these weak areas after printing. Through this differentiated wall thickness control, the main body of the model maintains a moderate wall thickness to save material, while stress concentration areas receive additional reinforcement to improve structural reliability.

[0108] Secondly, the outer and inner surfaces of the remeshized model are combined into a closed shell model, and the internal solids of the remeshized model are deleted. The outer surface is the visible surface of the original model, and the inner surface is the internal interface generated by offsetting. The two are connected at the boundary to form a closed thin-shell structure. At the same time, the solid filling part located between the outer and inner surfaces in the original remeshized model is deleted, making the model hollow instead of solid, thereby significantly reducing material consumption and printing time.

[0109] Furthermore, the highest and lowest points of the shell-like model are identified. A predetermined number of drainage holes are generated at the lowest point, and a predetermined number of drainage holes are generated at the highest point. The location of the drainage holes is determined by solving an optimization problem that minimizes the internal liquid residue. For photopolymer 3D printing, uncured liquid resin remains inside the model after printing, requiring drainage holes to drain it. The highest point refers to the highest position of the model in the vertical direction, and the lowest point refers to the lowest position of the model in the vertical direction. The predetermined number can be set, for example, to generate 2 to 4 drainage holes at the lowest point and 1 to 2 drainage holes at the highest point. The location of the drainage holes is determined by solving an optimization problem whose objective function is to minimize the volume of liquid residue inside the model. The constraints include an upper limit on the number of drainage holes, and the minimum and maximum diameters of the drainage holes. By solving this optimization problem, the optimal opening position of the drainage holes can be determined, ensuring that the liquid resin can be completely drained while avoiding the opening position affecting the aesthetic appearance of the model. Through the above automatic shell extraction and wall thickness control, the model is transformed into a material-saving, structurally sound, and drainable shell-like model.

[0110] Second, intelligent support structure generation. Intelligent support structure generation automatically calculates the support contact point positions, growth column paths, and adds break points based on the geometric characteristics of the suspended areas of the model. This supports the suspended structure during printing, prevents deformation and collapse, and facilitates manual removal of the supports after printing.

[0111] Specifically, the generation of the intelligent support structure includes:

[0112] Calculate the angle between the normal of each triangular facet and the vertical upward direction based on the printing direction. If the angle is greater than the preset overhang critical angle, the facet is marked as a region that needs support, and all facets that need support are clustered into connected regions.

[0113] In each area requiring support, a Poisson disk is used to sample and generate support contact points. The sampling density is proportional to the area of ​​the area requiring support and the included angle. For small features whose local bounding box volume is smaller than a preset small feature volume threshold, the sampling interval is reduced by a preset reduction ratio.

[0114] A pillar grows vertically downward from each support contact point. If the pillar length exceeds a preset branch length threshold, a preset number of secondary pillars are branched out at preset branch intervals in the middle. The secondary pillars extend outward at a preset branch angle and then vertically downward. The pillar diameter decreases linearly with height, and the diameter of the top support contact point is smaller than the diameter of the bottom support contact point.

[0115] A ring-shaped groove with a preset radius and preset depth is generated at the connection between the support and the contact surface of the remesh model as a break point;

[0116] The support pillar and the break point are saved as the intelligent support structure.

[0117] First, the angle between the normal of each triangular facet and the vertically upward direction is calculated based on the printing direction. If this angle is greater than a preset overhang critical angle, the facet is marked as a region requiring support, and all facets requiring support are clustered into connected regions. During 3D printing, when the angle between the normal of a facet and the vertically upward direction is greater than the overhang critical angle, the facet is not supported by model material below and is considered an overhanging region, which will collapse during printing. The preset overhang critical angle is a critical angle value used to determine whether a triangular facet needs a support structure during printing. It represents the upper limit of the angle between the facet's normal and the vertically upward direction. This preset overhang critical angle is set based on the overhang printing capability of the 3D printing equipment and the material's flowability; for example, it can be set to 45 degrees. When the angle is greater than 45 degrees, the facet will collapse during printing, requiring the generation of a support structure. All adjacent facets requiring support are merged into a connected region, and each connected region corresponds to an overhanging part that requires overall support.

[0118] Secondly, Poisson disk sampling is used to generate support contact points within each area requiring support. The sampling density is proportional to the area and angle of the area requiring support. Poisson disk sampling is an algorithm for generating random points in two-dimensional or three-dimensional space. Its core constraint is that the distance between any two sampling points is not less than a preset sampling radius, thus ensuring that the point distribution is both random and uniform, avoiding point clusters or blank areas. In the generation of the support structure, Poisson disk sampling is used to generate support contact points on the surface of the area requiring support. The sampling radius is dynamically adjusted according to the overhang angle and regional characteristics. Specifically, the base value of the sampling radius can be set to 2 mm. When the overhang angle is 45 degrees, the sampling radius is 2 mm; when the overhang angle is 60 degrees, the sampling radius is adjusted to 0.7 times the base value, i.e., 1.4 mm; and when the overhang angle is 75 degrees, the sampling radius is adjusted to 0.5 times the base value, i.e., 1.0 mm. The larger the area requiring support, the more support contact points are generated. The number of support contact points is equal to the area requiring support divided by the square of the sampling radius.

[0119] For small features whose local bounding box volume is smaller than a preset small feature volume threshold, the sampling interval is reduced by a preset scaling factor. The local bounding box volume refers to the volume of the smallest axis-aligned cuboid used to enclose a local geometric region. The preset small feature volume threshold is a critical volume value used to determine whether a local area of ​​the model belongs to a small feature; it represents the upper limit of the size requiring additional dense support. This preset small feature volume threshold is set comprehensively based on the printing equipment's accuracy capabilities and the mechanical strength requirements of the small structure; for example, it can be set to 100 cubic millimeters. When the local bounding box volume is less than 100 cubic millimeters, the area is determined to be a small feature, such as a finger, ribbon tip, or accessory end. In this case, the sampling interval is reduced by a preset scaling factor, for example, reducing the sampling radius from 2 mm to 1 mm, i.e., a scaling factor of 50%, making the support distribution denser, thereby preventing the small feature from breaking or deforming due to insufficient support during printing. Through the above dynamic adjustment, the support contact point density in small feature areas can reach four times that of conventional areas.

[0120] Furthermore, a support column grows vertically downwards from each support contact point. If the column length exceeds a preset branch length threshold, a preset number of secondary columns are branched out at preset intervals. These secondary columns extend outwards at a preset branch angle before continuing vertically downwards. The column diameter decreases linearly with height, and the diameter of the top support contact point is smaller than that of the bottom support contact point. The preset branch length threshold is used to control the length limit for the generation of support structure branches, for example, it can be set to 10 mm. When the vertical length of the column exceeds 10 mm, two secondary columns are branched out at preset intervals, for example, every 5 mm. These secondary columns extend outwards at a preset branch angle, for example, 30 degrees, before continuing vertically downwards. The column diameter decreases linearly with height. The diameter of the top contact point with the model is smaller, for example, 0.5 mm, to reduce the contact area for easier removal; the diameter of the bottom contact point with the printing platform is larger, for example, 1.5 mm, to provide stable support. The purpose of setting up the branch structure is to avoid the stability decrease due to excessive column length, to distribute the load to the printing platform through branches, and to reduce the amount of support material used.

[0121] Furthermore, a ring-shaped groove with a preset radius and depth is generated at the connection point between the support column and the remeshized model as a fracture point. The preset radius of the ring-shaped groove is set proportionally to the diameter of the support column, for example, it can be set to 80% of the support column diameter, ensuring the groove size matches the column thickness and guaranteeing accurate fracture location and a smooth fracture surface. The preset depth is set based on the required fracture strength of the support structure and the brittleness of the printing material, for example, it can be set to 0.2 mm, creating sufficient stress concentration at the groove. This allows for a clean fracture at this location under slight external force, while preventing the support from detaching prematurely during printing due to an excessively deep groove. This ring-shaped groove forms a stress concentration area, allowing the support structure to break cleanly from the model surface under slight external force after printing, avoiding damage to the model surface.

[0122] Finally, the generated supports and fracture points are saved as intelligent support structures for later merging with the model and outputting to an engineering-level model file. Through the above intelligent support structure generation steps, the support location, support density, and support shape can be automatically calculated based on the model's geometric features, minimizing the amount of support material used while ensuring printing stability and facilitating post-printing removal.

[0123] Third, shrinkage compensation and tolerance allowance. Shrinkage compensation and tolerance allowance is the process of scaling and compensating for the overall size of the model based on the shrinkage characteristics of the printing material, and allowing for gaps in the mating features to offset the dimensional deviations caused by material cooling and shrinkage, ensuring that the parts can be precisely fitted and assembled after being printed in sections.

[0124] Specifically, the shrinkage compensation and tolerance allowance include:

[0125] Obtain the printing material selected by the user and its corresponding linear shrinkage rate, multiply all vertex coordinates of the remesh model by a scaling factor calculated based on the linear shrinkage rate, with the scaling center being the geometric center of the remesh model; for anisotropic shrinkage printing processes, apply different scaling factors to different coordinate axes respectively;

[0126] The cylindrical surface, spherical surface, or closed concave-convex structure in the remesh model is identified as a mating feature. For the convex part, the size of the mating feature is reduced by a preset mating offset, and for the concave part, its size is increased by a preset mating offset.

[0127] First, the user-selected printing material and its corresponding linear shrinkage rate are obtained. The coordinates of all vertices in the remesh model are then multiplied by a scaling factor calculated based on this linear shrinkage rate, with the scaling center being the geometric center of the remesh model. In 3D printing processes such as photopolymerization or fused deposition modeling, the material undergoes volume shrinkage during curing or cooling, resulting in the actual size of the printed part being smaller than the design size. Shrinkage compensation is achieved by pre-enlarging the model to counteract the shrinkage effect.

[0128] Specifically, linear shrinkage rate is the percentage of material shrinkage per unit length. For example, a 2% linear shrinkage rate for a certain resin material means that a 100mm model will actually be 98mm long after printing. The scaling factor is equal to 1 divided by (1 minus the linear shrinkage rate). For example, when the linear shrinkage rate is 2%, the scaling factor is equal to 1 divided by 0.98, approximately 1.0204. Multiplying all vertex coordinates by this scaling factor makes the model uniformly enlarged, and the actual printed size will approximate the design target value. The scaling center is set to the geometric center of the model to ensure that the model remains centered during scaling and avoids offset.

[0129] For anisotropic shrinkage printing processes, i.e., the phenomenon of different shrinkage rates in different directions, different scaling factors are applied to different coordinate axes. For example, if the linear shrinkage rate is 1.5% in the X-axis direction, 2.0% in the Y-axis direction, and 2.5% in the Z-axis direction, then the corresponding scaling factors are 1.0152 for the X-axis, 1.0204 for the Y-axis, and 1.0256 for the Z-axis.

[0130] Furthermore, cylindrical surfaces, spherical surfaces, or closed concave-convex structures in the remeshized model are identified as mating features. For protruding parts, the size of the mating feature is reduced by a preset mating offset; for recessed parts, its size is increased by a preset mating offset. Mating features refer to the parts that need to be assembled after separate printing, such as shafts and holes, or tenons and slots. In 3D printing, if the dimensions of protrusions and recesses are exactly the same, they usually cannot be assembled smoothly due to printing errors and material shrinkage. Therefore, for protruding parts, their diameter or width is reduced by a preset mating offset, for example, by 0.2 mm; for recessed parts, their diameter or width is increased by the same preset mating offset, for example, by 0.2 mm.

[0131] Through the above processing, a tiny gap is formed between the protrusions and recesses, thereby achieving a smooth insertion and removal fit, while avoiding wobbling after assembly due to excessive gaps. The preset fit offset is set according to the accuracy capability of the printing equipment and the shrinkage characteristics of the material, for example, it can be set to 0.1 to 0.3 mm. Through shrinkage compensation and tolerance allowance processing, the model can accurately reach the design dimensions after printing, and the parts can be smoothly assembled.

[0132] Fourth, automatic component separation and interlocking design. Automatic component separation and interlocking design uses a skeleton extraction algorithm to identify narrow neck connection areas in the model, performs Boolean segmentation of the model along the optimal cutting plane, and automatically generates interlocking joints and slots on the segmented surfaces to enable multi-color printing or multi-part assembly, and ensures that each part can be firmly assembled through the snap-fit ​​structure after separation.

[0133] Specifically, the automatic component separation and locking mechanism design includes:

[0134] The skeleton topology of the remesh model is obtained by skeleton extraction algorithm, and the protruding part connected by the narrow neck is identified. If the volume ratio of the protruding part exceeds the preset volume ratio threshold and the cross-sectional area at the connection is less than the preset cross-sectional area ratio threshold of the maximum cross-sectional area of ​​the protruding part, it is determined to be a component that needs to be separated.

[0135] Calculate the cutting plane passing through the narrowest part of the narrow neck, perform Boolean segmentation on the remeshized model along the cutting plane, and output two independent part meshes;

[0136] A polygonal prism is created on the cut surface of one part as a tenon, and a polygonal prism hole is created at the corresponding position on another part as a slot.

[0137] The coordinates of the tenon and slot are saved as the assembly feature.

[0138] First, a skeleton topology of the remeshized model is obtained using a skeleton extraction algorithm, identifying protrusions connected by narrow necks. The skeleton extraction algorithm simplifies a 3D mesh model into a topological structure composed of center curves or center surfaces. Its function is to extract the model's topological skeleton, enabling the automatic identification of connecting structures such as narrow necks. Specifically, a distance-field-based skeleton extraction method is used: the shortest distance from each voxel inside the model to the model surface is calculated, and the local maxima of the distance field constitute skeleton points. Connecting adjacent skeleton points forms skeleton curves. Through skeleton topology analysis, protrusions connected to the main body by narrow necks can be identified, such as the character's arms, ears, and tail.

[0139] If the volume percentage of the protruding portion exceeds a preset volume percentage threshold and the cross-sectional area of ​​the connection is less than a preset cross-sectional area ratio threshold of the maximum cross-sectional area of ​​the protruding portion, it is determined to be a component that needs to be separated. The preset volume percentage threshold is a critical volume percentage used to determine whether a protruding portion has independent component value. It represents the minimum allowable percentage of the protruding portion's volume in the entire model volume. When the volume percentage exceeds this threshold, it indicates that the portion is large enough to warrant independent component separation to support multi-color printing or individual assembly. This preset volume percentage threshold is set comprehensively based on model complexity and component granularity requirements; for example, it can be set to 15%. When the volume of the protruding portion exceeds 15% of the entire model volume, the protruding portion has value for independent component separation. The preset cross-sectional area ratio threshold is a critical cross-sectional area ratio used to determine whether a narrow neck is suitable as a cutting location. It represents the upper limit of the ratio of the cross-sectional area of ​​the connection to the maximum cross-sectional area of ​​the protruding portion. When this ratio is less than the threshold, it indicates that the connection is narrow enough, resulting in a small contact area after cutting, facilitating subsequent interlocking design. This preset cross-sectional area ratio threshold is set comprehensively based on the stability requirements of the cut surface and assembly strength requirements; for example, it can be set to 60%. When the cross-sectional area of ​​the connection is less than 60% of the maximum cross-sectional area of ​​the protrusion, it indicates that the connection is narrow enough to be suitable as a part cutting location.

[0140] When both of the above conditions are met, the protruding part is determined to be a component that needs to be separated. For example, suppose the total model volume is 100,000 cubic millimeters, and the volume of a certain protruding part is 18,000 cubic millimeters, accounting for 18% of the total volume, which is greater than 15%, thus satisfying the first condition. Suppose the maximum cross-sectional area of ​​this protruding part is 400 square millimeters, and the cross-sectional area at the connection point is 200 square millimeters, resulting in a cross-sectional area ratio of 50%, which is less than 60%, thus satisfying the second condition. Therefore, this protruding part is determined to be a component that needs to be separated.

[0141] Furthermore, the cutting plane passing through the narrowest point of the narrow neck is calculated, and Boolean partitioning is performed along the cutting plane to output two independent part meshes. The narrowest point of the narrow neck is the location with the smallest cross-sectional area at the joint; partitioning at this location minimizes the contact area after cutting, facilitating subsequent tenon design. The cutting plane is a plane perpendicular to the axis of the narrow neck and passing through its narrowest point. Boolean partitioning refers to dividing the model into two parts along the cutting plane, retaining the mesh data of each part, and outputting two independent part meshes.

[0142] Secondly, a polygonal prism is created on the cut surface of one part as a tenon, and a polygonal prism hole is created at the corresponding position on another part as a slot. The polygonal prism can be, for example, a square prism or a hexagonal prism, which has the advantage of preventing rotation compared to a cylinder. The tenon is slightly smaller than the slot, allowing for a fitting clearance. When creating the tenon, a center point is selected on the cut surface, and the tenon is stretched outwards by a predetermined length along the normal direction of the cut surface to form a raised polygonal prism. When creating the slot, at the corresponding position on the cut surface of the other part, the slot is stretched inwards by a predetermined depth along the normal direction of the cut surface to form a recessed polygonal prism hole. The predetermined length of the tenon and slot can be set, for example, to 3 mm, and the predetermined depth matches the length.

[0143] Finally, the coordinates of the latches and slots are saved as assembly features. These assembly features include the position, orientation, and dimensions of the latches and slots. The subsequent printability optimization engine embeds these assembly features into the engineering-level model file, ensuring that the parts, after being separated, can be securely assembled through the engagement of the latches and slots after printing, without the need for additional glue. Through this automatic part separation and latch design, protrusions identified as needing separation in the model are automatically divided into independent parts, generating anti-rotation latch and slot structures, facilitating multi-color printing or the assembly of complex models.

[0144] Fifth, output engineering-level model files and printable reports.

[0145] Specifically, it outputs engineering-level model files and printability reports, including:

[0146] The individual part meshes after segmentation, the intelligent support structure, and the assembly features are packaged into a three-dimensional manufacturing format file, and printing parameters are embedded in the three-dimensional manufacturing format file as the engineering-level model file;

[0147] Generate a printability report in a portable document format. The printability report includes defect diagnosis results, printing process parameters, and assembly instructions. The defect diagnosis results include the number of defects detected and their spatial locations for five types of defects: non-manifold edges, holes, self-intersecting surfaces, inconsistent normals, and insufficient wall thickness. The printing process parameters include recommended printing direction, estimated printing time, and estimated material consumption. The assembly instructions include a schematic diagram of the assembly sequence of each individual part mesh and alignment marks for the tenons and slots.

[0148] First, the individual part meshes, intelligent support structures, and assembly features after component division are packaged into a 3D manufacturing format file, and printing parameters are embedded in the 3D manufacturing format file as an engineering-level model file. Specifically, each part mesh after component division is saved as an independent mesh object, the intelligent support structure is saved as an independent support mesh, and the coordinates, orientation, dimensions, and other information of the tenons and slots are saved as assembly feature metadata. At the same time, the process parameters required for 3D printing are written into the metadata area of ​​the 3D manufacturing format file, so that the slicing software can automatically read the above parameters when opening the file, without requiring manual settings by the user.

[0149] The printing parameters include layer thickness, exposure time, infill density, printing temperature, and support structure switching. For example, for resin photopolymer printing, parameters such as a layer thickness of 0.05 mm, a bottom layer exposure time of 30 seconds, an exposure time of 2.5 seconds per layer, and an infill density of 100% can be embedded. Through this packaging, the resulting engineering-grade model file can be directly imported into a 3D printer for production without additional configuration.

[0150] Secondly, a printability report in a portable document format is generated. The printability report includes three parts: defect diagnosis results, printing process parameters, and assembly instructions. Defect diagnosis results include the number and spatial location of five types of defects: non-manifold edges, holes, self-intersecting surfaces, inconsistent normals, and insufficient wall thickness. This helps users understand the defects of the original model and the effectiveness of repairs. Printing process parameters include the recommended printing direction, estimated printing time, and estimated material consumption. The recommended printing direction refers to the model's orientation that minimizes the overhang area and support requirements; for example, printing the model's largest plane as the bottom surface is recommended. The estimated printing time is calculated based on the model's volume, layer thickness, and printing speed. The estimated material consumption is calculated by multiplying the model's volume and the volume of the supporting structure by the material density. The assembly instructions include a diagram illustrating the assembly sequence of each individual part's mesh and alignment marks for the latches and slots. For example, arrows indicate the direction of the latch insertion into the slot, and highlighted colors mark the corresponding positions of the latches and slots, ensuring users can correctly assemble multi-part models.

[0151] Through the output of the aforementioned engineering-level model files and printability reports, users can directly obtain production-ready print files and complete process guidance without the need for additional slicing parameter settings or assembly drawing, thus achieving full automation from AI-generated models to physical printing.

[0152] In summary, this step, through the automated processing of the printability optimization engine, yields engineering-grade model files and a complete process guidance report that can be directly used for 3D printing. This shortens the cycle from creative design to physical production and achieves end-to-end automated conversion from the original model output by generative AI to a production-ready printable file.

[0153] In summary, the embodiments of this application have at least the following technical effects:

[0154] This invention first generates a defect map by performing defect diagnosis on the original mesh model, achieving comprehensive identification and quantitative annotation of five types of structural defects: non-manifold edges, holes, self-intersecting surfaces, inconsistent normals, and insufficient wall thickness. Second, based on the defect map, a graph neural network is used for geometric topology repair. Leveraging the modeling capabilities of graph neural networks for mesh topology, automated repairs are achieved, including hole filling, non-manifold edge splitting, self-intersecting surface removal, and global normal unification, outputting a manifold mesh model. Third, curvature-adaptive remeshing ensures that the mesh edge length matches the curvature distribution, achieving an isotropic uniform mesh while maintaining the model's geometric characteristics, providing high-quality input for subsequent printability optimization.

[0155] Finally, the printability optimization engine sequentially executes automatic shelling and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic part separation and tenon design, transforming the repaired model into an engineering-level model file containing part mesh, support structure and assembly features, and outputs a printability report. This achieves end-to-end automated conversion from the original model output by generative AI to a production-ready printable file, solving the technical problems of limited mesh repair accuracy and lack of printability optimization for additive manufacturing in existing technologies.

[0156] Example 2, as Figure 2 As shown, based on the same inventive concept as the trendy toy digital image generation method provided in Embodiment 1, this embodiment of the invention also provides a trendy toy digital image generation system, including:

[0157] Model loading module 11 is used to load the original mesh model output by the generative AI model, wherein the original mesh model contains three-dimensional mesh data of vertices, edges and faces;

[0158] Defect diagnosis module 12 is used to perform defect diagnosis on the original mesh model and generate a defect map;

[0159] Topology repair module 13 is used to perform geometric topology repair on the original mesh model based on the defect map using a pre-trained graph neural network, and output a manifold mesh model;

[0160] The adaptive remeshing module 14 is used to perform adaptive remeshing on the manifold mesh model and output an isotropic and curvature-adaptive remeshing model.

[0161] The printability optimization module 15 is used to input the remeshized model into the printability optimization engine, and sequentially perform automatic shelling and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic part separation and tenon design, and output engineering-level model files and printability reports; wherein the engineering-level model files include the mesh of each part after part separation, intelligent support structures and assembly features, and the printability report includes defect diagnosis results, printing process parameters and assembly instructions.

[0162] Specifically, the model loading module 11 is used for:

[0163] Load the original mesh model output by the generative AI model, wherein the original mesh model contains 3D mesh data of vertices, edges and faces.

[0164] Specifically, the defect diagnosis module 12 is used for:

[0165] Defect diagnosis is performed on the original mesh model to generate a defect map, wherein the defect map is marked in the form of a heatmap, indicating non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness in the original mesh model, including:

[0166] Traverse each edge and count the number of faces associated with the edge. If the number is not equal to the preset standard number, mark it as a non-manifold edge.

[0167] All open loops are identified using a boundary edge tracing algorithm. Each closed loop boundary is marked as a hole, and the boundary length, bounding box size, and boundary vertex sequence of the hole are recorded.

[0168] A spatial hash grid or hierarchical bounding box tree is used to detect whether all triangular faces have intersections with other faces. If an intersection exists, it is marked as a self-intersecting face.

[0169] Select the face near the center of the bounding box as the seed face, perform breadth-first traversal, compare the angle between the normals of adjacent faces, if the angle exceeds the normal consistency angle threshold, the normal is determined to be reversed, and the proportion of normals pointing outward of the model is counted. If the proportion is lower than the preset orientation proportion threshold, it is marked as a normal inconsistency region.

[0170] Voxel sampling is performed on the model or rays are emitted along the normal direction. The distance from each sampling point to the opposite surface along the inner normal direction is calculated. If the distance is less than the minimum printable wall thickness threshold, it is marked as an area with insufficient wall thickness.

[0171] The marking results of the above-mentioned non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness are superimposed into a multi-channel heat map, which serves as the defect map.

[0172] The topology repair module 13 is specifically used for:

[0173] Based on the defect map, a graph neural network is used for geometric topology repair, wherein the geometric topology repair includes hole filling, non-manifold edge splitting, self-intersecting surface removal, and global normal unification, including:

[0174] The original mesh model is converted into a graph structure, where the nodes of the graph are vertices and the edges of the graph are mesh connections. The features of each node include three-dimensional coordinates, normal vector, Gaussian curvature, and defect type identifier sampled from the defect map.

[0175] For each hole, the encoder of the graph neural network aggregates the information of the hole boundary vertices and their neighborhood subgraphs to output a latent geometric feature vector. Then, the decoder predicts the three-dimensional coordinates of the new vertex autoregressively. Curvature continuity constraints are used to minimize the rate of change of the angle between the normal of the newly generated patch and the normal of the surrounding existing patches. Finally, Delaunay triangulation is performed on the newly added vertex sequence to generate patch patches.

[0176] For each non-manifold edge, all faces associated with the edge are sorted according to the angle around the edge. For each pair of adjacent faces, the original edge is split into a new edge and the shared vertices are copied, so that each new edge is associated with only a preset standard number of faces.

[0177] For each pair of self-intersecting faces, extract the minimum bounding box of the intersection region, remove all faces within the bounding box to form a local hole, then call the hole filling submodule to re-triangulate the local hole, and verify by random sampling that the newly generated face does not intersect with the outer face;

[0178] Select a face with outward-pointing normals as the seed face, and adjust the normal directions of adjacent faces to be consistent with the seed face through connectivity propagation, so that the normals of all faces point outwards, and output the manifold mesh model.

[0179] The adaptive remeshing module 14 is specifically used for:

[0180] Adaptive remeshing is performed on the manifold mesh model, wherein the adaptive remeshing sets the target edge length based on the curvature field, and through iterative operations of edge folding, edge splitting, edge flipping, and vertex Laplacian smoothing, the deviation of all edge lengths from the target edge length is less than a preset deviation threshold, including:

[0181] Calculate the curvature value at each vertex and normalize the curvature value to a preset interval to obtain the curvature field;

[0182] The target side length of each vertex is set according to the curvature field, where the target side length is inversely proportional to the curvature value;

[0183] An iterative optimization loop is used to perform the following operations sequentially until the deviation of all side lengths from the target side length is less than a preset deviation threshold, and the minimum angle of all triangles is greater than a preset minimum angle threshold: For edges with a length less than the first proportional threshold of the target side length, edge folding is performed, merging the two endpoints into a new vertex; For edges with a length greater than the second proportional threshold of the target side length, edge splitting is performed, inserting a new vertex at the midpoint of the edge; For edges where the Delaunay condition of two adjacent triangles is improved after flipping, edge flipping is performed; Each vertex is moved to the average position of its adjacent vertices, with the movement distance limited not to more than the movement limit ratio of the original position, and the smoothing weight is inversely proportional to the curvature;

[0184] After each modification, the maximum geometric deviation between the current mesh and the manifold mesh model is calculated. If the maximum geometric deviation exceeds a preset geometric deviation threshold, the modification is rolled back, and the remeshized model is output.

[0185] Specifically, the printability optimization module 15 is used for:

[0186] The automatic shell extraction and wall thickness control include:

[0187] The outer surface of the remesh model is offset inward along the normal direction by a preset reference wall thickness value to generate an inner surface, wherein the local wall thickness is increased to a preset thickened wall thickness value in the region where the curvature value exceeds a preset curvature threshold.

[0188] The outer surface and the inner surface of the remesh model are combined to form a closed shell model, and the internal entities of the remesh model are deleted.

[0189] Identify the highest and lowest points of the shell-like model, generate a preset number of drainage holes at the lowest point, and generate a preset number of drainage holes at the highest point. The positions of the drainage holes are determined by solving an optimization problem that minimizes the internal liquid residue.

[0190] The generation of the intelligent support structure includes:

[0191] Calculate the angle between the normal of each triangular facet and the vertical upward direction based on the printing direction. If the angle is greater than the preset overhang critical angle, the facet is marked as a region that needs support, and all facets that need support are clustered into connected regions.

[0192] In each area requiring support, a Poisson disk is used to sample and generate support contact points. The sampling density is proportional to the area of ​​the area requiring support and the included angle. For small features whose local bounding box volume is smaller than a preset small feature volume threshold, the sampling interval is reduced by a preset reduction ratio.

[0193] A pillar grows vertically downward from each support contact point. If the pillar length exceeds a preset branch length threshold, a preset number of secondary pillars are branched out at preset branch intervals in the middle. The secondary pillars extend outward at a preset branch angle and then vertically downward. The pillar diameter decreases linearly with height, and the diameter of the top support contact point is smaller than the diameter of the bottom support contact point.

[0194] A ring-shaped groove with a preset radius and preset depth is generated at the connection between the support and the contact surface of the remesh model as a break point;

[0195] The support pillar and the break point are saved as the intelligent support structure.

[0196] The shrinkage compensation and tolerance allowance include:

[0197] Obtain the printing material selected by the user and its corresponding linear shrinkage rate, multiply all vertex coordinates of the remesh model by a scaling factor calculated based on the linear shrinkage rate, with the scaling center being the geometric center of the remesh model; for anisotropic shrinkage printing processes, apply different scaling factors to different coordinate axes respectively;

[0198] The cylindrical surface, spherical surface, or closed concave-convex structure in the remesh model is identified as a mating feature. For the convex part, the size of the mating feature is reduced by a preset mating offset, and for the concave part, its size is increased by a preset mating offset.

[0199] The automatic component separation and locking design includes:

[0200] The skeleton topology of the remesh model is obtained by skeleton extraction algorithm, and the protruding part connected by the narrow neck is identified. If the volume ratio of the protruding part exceeds the preset volume ratio threshold and the cross-sectional area at the connection is less than the preset cross-sectional area ratio threshold of the maximum cross-sectional area of ​​the protruding part, it is determined to be a component that needs to be separated.

[0201] Calculate the cutting plane passing through the narrowest part of the narrow neck, perform Boolean segmentation on the remeshized model along the cutting plane, and output two independent part meshes;

[0202] A polygonal prism is created on the cut surface of one part as a tenon, and a polygonal prism hole is created at the corresponding position on another part as a slot.

[0203] The coordinates of the tenon and slot are saved as the assembly feature.

[0204] Furthermore, output engineering-level model files and printability reports, including:

[0205] The individual part meshes after segmentation, the intelligent support structure, and the assembly features are packaged into a three-dimensional manufacturing format file, and printing parameters are embedded in the three-dimensional manufacturing format file as the engineering-level model file;

[0206] Generate a printability report in a portable document format. The printability report includes defect diagnosis results, printing process parameters, and assembly instructions. The defect diagnosis results include the number of defects detected and their spatial locations for five types of defects: non-manifold edges, holes, self-intersecting surfaces, inconsistent normals, and insufficient wall thickness. The printing process parameters include recommended printing direction, estimated printing time, and estimated material consumption. The assembly instructions include a schematic diagram of the assembly sequence of each individual part mesh and alignment marks for the tenons and slots.

Claims

1. A method for generating digital images of trendy toys, characterized in that, include: Load the original mesh model output by the generative AI model, wherein the original mesh model contains 3D mesh data of vertices, edges and faces; Perform defect diagnosis on the original mesh model to generate a defect map; Based on the defect map, a pre-trained graph neural network is used to perform geometric topology repair on the original mesh model, and output a manifold mesh model. Adaptive remeshing is performed on the manifold mesh model to output an isotropic and curvature-adaptive remeshed model; The remesh model is input into the printability optimization engine, which sequentially performs automatic shelling and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic part separation and tenon design, and outputs an engineering-level model file and a printability report. The engineering-level model file contains the mesh of each part after part separation, the intelligent support structure and assembly features, and the printability report contains defect diagnosis results, printing process parameters and assembly instructions.

2. The method for generating digital images of trendy toys as described in claim 1, characterized in that, Defect diagnosis is performed on the original mesh model to generate a defect map, wherein the defect map is marked in the form of a heatmap, indicating non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness in the original mesh model, including: Traverse each edge and count the number of faces associated with the edge. If the number is not equal to the preset standard number, mark it as a non-manifold edge. All open loops are identified using a boundary edge tracing algorithm. Each closed loop boundary is marked as a hole, and the boundary length, bounding box size, and boundary vertex sequence of the hole are recorded. A spatial hash grid or hierarchical bounding box tree is used to detect whether all triangular faces have intersections with other faces. If an intersection exists, it is marked as a self-intersecting face. Select the face near the center of the bounding box as the seed face, perform breadth-first traversal, compare the angle between the normals of adjacent faces, if the angle exceeds the normal consistency angle threshold, the normal is determined to be reversed, and the proportion of normals pointing outward of the model is counted. If the proportion is lower than the preset orientation proportion threshold, it is marked as a normal inconsistency region. Voxel sampling is performed on the model or rays are emitted along the normal direction. The distance from each sampling point to the opposite surface along the inner normal direction is calculated. If the distance is less than the minimum printable wall thickness threshold, it is marked as an area with insufficient wall thickness. The marking results of the above-mentioned non-manifold edges, holes, self-intersecting surfaces, regions with inconsistent normals, and regions with insufficient wall thickness are superimposed into a multi-channel heat map, which serves as the defect map.

3. The method for generating digital images of trendy toys as described in claim 1, characterized in that, Based on the defect map, a graph neural network is used for geometric topology repair, wherein the geometric topology repair includes hole filling, non-manifold edge splitting, self-intersecting surface removal, and global normal unification, including: The original mesh model is converted into a graph structure, where the nodes of the graph are vertices and the edges of the graph are mesh connections. The features of each node include three-dimensional coordinates, normal vector, Gaussian curvature, and defect type identifier sampled from the defect map. For each hole, the encoder of the graph neural network aggregates the information of the hole boundary vertices and their neighborhood subgraphs to output a latent geometric feature vector. Then, the decoder predicts the three-dimensional coordinates of the new vertex autoregressively. Curvature continuity constraints are used to minimize the rate of change of the angle between the normal of the newly generated patch and the normal of the surrounding existing patches. Finally, Delaunay triangulation is performed on the newly added vertex sequence to generate patch patches. For each non-manifold edge, all faces associated with the edge are sorted according to the angle around the edge. For each pair of adjacent faces, the original edge is split into a new edge and the shared vertices are copied, so that each new edge is associated with only a preset standard number of faces. For each pair of self-intersecting faces, extract the minimum bounding box of the intersection region, remove all faces within the bounding box to form a local hole, then call the hole filling submodule to re-triangulate the local hole, and verify by random sampling that the newly generated face does not intersect with the outer face; Select a face with outward-pointing normals as the seed face, and adjust the normal directions of adjacent faces to be consistent with the seed face through connectivity propagation, so that the normals of all faces point outwards, and output the manifold mesh model.

4. The method for generating digital images of trendy toys as described in claim 1, characterized in that, Adaptive remeshing is performed on the manifold mesh model, wherein the adaptive remeshing sets the target edge length based on the curvature field, and through iterative operations of edge folding, edge splitting, edge flipping, and vertex Laplacian smoothing, the deviation of all edge lengths from the target edge length is less than a preset deviation threshold, including: Calculate the curvature value at each vertex and normalize the curvature value to a preset interval to obtain the curvature field; The target side length of each vertex is set according to the curvature field, where the target side length is inversely proportional to the curvature value; An iterative optimization loop is used to perform the following operations sequentially until the deviation of all side lengths from the target side length is less than a preset deviation threshold, and the minimum angle of all triangles is greater than a preset minimum angle threshold: For edges with a length less than the first proportional threshold of the target side length, edge folding is performed, merging the two endpoints into a new vertex; For edges with a length greater than the second proportional threshold of the target side length, edge splitting is performed, inserting a new vertex at the midpoint of the edge; For edges where the Delaunay condition of two adjacent triangles is improved after flipping, edge flipping is performed; Each vertex is moved to the average position of its adjacent vertices, with the movement distance limited not to more than the movement limit ratio of the original position, and the smoothing weight is inversely proportional to the curvature; After each modification, the maximum geometric deviation between the current mesh and the manifold mesh model is calculated. If the maximum geometric deviation exceeds a preset geometric deviation threshold, the modification is rolled back, and the remeshized model is output.

5. The method for generating digital images of trendy toys as described in claim 1, characterized in that, The automatic shell extraction and wall thickness control include: The outer surface of the remesh model is offset inward along the normal direction by a preset reference wall thickness value to generate an inner surface, wherein the local wall thickness is increased to a preset thickened wall thickness value in the region where the curvature value exceeds a preset curvature threshold. The outer surface and the inner surface of the remesh model are combined to form a closed shell model, and the internal entities of the remesh model are deleted. Identify the highest and lowest points of the shell-like model, generate a preset number of drainage holes at the lowest point, and generate a preset number of drainage holes at the highest point. The positions of the drainage holes are determined by solving an optimization problem that minimizes the internal liquid residue.

6. The method for generating digital images of trendy toys as described in claim 1, characterized in that, The generation of the intelligent support structure includes: Calculate the angle between the normal of each triangular facet and the vertical upward direction based on the printing direction. If the angle is greater than the preset overhang critical angle, the facet is marked as a region that needs support, and all facets that need support are clustered into connected regions. In each area requiring support, a Poisson disk is used to sample and generate support contact points. The sampling density is proportional to the area of ​​the area requiring support and the included angle. For small features whose local bounding box volume is smaller than a preset small feature volume threshold, the sampling interval is reduced by a preset reduction ratio. A pillar grows vertically downward from each support contact point. If the pillar length exceeds a preset branch length threshold, a preset number of secondary pillars are branched out at preset branch intervals in the middle. The secondary pillars extend outward at a preset branch angle and then vertically downward. The pillar diameter decreases linearly with height, and the diameter of the top support contact point is smaller than the diameter of the bottom support contact point. A ring-shaped groove with a preset radius and preset depth is generated at the connection between the support and the contact surface of the remesh model as a break point; The support pillar and the break point are saved as the intelligent support structure.

7. The method for generating digital images of trendy toys as described in claim 1, characterized in that, The shrinkage compensation and tolerance allowance include: Obtain the printing material selected by the user and its corresponding linear shrinkage rate, multiply all vertex coordinates of the remesh model by a scaling factor calculated based on the linear shrinkage rate, with the scaling center being the geometric center of the remesh model; for anisotropic shrinkage printing processes, apply different scaling factors to different coordinate axes respectively; The cylindrical surface, spherical surface, or closed concave-convex structure in the remesh model is identified as a mating feature. For the convex part, the size of the mating feature is reduced by a preset mating offset, and for the concave part, its size is increased by a preset mating offset.

8. The method for generating digital images of trendy toys as described in claim 1, characterized in that, The automatic component separation and locking design includes: The skeleton topology of the remesh model is obtained by skeleton extraction algorithm, and the protruding part connected by the narrow neck is identified. If the volume ratio of the protruding part exceeds the preset volume ratio threshold and the cross-sectional area at the connection is less than the preset cross-sectional area ratio threshold of the maximum cross-sectional area of ​​the protruding part, it is determined to be a component that needs to be separated. Calculate the cutting plane passing through the narrowest part of the narrow neck, perform Boolean segmentation on the remeshized model along the cutting plane, and output two independent part meshes; A polygonal prism is created on the cut surface of one part as a tenon, and a polygonal prism hole is created at the corresponding position on another part as a slot. The coordinates of the tenon and slot are saved as the assembly feature.

9. The method for generating digital images of trendy toys as described in claim 1, characterized in that, Outputs engineering-level model files and printability reports, including: The individual part meshes after segmentation, the intelligent support structure, and the assembly features are packaged into a three-dimensional manufacturing format file, and printing parameters are embedded in the three-dimensional manufacturing format file as the engineering-level model file; Generate a printability report in a portable document format. The printability report includes defect diagnosis results, printing process parameters, and assembly instructions. The defect diagnosis results include the number of defects detected and their spatial locations for five types of defects: non-manifold edges, holes, self-intersecting surfaces, inconsistent normals, and insufficient wall thickness. The printing process parameters include recommended printing direction, estimated printing time, and estimated material consumption. The assembly instructions include a schematic diagram of the assembly sequence of each individual part mesh and alignment marks for the tenons and slots.

10. A digital character generation system for trendy toys, characterized in that, A method for generating digital images of trendy toys according to any one of claims 1-9 includes: The model loading module is used to load the original mesh model output by the generative AI model, wherein the original mesh model contains 3D mesh data of vertices, edges and faces; The defect diagnosis module is used to perform defect diagnosis on the original mesh model and generate a defect map; The topology repair module is used to perform geometric topology repair on the original mesh model based on the defect map and using a pre-trained graph neural network to output a manifold mesh model. An adaptive remeshing module is used to perform adaptive remeshing on the manifold mesh model and output an isotropic and curvature-adaptive remeshing model. The printability optimization module is used to input the remeshized model into the printability optimization engine, and sequentially execute automatic shelling and wall thickness control, intelligent support structure generation, shrinkage compensation and tolerance reservation, automatic part separation and tenon design, and output engineering-level model files and printability reports; wherein the engineering-level model files include the mesh of each part after part separation, intelligent support structures and assembly features, and the printability report includes defect diagnosis results, printing process parameters and assembly instructions.