A three-dimensional toy paper pattern sewing simulation method based on spatial automatic positioning
By using a spatial automatic positioning-based three-dimensional toy pattern sewing simulation method, and utilizing the decomposition of the sewing relationship diagram and the mass spring fabric model, the rapid and accurate positioning of two-dimensional toy patterns and the generation of three-dimensional models are achieved. This solves the problem of complex and time-consuming operation in existing technologies and improves the efficiency of toy design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, the positioning of two-dimensional toy patterns in three-dimensional space is complex and time-consuming, making it difficult to achieve fast and accurate stitching simulation, resulting in a waste of materials and time.
A three-dimensional toy pattern sewing simulation method based on spatial automatic positioning is adopted. By interactively setting sewing information and performing triangulation, a sewing relationship diagram is established. The paper pattern is grouped and positioned using a graph decomposition algorithm, and sewing simulation is performed in combination with a mass spring fabric model to generate a three-dimensional toy model.
It enables rapid, accurate, and automatic positioning of two-dimensional toy patterns, simplifies the generation process of three-dimensional toy models, saves materials and time, and improves design efficiency.
Smart Images

Figure CN115392024B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a three-dimensional toy simulation method, and more particularly to a three-dimensional toy pattern sewing simulation method based on automatic spatial positioning. Background Technology
[0002] Two-dimensional pattern design is a crucial step in the production of plush or inflatable toys. Currently, before the widespread adoption of digital pattern design technology, most toy designers still use manual methods, drawing two-dimensional patterns directly based on their practical experience, aesthetic sense, and spatial imagination. During the design process, to verify the rationality of the two-dimensional pattern design and make improvements, multiple physical prototypes need to be made. Sometimes, even after multiple revisions, the desired effect is not achieved, resulting in a waste of materials and time. In the field of computer-aided design, stitching simulation technology can directly convert two-dimensional patterns into three-dimensional models, visually revealing the differences between the three-dimensional model and the expected shape, guiding pattern improvements without the need for physical production.
[0003] However, rapid sewing simulation of 2D patterns remains challenging. Since the placement of the 2D pattern in 3D directly determines the efficiency and effectiveness of the sewing simulation, determining its spatial position is a crucial step. Previous methods relied on user interaction to locate the spatial position of 2D toy patterns, a complex and time-consuming process. Research on automatic 2D pattern positioning in the clothing industry exists, such as the papers (Berthouzoz F, Garg A, Kaufman DM, Grinspun E, Agrawala M. Parsing sewing patterns into 3D garments. AcmTrans Graph, 2013) and (Groz C, Fuhrmann A, Lukkas V. Automatic pre-positioning of virtual clothing, In: Proceedings of the 19th spring conference on Computergraphics, 2003). Clothing patterns, due to their universal pattern names, can be automatically positioned by matching the pattern name with the feature points of a human model, thus enabling positioning around the human body. Unlike clothing patterns, toy patterns vary in shape and lack a universal naming convention. Furthermore, because the shape of toy models is unknown, it is impossible to use feature points to indicate the spatial position of the pattern. Therefore, automatic spatial positioning of toy patterns is more complex than that of clothing patterns.
[0004] To address this problem, this invention proposes a three-dimensional toy pattern sewing simulation method based on automatic spatial positioning. Utilizing the sewing relationship information between patterns, the method groups, positions patterns within groups, and assembles them outside of groups, achieving intelligent and accurate three-dimensional pattern spatial placement without any manual interaction, and rapidly generating three-dimensional simulation results. This invention significantly reduces the time required for three-dimensional toy pattern spatial positioning and simplifies the process of generating three-dimensional toy models from two-dimensional pattern sewing simulation. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a three-dimensional toy pattern sewing simulation method based on spatial automatic positioning, which can quickly and accurately locate two-dimensional toy patterns in space, and then perform three-dimensional toy sewing simulation on the positioned patterns.
[0006] To solve this technical problem, the technical solution adopted by the present invention is as follows:
[0007] A three-dimensional toy pattern sewing simulation method based on automatic spatial positioning includes the following steps:
[0008] 1) Using a toy 2D paper pattern as input, set the sewing information of the 2D paper pattern interactively, and perform triangular meshing on the 2D paper pattern;
[0009] 3) Automatically create a stitching relationship diagram based on the stitching information of the two-dimensional paper pattern;
[0010] 3) Based on the graph decomposition algorithm, the paper pattern is grouped by decomposing the suture relationship diagram, and the suture relationship is divided into intra-group suture relationship and inter-group suture relationship;
[0011] 4) Automatically position the relative position of each group of paper patterns within the group according to the intra-group stitching relationship; assemble the paper patterns into groups according to the inter-group stitching relationship to determine the spatial position of the paper patterns;
[0012] 5) Based on the mass spring cloth model, the sewing simulation of the positioned paper pattern is used to generate a three-dimensional toy model.
[0013] In the above technical solution, further, in step 1), during triangulation, for each pair of paper pattern boundaries with a stitching relationship, ensure that the number of triangular mesh vertices on the boundary is the same, and connect the triangular mesh vertices on each pair of boundaries to form a stitching connection line.
[0014] Furthermore, in step 2), when establishing the stitching relationship graph G = (V, E), each two-dimensional paper pattern is treated as a node v (v ∈ V) in the stitching relationship graph; if one edge of a paper pattern has a stitching relationship with one edge of another paper pattern, then there is an edge e (v1, v2) (e ∈ E) between these two paper pattern nodes in the stitching relationship graph.
[0015] Furthermore, a graph decomposition algorithm is used to decompose the stitching relationship graph, specifically as follows:
[0016] Let deg(v) represent the degree of node v, i.e., the number of edges connecting a node to other nodes; Δ(G) represent the maximum degree of the graph; and δ(G) represent the minimum degree of the graph. For the stitching graph G obtained in step 2), first determine whether the maximum degree and the minimum degree of the graph are equal. If they are not equal, then for each minimum degree node v in the stitching graph, determine whether there exists a node w among all nodes with stitching relationships to that node v such that deg(w) > δ(G). If so, then add e(v,w) to the cutting edge set E. cut Then, delete e(v,w) in graph G. If the maximum degree and minimum degree of the graph are equal and the minimum degree is greater than 2, then further decompose the graph using the k-regular graph decomposition algorithm. Randomly select an edge e(v,w) of a node v and record it. If a next edge e(v′,w′) can be found that satisfies both edge e(v,v′) and e(w,w′) in graph G, then record edge e(v,w). Then continue to search for the next edge that satisfies the above conditions using e(v′,w′) until no more edges that satisfy the conditions can be found. If the number of records exceeds half the number of nodes in graph G, then add these recorded edges to E. cut Then, delete the record edges in graph G and exit the k-regular graph sub-algorithm. After each decomposition, find the connected components in graph G with Δ(G)≤2 and move them to the connected component set C. dec And update the suture relationship diagrams G and C. dec and E cut The next decomposition is then performed. The graph decomposition algorithm stops when graph G is empty. The final output is the set of connected components and the set of cutting edges. The set of connected components represents the grouping of the paper pattern. For each connected component, the nodes represent a group of paper patterns, and the edges represent intra-group stitching relationships. The edges in the set of cutting edges represent inter-group stitching relationships.
[0017] Furthermore, the relative positions of the paper patterns within the group are determined based on the stitching relationships within the group, as follows:
[0018] For each group of paper patterns, first arrange them sequentially according to the connection of the stitching relationship within the group, aligning their centers horizontally, and then wrap them around the cylinder, keeping the paper pattern tangent to the cylinder surface at the center of the paper pattern; consider the paper pattern as a rigid body with zero thickness that can rotate about the axis normal to the center surface of the paper pattern, and consider each stitching connection line as a spring. The paper pattern rotates under the combined action of multiple spring tensions, adjusting the relative positions of the paper patterns within the group until the forces on each paper pattern within the group are balanced and the relative positions no longer change.
[0019] Furthermore, the paper patterns are assembled into groups according to the external stitching relationship to determine the spatial position of the paper patterns. Specifically, two planes are fitted to the boundary pairs with stitching relationships in the two groups respectively. The centers and normals of these two planes are aligned to assemble the two groups of paper patterns together. During the assembly process, the relative position between each group of paper patterns remains unchanged. The assembly order is carried out in reverse order according to the generation order of connected components in the graph decomposition algorithm.
[0020] This invention also provides a three-dimensional toy pattern sewing simulation system based on automatic spatial positioning, comprising:
[0021] The stitching information interaction module is used to interactively set stitching information on the input two-dimensional toy pattern and to triangularly mesh the two-dimensional pattern.
[0022] The suture relationship grouping module automatically generates a suture relationship diagram using the suture information set in the interactive module, and groups the paper pattern by decomposing the suture relationship diagram based on a graph decomposition algorithm, dividing the suture relationship into intra-group suture relationships and inter-group suture relationships;
[0023] The spatial positioning module is used to automatically locate the relative position of each group of paper patterns within the group based on the intra-group stitching relationship, and then assemble the paper patterns according to the inter-group stitching relationship to determine the spatial position of the paper patterns.
[0024] The stitching simulation module uses a point-mass spring fabric model to simulate stitching the positioned paper pattern and generate a three-dimensional toy model.
[0025] Using the above technical solution, users only need to input the two-dimensional toy pattern and set the corresponding sewing information to automatically calculate the appropriate placement of the two-dimensional toy pattern in three-dimensional space, and then perform sewing simulation to obtain the three-dimensional model corresponding to the two-dimensional pattern.
[0026] This invention can be applied to the field of toy design, improving the efficiency and quality of 3D toy design. Compared to manual interaction methods, this method offers faster pattern positioning and higher accuracy. This technical solution reduces the operational complexity of 3D toy pattern simulation, allows for rapid verification of the rationality of 2D pattern designs, saves materials, labor, and time in toy prototype manufacturing, and accelerates toy design efficiency. This technology can be used by both professional toy designers and ordinary users. Attached Figure Description
[0027] Figure 1 Overall flowchart of the invention
[0028] Figure 2 A set of two-dimensional toy paper patterns
[0029] Figure 3 : Set 2D paper pattern sewing information
[0030] Figure 4 : Triangular meshing of two-dimensional paper patterns
[0031] Figure 5 Generation of the stitching relationship diagram
[0032] Figure 6 Decomposition process of the suture relationship diagram
[0033] Figure 7 A set of paper patterns are wrapped around a cylinder in sequence.
[0034] Figure 8 Adjusting the relative positions of the paper patterns within the group and assembling the paper pattern group.
[0035] Figure 9 Simulation of sewing two-dimensional paper patterns Detailed Implementation
[0036] This embodiment relates to a paper pattern sewing simulation method for three-dimensional toys based on automatic spatial positioning. The overall steps are described in [link to documentation]. Figure 1 :
[0037] Step 1: Import the 2D toy pattern. The boundaries of the 2D toy pattern are composed of straight lines and curves, such as... Figure 2 As shown. Two-dimensional toy patterns can be obtained either by a designer directly designing a two-dimensional pattern or by using a three-dimensional surface unfolding method. For specific design methods of three-dimensional surface unfolding, please refer to the invention patent (Patent No.: ZL200810060856.2, A Toy Manufacturing Method with Automatic Computer Pattern Opening). When importing two-dimensional patterns designed directly by a designer, contour extraction functions from the OpenCV library can be used for contour extraction before importing (OpenCV library website: https: / / opencv.org / releases / ). Two-dimensional patterns using three-dimensional surface unfolding can be directly imported.
[0038] Step 2: Interactively set the stitching information for the 2D toy pattern. This stitching information indicates the stitching relationship between the pattern boundaries, specifically which two pairs of pattern boundaries are stitched together. After setting this information, a line will be drawn connecting the two pairs of stitched pattern boundaries. See [link / details]. Figure 3 After setting the stitching information, the 2D toy pattern is triangulated to generate a 2D mesh surface. This is to ensure the 2D pattern becomes the surface of the toy model during subsequent stitching simulations. Simultaneously, it is ensured that the two pattern boundaries with a stitching relationship have the same number of vertices to generate pairwise matching stitching lines between boundary vertices. See [link to documentation]. Figure 4The method for triangulating the paper pattern can be found in the article (Triangle: Engineering a 2D quality mesh generator and Delaunay triangulator, Workshop on Applied Computational Geometry, Berlin, Heidelberg: Springer; 1996). The generated suture lines will be used to adjust the relative positions within the group and the suture simulation process.
[0039] Step 3: Automatically create a stitching relationship diagram based on the stitching information of the 2D paper patterns. We consider each paper pattern to be a node in the stitching relationship diagram; if an edge of one paper pattern has a stitching relationship with an edge of another paper pattern, then these two paper pattern nodes share an edge in the stitching relationship diagram. Based on this rule, the stitching relationship diagram of the paper patterns can be generated, see... Figure 5 .
[0040] Step 4: Decompose the stitching relationship graph using a graph decomposition algorithm. The graph decomposition algorithm is as follows:
[0041]
[0042]
[0043] Where deg(v) represents the degree of node v, i.e. the number of edges connecting a node to other nodes, Δ(G) represents the maximum degree of the graph, and δ(G) represents the minimum degree of the graph; for the definitions of connected components and regular graphs, refer to relevant books on graph theory (West DB. Introduction to graph theory. Upper Saddle River: Prentice Hall, 2001).
[0044] The algorithm outputs a set of connected components and a set of cutting edges. The set of connected components represents the grouping of the paper pattern. For each connected component, the nodes represent a group of paper patterns, and the edges in each connected component represent intra-group stitching relationships. The edges in the set of cutting edges represent inter-group stitching relationships. Figure 5 The decomposition process of the paper pattern case and the order of the generated connected component sets and cutting edge sets are shown in [the original text]. Figure 6 .
[0045] Step 5: Determine the relative positions of the paper patterns within the group based on the stitching relationships. This involves two steps, as follows:
[0046] Step 1: For each set of patterns, first arrange them horizontally along the center according to the seam connection. To prevent the patterns from overlapping, add a certain spacing l' when arranging them. Based on the total length l after arrangement... sum Calculate the radius r = l of the cylinder. sum / 2π, wrap the paper patterns sequentially around a cylinder of radius r. The angular interval θ during wrapping is calculated based on the proportion of the horizontal width of the paper pattern to the total length to avoid overlapping in space. Keep the paper patterns tangent to the surface of the cylinder at the center of the paper patterns. See the example below. Figure 7 and Figure 8 a.
[0047] Step 2: Treat the paper pattern as a rigid body with zero thickness that can rotate about the axis normal to the center surface of the paper pattern. Treat each seam connection line as a spring. Under the tension of each spring, the paper pattern experiences unbalanced forces and rotates about a fixed axis. The angular velocity of this rotation is calculated using the law of rotation of a rigid body about a fixed axis. Rotate and adjust until the forces on each paper pattern in the group are balanced and their relative positions no longer change. Figure 8 The relative positions within the group after rotation adjustment are shown below. Figure 8 b.
[0048] Step 6: Based on the external stitching relationship, treat a group of paper patterns as a whole, keeping the relative positions of the paper patterns within the group unchanged, and calculate the positions between the paper pattern groups to determine the final spatial position of the paper patterns. Fit two corresponding planes based on the boundaries of the two groups related to the external stitching relationship, align the centers and normals of these two planes, and the two groups of paper patterns can be assembled together. The assembly order follows the reverse order of the generation order of connected components in the graph decomposition algorithm. For example, for an unassembled paper pattern group G1, if it has an external stitching relationship with the assembled G2, the sets of boundary segments related to this external stitching relationship in these two paper pattern groups are represented as L1 and L2, respectively. Approximately fit two planes based on L1 and L2, with normals N1 and N2 respectively. Figure 8 b). By aligning the centers and normals of these two planes, pattern sets G1 and G2 can be assembled together, see... Figure 8 c. For a pattern set with only one pattern, its fitting plane is calculated directly based on the pattern boundary.
[0049] Step 7: Use the point mass spring fabric model to simulate sewing the positioned two-dimensional paper pattern. This model treats the vertices of the triangular mesh as a point mass and the edges of the triangular mesh as springs. After sewing the separated paper patterns together, apply an outward force to the point mass on the fabric to simulate the effect of the toy puffing up when the fabric is filled.
[0050] The mass-spring model can be found in the paper "Deformation constraints in a mass-spring model to describe rigid cloth behavior." (Graphics Interface, Canadian Information Processing Society; 1995). This model discretizes the fabric into point masses, connected by three types of springs: structural springs, shear springs, and bending springs, to simulate the forces within the fabric. This model is applied to a 3D mesh of a paper pattern, where the vertices of the 3D mesh represent the point masses, and the edges of the 3D mesh represent the springs within the fabric.
[0051] The suture simulation can be divided into two steps, see... Figure 9 :
[0052] The first step is to sew the paper patterns together: Consider the connecting thread as an external spring, generating an external force for sewing, with a spring constant of 0.1. Under the pull of the connecting thread, the paper patterns move closer together and are eventually sewn together.
[0053] The second step is the filling simulation: After the paper patterns are sewn together, the external force on the seam connection line is removed. At this point, to maintain the state of the paper patterns being sewn together, a position-based dynamics algorithm (PBD) can be used to solve the constraints. For details, please refer to the paper (Position based dynamics. J Vis Commun Image Represent 2007). Before solving each constraint, the method proposed in the paper (Plushie: an interactive design system for plush toys. ACMTrans Graph 2007) is used to apply a certain external force to each grid point except for the seam boundary, creating the effect of the model being inflated or filled.
Claims
1. A three-dimensional toy pattern sewing simulation method based on automatic spatial positioning, characterized in that, The method includes the following steps: 1) Using a toy 2D paper pattern as input, set the sewing information of the 2D paper pattern interactively, and perform triangular meshing on the 2D paper pattern; 2) Automatically create a stitching relationship diagram based on the stitching information of the two-dimensional paper pattern. Specifically, this involves: creating the stitching relationship diagram... At that time, each two-dimensional paper pattern is used as a node in the stitching relationship diagram. , If one edge of a pattern is sewn to one edge of another pattern, then in the sewing diagram, there exists an edge between these two pattern nodes. , ; 3) Based on the graph decomposition algorithm, the paper pattern is grouped by decomposing the suture relationship diagram, and the suture relationships are divided into intra-group suture relationships and inter-group suture relationships, specifically: Represents a node The degree, which is the number of edges connecting a node to other nodes. Indicates the maximum degree of the graph. Let G represent the minimum degree of the graph. For the stitching graph G obtained in step 2), first determine whether the maximum degree and minimum degree of the graph are equal. If they are not equal, then for each minimum degree node v in the stitching graph, determine whether there exists a node w among all nodes with stitching relationships at node v that satisfies the condition... > If satisfied, then Add cutting edge set and in the figure Delete If the maximum degree and minimum degree of the graph are equal and the minimum degree is greater than 2, then the k-regular graph decomposition algorithm is used for further decomposition, and an edge of a node v is randomly selected. Record this information; if the next edge can be found... Satisfy the edge and Simultaneously for the diagram If the edge is in the middle, then the edge will be... Record, then use Continue searching for the next edge that satisfies the above conditions until no more edges can be found; if the number of records exceeds the graph... If half the number of nodes is reached, then these record edges are added to... and in the figure Delete the record edge and exit the k-regular graph decomposition sub-algorithm; after each decomposition, find the graph. middle The connected components are moved to the connected component set. And update the suture relationship diagram G. and To proceed with the next decomposition; when the graph The algorithm stops when the empty graph decomposition is complete. The final output is the set of connected components and the set of cutting edges. The set of connected components represents the grouping of the paper pattern. For each connected component, the nodes represent a group of paper patterns, and the edges represent the stitching relationships within the group. The edges in the set of cutting edges represent the stitching relationships outside the group. 4) Automatically position the relative position of each group of paper patterns within the group according to the intra-group stitching relationship; assemble the paper patterns into groups according to the inter-group stitching relationship to determine the spatial position of the paper patterns; 5) Based on the mass spring cloth model, the sewing simulation of the positioned paper pattern is used to generate a three-dimensional toy model.
2. The three-dimensional toy pattern sewing simulation method based on automatic spatial positioning according to claim 1, characterized in that, In step 1), during triangulation, for each pair of pattern boundaries with a stitching relationship, ensure that the number of triangular mesh vertices on the boundary is the same, and connect the triangular mesh vertices on each pair of boundaries to form stitching lines.
3. The three-dimensional toy pattern sewing simulation method based on automatic spatial positioning according to claim 1, characterized in that, The relative positions of the paper patterns within a group are determined based on the suture relationships within the group, as follows: For each group of paper patterns, first arrange them sequentially according to the connection of the stitching relationship within the group, aligning their centers horizontally, and then wrap them around the cylinder, keeping the paper pattern tangent to the cylinder surface at the center of the paper pattern; consider the paper pattern as a rigid body with zero thickness that can rotate about the axis normal to the center surface of the paper pattern, and consider each stitching connection line as a spring. The paper pattern rotates under the combined action of multiple spring tensions, adjusting the relative positions of the paper patterns within the group until the forces on each paper pattern within the group are balanced and the relative positions no longer change.
4. The three-dimensional toy pattern sewing simulation method based on automatic spatial positioning according to claim 1, characterized in that, Based on the stitching relationship between the groups, the paper patterns are assembled into groups to determine the spatial position of the paper patterns. Specifically, two planes are fitted to the boundary pairs with stitching relationships between the two groups, and the centers and normals of these two planes are aligned to assemble the two groups of paper patterns together. During the assembly process, the relative position between each group of paper patterns remains unchanged, and the assembly order is carried out in reverse order according to the generation order of connected components in the graph decomposition algorithm.
5. A three-dimensional toy pattern sewing simulation system based on automatic spatial positioning, characterized in that, To implement the method of claim 1, the system comprises: The stitching information interaction module is used to interactively set stitching information on the input two-dimensional toy pattern and to triangularly mesh the two-dimensional pattern. The stitching relationship grouping module automatically creates a stitching relationship diagram using the stitching information set in the interactive module. Based on a graph decomposition algorithm, it decomposes the stitching relationship diagram to group the paper pattern, dividing the stitching relationship into intra-group stitching relationships and inter-group stitching relationships. The spatial positioning module is used to automatically locate the relative position of each group of paper patterns within the group based on the intra-group stitching relationships. Then, it assembles the paper patterns into groups according to the inter-group stitching relationships to determine the spatial position of the paper patterns. The stitching simulation module uses a point-mass spring fabric model to simulate stitching the positioned paper pattern and generate a three-dimensional toy model.
Citation Information
Patent Citations
A computer automatic edition-making toy designing and producing method
CN100555295C
Paper pattern stitching information automatic setting method for three-dimensional garment simulation
CN106204723A
Computer-implemented method for designing a manufacturable garment
CN106981094A