Method and device for three-dimensional modeling simulation of a warp-knitted fabric based on a binary process file
By using LSB-first bit sequence analysis and coil topology network generation, a high-precision three-dimensional model of warp-knitted fabric is automatically identified and generated, solving the problem of difficult automatic conversion in existing technologies and realizing efficient conversion from binary process files to three-dimensional models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-09
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies struggle to directly generate high-precision 3D models of warp-knitted fabrics from binary process files. They lack automated conversion processes, are complex and error-prone to parsing, and rely on manual intervention for coil type identification.
The binary process file is parsed using LSB-first bit order, generating the coil topology network structure, automatically identifying the coil type and generating three-dimensional geometric coordinates, and finally outputting a standardized three-dimensional model.
It achieves automated conversion from binary process files to high-precision 3D models, solves the problem of the lack of 3D preview tools in existing technologies, and improves modeling efficiency and accuracy.
Smart Images

Figure CN121480120B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D modeling technology, and in particular to a method and apparatus for 3D modeling and simulation of warp-knitted fabrics based on binary process files. Background Technology
[0002] 3D modeling and simulation of warp-knitted fabrics is an important research direction in the field of textile CAD. It aims to automatically generate 3D geometric models of fabrics based on process parameters, providing visualization support for fabric design, effect preview, and performance analysis. Because 3D simulation can intuitively display the fabric's structure and spatial morphology, it is widely used in textile industry scenarios such as fabric design and development, virtual sample display, and weaving process optimization.
[0003] In recent years, although 3D modeling technology for warp-knitted fabrics has gained some research foundation, existing methods mainly rely on manual modeling or parametric generation based on idealized geometric rules, lacking an automated conversion process directly from process files to high-precision 3D models. With the development of digital knitting technology, process files store key parameters such as yarn padding numbers and needle motion sequences in binary format, but existing modeling methods struggle to fully utilize this process data. The main challenges include: binary files use specific bit-order encoding rules, making parsing complex and error-prone; there is a lack of a systematic conversion method from yarn padding numbers to loop space topology networks; loop type identification and accurate 3D geometry generation require comprehensive consideration of multiple knitting rules, often relying on manual intervention. These issues make it difficult for existing methods to achieve efficient and high-precision automatic conversion from process files to visual models. Summary of the Invention
[0004] The purpose of this invention is to solve the problems in the prior art.
[0005] The technical solution adopted by this invention to solve its technical problem is: to provide a method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files, including the following steps:
[0006] Given a binary process file, LSB-first bit sequence is used for parsing. The parsing results include the number of needles, the number of time steps, the yarn padding number, and the needle movement matrix.
[0007] The coil topology network structure is generated using a padding yarn digital generator.
[0008] Type inference is performed on each coil in the coil topology network structure, and three-dimensional geometric coordinates are generated based on the coil type to finally obtain the coil attitude dataset;
[0009] Extract line data and convert the processed 3D geometric data into a user-specified standardized format, finally outputting a 3D model file.
[0010] Preferably, the given binary process file is parsed using the LSB-first bit order, including the following steps:
[0011] Read the file header information and extract the protocol version number, number of jacquards, number of needles Z, and number of time points S. The number of needles Z and number of time points S are parsed using big-endian order and represented as follows:
[0012] ;
[0013] ;
[0014] in, This means parsing the byte sequence into a 16-bit unsigned integer in big-endian order;
[0015] Extract and save the 8 bytes of padding yarn data from bytes 6 to 13.
[0016] Calculate the number of bytes required at each time step Its expression is as follows:
[0017] ;
[0018] in, This indicates the rounding up operation;
[0019] Starting from byte 14, the needle action data is parsed sequentially according to time, resulting in a two-dimensional action matrix Actions(S×Z), where Actions[t][i] represents the action state of the i-th needle at time t, expressed as:
[0020] ;
[0021] ;
[0022] in, This represents the byte index of the i-th pointer, block_t[k] represents the k-th byte of the data block at time t, >> represents a right shift operation, and & represents a bitwise AND operation. Indicates rounding down;
[0023] The data structure containing version, number of jacquards, number of stitches, number of times, number of padding yarns, and a two-dimensional matrix will be output as the parsing result.
[0024] Preferably, the method of generating the coil topology network structure using yarn padding digitally includes the following steps:
[0025] For each pair of adjacent digital values in the padding code, create a single yarn diagram object as the base loop sequence;
[0026] Based on the width W and height H parameters of the fabric, the basic coil sequence is expanded into a complete row and column structure, constructing a complete coil topology network structure. ,in, Indicates the lateral position of the coil; Indicates the longitudinal position of the coil; Indicates the direction selection of the coil. Indicates the connection relationship on the left end. This indicates the connection relationship on the right side.
[0027] Preferably, the step of creating a single yarn diagram object as a basic loop sequence for each pair of adjacent digital values in the yarn padding code includes the following steps:
[0028] Calculate the lateral position of the coil and direction selection , is represented as:
[0029] ;
[0030] ;
[0031] Where j represents the index of the digit pair. A true value indicates a counter-clockwise direction, and a false value indicates a clockwise direction.
[0032] Calculate the longitudinal position y of the coil and establish the longitudinal connection relationship, specifically: initialize the height. ,from Begin iterating through the number pairs, if = This indicates that no new loops are formed, only the height is increased to maintain yarn continuity, i.e. Incremental; otherwise at height Create a new coil at point 1, denoted as the 1st coil. A coil, its ordinate and with the The first coil is connected; the connection rule is based on the first... The rotation direction of the first coil is determined, when the first coil... When the first coil is in a counter-clockwise direction, its left end is connected to the first... The coil; when the first coil When the first coil is in a clockwise direction, its right end is connected to the first... The first coil; each connection simultaneously records the bidirectional relationship, i.e., the first... The first coil also records that its corresponding endpoint is connected to the first... One coil.
[0033] Preferably, the expansion of the basic loop sequence into a complete row and column structure based on the fabric width W and height H parameters includes the following steps:
[0034] Calculate the skip flag for the row number. ,in, , represents the index within the underlying loop corresponding to the row-th row; if If true, no coil will be generated for that row; if... If false, the corresponding coil is selected from the basic loop for copying, and its vertical coordinate is adjusted, as shown below:
[0035] ;
[0036] in, This represents the initial ordinate of the coil in the basic cycle. This represents the ordinate of the coil in the row number 'row'.
[0037] For the For each coil in the column, its x-coordinate In the original x-axis Based on this, a translation is performed, and at the same time, a right-end connection relationship is established between adjacent column coils in the same row, so that the coil located at the th The right end of the coil in column 1 is connected to the first... The column corresponds to the starting point of the coil.
[0038] Preferably, the type inference is performed on each coil in the coil topology network structure, and the type inference rules are as follows:
[0039] Regarding direction selection If the coil is counterclockwise, and its left end is connected to a coil that is in the correct position, then... and Or, its right-end connecting coil exists and its position satisfies and If the condition is met, it is determined to be a left closed coil; otherwise, it is determined to be a left open coil.
[0040] Regarding direction selection If the coil is clockwise, and the position of the coil connected to its right end satisfies... and Or the position of the coil connected to its left end satisfies and If the condition is met, it is determined to be a right closed coil; otherwise, it is determined to be a right open coil.
[0041] When adjacent connected coils are arranged at equal intervals in the longitudinal direction and have the same lateral distance, they are identified as chain coils, and selection is based on the direction. These are either right-chain or left-chain coils;
[0042] in, Indicates the position of the coil connected at the left end. This indicates the position of the coil connected to the right end.
[0043] Preferably, the generation of three-dimensional geometric coordinates based on coil type includes the following steps:
[0044] Define the geometric parameters of the coil, including the total width of the coil. Coil height Arc height Bottom offset and yarn diameter ;
[0045] Given the center position of the coil Based on the coil type, calculate the coordinates of the key points of the coil backbone, where... These represent the transverse and longitudinal coordinates of the coil in the fabric plane, respectively. It indicates the coordinates of the loop in the fabric thickness direction, used to distinguish the front and rear needle beds or yarn layering relationships;
[0046] Connect the key points of the coil backbone and the endpoints of the extension lines in the order of the yarn direction to generate the complete coil path Path = { , , , , }, this path represents the geometric trajectory of a single yarn in three-dimensional space; where, Indicates the starting point of the upper extension line. Indicates the endpoint of the lower extension line; This represents the bottom left point of the closed coil. This indicates the bottom right point of the closed coil; The arc point representing the closed loop;
[0047] For each coil in the topology network, generate corresponding three-dimensional geometric data, including coil type, center position, coordinates of key points on the main trunk, coordinates of endpoints of extension lines, and complete path, forming coil attitude data containing geometric information, which is used as the output of the intelligent inference and geometric modeling module for coil type.
[0048] Preferably, the given coil center position Based on the coil type, calculate the coordinates of key points on the coil backbone, including:
[0049] For a closed loop, the coordinates of the bottom left and bottom right points are calculated as follows:
[0050] ;
[0051] ;
[0052] The top arc point is generated parametrically. For a right closed loop, the coordinates of the arc point are:
[0053] ;
[0054] in, A smooth curve is formed by generating multiple arc points through discretization;
[0055] For open coils, only some path points are generated, and the coordinates of the start and midpoints are determined according to the open direction; for chained coils, simplified polyline path points are generated.
[0056] Then, calculate the coordinates of the endpoints of the coil extension line; based on the guide comb number. Total number of guide combs The starting point of the upper extension line and the end of the lower extension line The coordinates are calculated as follows:
[0057] ;
[0058] ;
[0059] For the left closed coil, and of Invert coordinate signs; z-coordinate of the endpoint of the extension line. This reflects the layered structure of the yarn in the thickness direction in the multi-guide comb system.
[0060] Preferably, the step of extracting line data and converting the processed 3D geometric data into a user-specified standardized format includes the following steps:
[0061] Iterate through each coil in the coil pose dataset and extract adjacent point pairs from its complete path. , Construct a line segment object, where n represents the index of a path point, including the start point, end point, line segment type, and the identifier of the coil to which it belongs; based on the connection relationship between coils... Establish connecting line segments between the endpoints of the extension lines of adjacent coils. The line segment object includes the start point, end point, type, and the coil identifier to which it belongs.
[0062] Convert line data into a standardized format and export it according to the user-specified format.
[0063] The present invention also provides a three-dimensional modeling and simulation device for warp-knitted fabrics based on binary process files, used to implement any of the above-mentioned three-dimensional modeling and simulation methods for warp-knitted fabrics based on binary process files, comprising:
[0064] The data parsing module, given a binary process file, calls the LSB-first bit sequence for parsing. The parsing results include the number of needles, the number of time steps, the yarn padding number, and the needle movement matrix.
[0065] The topology building module uses digital yarn padding to generate the coil topology network structure;
[0066] The geometric modeling module performs type inference on each coil in the coil topology network structure, generates three-dimensional geometric coordinates based on the coil type, and finally obtains the coil attitude dataset.
[0067] The export processing module extracts line data and converts the processed 3D geometric data into a user-specified standardized format, finally outputting a 3D model file.
[0068] The present invention has the following beneficial effects: The present invention solves the problems of lack of three-dimensional preview tools in the design of existing warp-knitted fabrics and the difficulty of converting digital padding yarns into three-dimensional geometry, and realizes the automated process from process parameters to visualized three-dimensional models.
[0069] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the present invention is not limited to the embodiments. Attached Figure Description
[0070] Figure 1 This is a flowchart illustrating the steps of a three-dimensional modeling and simulation method for warp-knitted fabrics based on binary process files, according to an embodiment of the present invention.
[0071] Figure 2 This is a flowchart illustrating a three-dimensional modeling and simulation method for warp-knitted fabrics based on binary process files, according to an embodiment of the present invention.
[0072] Figure 3 This is a functional logic diagram of a three-dimensional modeling and simulation method for warp-knitted fabrics based on binary process files, according to an embodiment of the present invention.
[0073] Figure 4 This is a schematic diagram illustrating the stage implementation and final output of a three-dimensional modeling and simulation method for warp-knitted fabrics based on binary process files according to an embodiment of the present invention.
[0074] Figure 5 This is a schematic diagram of a three-dimensional modeling and simulation device for warp-knitted fabrics based on binary process files, according to an embodiment of the present invention. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0076] To address the existing technical problems in 3D modeling of warp-knitted fabrics, this invention provides a 3D modeling and simulation method for warp-knitted fabrics based on binary process files. This method achieves accurate decoding of the process file through LSB-first bit sequence parsing data, automatically constructs the spatial connection relationships between coils through a coil topology network generation module, automatically identifies the coil type and generates accurate 3D coordinates through an intelligent coil type inference and geometric modeling module, and finally integrates a multi-format standardized export module, realizing a complete automated process from process files to high-precision 3D models.
[0077] like Figures 1 to 3 The diagram shows the steps, flow chart, and functional logic diagram of a method for 3D modeling and simulation of warp-knitted fabrics based on binary process files according to an embodiment of the present invention; it includes the following steps:
[0078] S101, given a binary process file, call LSB-first bit sequence for parsing. The parsing result includes the number of needles, the number of time steps, the yarn padding number and the needle action matrix.
[0079] S102, using digital generation of padding yarn to create coil topology network structure;
[0080] S103, perform type inference on each coil in the coil topology network structure, generate three-dimensional geometric coordinates based on the coil type, and finally obtain the coil attitude dataset;
[0081] S104 extracts line data and converts the processed 3D geometric data into a user-specified standardized format, finally outputting a 3D model file.
[0082] Specifically, in S101, given the input binary process file, the overall calculation process for the LSB-first bit order parsing data is as follows:
[0083] First, read the file header information and extract the protocol version number, number of jacquards, number of needles Z, and number of time points S. The number of needles Z and number of time points S are parsed using big-endian, and their expressions are as follows:
[0084] ;
[0085] ;
[0086] in, This means parsing a byte sequence into a 16-bit unsigned integer in big-endian order.
[0087] Next, extract the 8 bytes of padding yarn digital data (i.e., the Jacquard JB value) from bytes 6 to 13, and store it in its original format. Then, calculate the number of bytes required at each time step. , and its expression is as follows:
[0088] ;
[0089] Where, represents the ceiling operation.
[0090] Then, starting from the 14th byte, parse the needle motion data in chronological order. Construct a two-dimensional motion matrix Actions(S×Z), where Actions[t][i] represents the motion state (0 or 1) of the i-th needle at the t-th moment. For the t-th moment (0 ≤ t < S), read bytes_per_step bytes to form a moment data block block_t, expand it in LSB-first bit order, and obtain Z motion bits. The expression for extracting the motion bit of the i-th needle (0 ≤ i < Z) is:
[0091] ;
[0092] Where, is the byte index where the i-th needle is located, block_t[k] represents the k-th byte of the moment data block at the t-th moment, >> represents the right shift operation, and & represents the bitwise AND operation.
[0093] Finally, encapsulate the parsing result into a data structure including version, number of jacquard, number of needles, number of moments, guide bar pattern, and two-dimensional matrix, as the output of the LSB-first bit order parsing.
[0094] Specifically, in S102, by parsing the given guide bar pattern , with a length of 8, representing a complete guide bar cycle, the overall calculation process of the coil topology network generation module is as follows:
[0095] First, generate a basic coil sequence for a single cycle based on the guide bar pattern. For each pair of adjacent digital values in the guide bar pattern , where , create a single yarn graphic object, whose core attributes include: position coordinates , direction selection , left-end connection and right-end connection ; and are used to identify whether there is a connection relationship, and different values are assigned to and according to the presence or absence of the connection relationship.
[0096] The horizontal position and direction selection of the coil are calculated by the following expressions:
[0097] ;
[0098] ;
[0099] Among them, being true indicates the counterclockwise direction, and being false indicates the clockwise direction.
[0100] Next, calculate the longitudinal position y of the coil and establish the longitudinal connection relationship. Initialize the height , and start traversing the digital pairs from . If , it means that no new coil is formed, and only the height is increased to maintain the continuity of the yarn, that is, is incremented; otherwise, a new coil is created at the height , denoted as the th coil, whose ordinate , and a connection is established with the th coil. The connection rule is determined according to the rotation direction of the th coil: when the th coil is in the counterclockwise direction, its left end is connected to the th coil; when the th coil is in the clockwise direction, its right end is connected to the th coil. Each connection records the two-way relationship at the same time, that is, the rth coil also records that its corresponding end is connected to the r - 1th coil.
[0101] Then, based on the width W and height H parameters of the fabric, expand the basic cycle into a complete row-column structure. For the row row (0 ≤ row < H), judge whether this row needs to be skipped, and the skip flag is:
[0102] ;
[0103] Among them, the value 4 reflects the periodic characteristics of the guide number, corresponding to 4 pairs of numbers in the guide cycle.
[0104] If is true, no coil is generated in this row; if is false, select the corresponding coil from the basic cycle for copying and adjust its longitudinal coordinates. Let the initial ordinate of the coil in the basic cycle be , then the ordinate [[ID=,62]] of the coil in the row row is calculated as:
[0105] ;
[0106] Again, copy the single-row coil structure horizontally columns. For the Column (0≤ < For each coil in the array, its x-coordinate is... In the original x-axis Translate based on:
[0107] ;
[0108] At the same time, establish the right-end connection relationship between adjacent column coils in the same row, so that the coil located in the first row... The right end of the coil in column 1 is connected to the first... The column corresponds to the starting point of the coil.
[0109] Finally, construct the complete topology network structure. Each coil object contains its spatial location. directional information and the connection relationship with adjacent coils Connection relationship All are unidirectional, reflecting the weaving direction of the yarn, forming a directed graph network that reflects the structure of the warp-knitted fabric, which serves as the output of the coil topology network generation module.
[0110] Specifically, in S103, given the generated coil topology network Based on coil type, intelligent inference and geometric modeling are performed. The overall calculation process is as follows:
[0111] First, type inference is performed on each coil object in the topology network. This is based on the coil's orientation. Current location The coil type is determined by its positional relationship with adjacent coils. Coil types are defined as: right-closed coil, left-closed coil, left-open coil, right-open coil, right-chained coil, and left-chained coil. The type inference rules are as follows:
[0112] Regarding direction selection For a true (counterclockwise) coil, if its left end is connected to a coil and the position satisfies... and Or, its right-end connecting coil exists and its position satisfies and If the condition is met, it is determined to be a left closed coil; otherwise, it is determined to be a left open coil.
[0113] Regarding direction selection For a dummy (clockwise) coil, if the position of the coil connected to its right end satisfies... and Or the position of the coil connected to its left end satisfies and If the condition is met, it is determined to be a right closed coil; otherwise, it is determined to be a right open coil.
[0114] The determination of a chain coil is based on a specific positional relationship: when adjacent connected coils are arranged at equal intervals in the longitudinal direction and have the same lateral distance, they are determined to be chain coils, and the direction is selected accordingly. These are either right-chain or left-chain coils.
[0115] in, Indicates the position of the coil connected at the left end. This indicates the position of the coil connected to the right end.
[0116] Next, a three-dimensional geometric model is constructed based on the coil type. The geometric parameters of the coil are defined, including: the total width of the coil. Coil height Arc height Bottom offset and yarn diameter Given the center position of the coil Based on the coil type, calculate the coordinates of the key points of the coil backbone, where... These represent the transverse and longitudinal coordinates of the coil in the fabric plane, respectively. It indicates the coordinates of the loop in the fabric thickness direction, used to distinguish the front and rear needle beds or yarn layering relationships.
[0117] For a closed loop, the coordinates of the bottom left and bottom right points are calculated as follows:
[0118] ;
[0119] ;
[0120] The top arc point is generated parametrically. For a right closed loop, the coordinates of the arc point are:
[0121] ;
[0122] in, A smooth curve is formed by generating multiple arc points through discretization.
[0123] For open coils, only some path points are generated, and the coordinates of the start and midpoints are determined according to the open direction; for chained coils, simplified polyline path points are generated.
[0124] Then, calculate the coordinates of the endpoints of the coil extension line. This is based on the guide comb number. Total number of guide combs The starting point of the upper extension line and the end of the lower extension line The coordinates are calculated as follows:
[0125] ;
[0126] ;
[0127] The above formulas are adjusted for sign according to coil type. For left-closed coils, and of Invert the coordinate signs. The z-coordinate of the endpoint of the extension line. This reflects the layered structure of the yarn in the thickness direction in the multi-guide comb system.
[0128] Next, connect the key points of the coil backbone and the endpoints of the extension lines according to the yarn direction to generate the complete coil path Path = { , , , , The path represents the geometric trajectory of a single yarn in three-dimensional space.
[0129] Finally, corresponding three-dimensional geometric data is generated for each coil in the topology network, including coil type, center position, coordinates of key points on the main trunk, coordinates of endpoints of extension lines, and complete path, forming coil attitude data containing geometric information, which serves as the output of the intelligent inference and geometric modeling module for coil type.
[0130] Specifically, in S104, given the generated coil attitude dataset and the parsed needle motion matrix... The overall calculation process for multi-format standardized export is as follows:
[0131] First, extract the line data. Traverse each coil in the coil pose dataset and extract adjacent point pairs from its complete path. , Construct a line segment object, where n represents the index of a path point, including the start point, end point, line segment type, and the identifier of the coil to which it belongs. Then, based on the connection relationships between the coils... Establish connecting segments between the endpoints of the extension lines of adjacent coils. The segment object includes the start point, end point, type, and the coil identifier to which it belongs.
[0132] Then, the line data is converted to a standardized format. After collecting all line segment endpoints and removing duplicates, a vertex list is constructed. For OBJ format, output vertex coordinates and line segment indices, with each line segment recording its start and end indexes in the vertex list; for PLY format, declare the number of vertices and edges in the file header, and output vertex coordinate and edge index pairs; for CSV and JSON formats, output the start and end coordinates and attribute information of line segments in tabular or structured object form.
[0133] Finally, the line dataset is written to the corresponding 3D model file according to the export format specified by the user. It supports multiple formats such as OBJ, PLY, XYZ, CSV and JSON, which are convenient for importing and visualization in 3D software, and serve as the output of the multi-format standardized export module.
[0134] Specifically, such as Figure 4 The diagram illustrates the phased implementation and final output of the three-dimensional modeling and simulation method for warp-knitted fabrics based on binary process files according to an embodiment of the present invention. The entire modeling process is divided into four stages: The first stage decodes the binary file into structured process parameters, including the number of needles, time count, yarn padding numbers, and needle motion matrix, through LSB-first bit sequence parsing; the second stage generates a loop topology network based on the yarn padding numbers, with loop nodes arranged according to the weaving pattern and connected by directed edges to form a single-column loop (i.e., topology) reflecting the yarn direction; the third stage performs type identification and geometric modeling for each loop, calculating three-dimensional coordinates to generate specific loop geometry, with closed loops being loop-shaped and open loops being arc-shaped, and loops connected by extension lines; the fourth stage exports the geometric data into a standard three-dimensional model file, allowing for intuitive viewing of weaving details in 3D software. This diagram clearly demonstrates the step-by-step transformation process from process parameters to a three-dimensional model.
[0135] See Figure 5 The diagram shown is a structural schematic of a three-dimensional modeling and simulation device for warp-knitted fabrics based on binary process files according to an embodiment of the present invention, comprising:
[0136] Data parsing module 501, given a binary process file, calls LSB-first bit sequence for parsing, and the parsing results include needle count, time count, yarn padding number and needle movement matrix;
[0137] Topology building module 502 uses yarn padding digital generation to generate coil topology network structure;
[0138] The geometric modeling module 503 performs type inference on each coil in the coil topology network structure, generates three-dimensional geometric coordinates based on the coil type, and finally obtains the coil attitude dataset;
[0139] Export processing module 504 extracts line data and converts the processed 3D geometric data into a user-specified standardized format, finally outputting a 3D model file.
[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for 3D modeling and simulation of warp-knitted fabrics based on binary process files, characterized in that, Includes the following steps: Given a binary process file, LSB-first bit sequence is used for parsing. The parsing results include the number of needles, the number of time steps, the yarn padding number, and the needle movement matrix. The coil topology network structure is generated using a digital method with yarn padding. Type inference is performed on each coil in the coil topology network structure, and three-dimensional geometric coordinates are generated based on the coil type to finally obtain the coil attitude dataset; Extract line data and convert the processed 3D geometric data into a user-specified standardized format, finally outputting a 3D model file; The given binary process file is parsed using the LSB-first bit order, including the following steps: Read the file header information and extract the protocol version number, number of jacquards, number of needles Z, and number of time points S. The number of needles Z and number of time points S are parsed using big-endian order and represented as follows: ; ; in, This means parsing the byte sequence into a 16-bit unsigned integer in big-endian order; Extract and save the 8 bytes of padding yarn data from bytes 6 to 13. Calculate the number of bytes required at each time step Its expression is as follows: ; in, This indicates the rounding up operation; Starting from byte 14, the needle action data is parsed sequentially according to time, resulting in a two-dimensional action matrix Actions(S×Z), where Actions[t][i] represents the action state of the i-th needle at time t, expressed as: ; ; in, This represents the byte index of the i-th pointer, block_t[k] represents the k-th byte of the data block at time t, >> represents a right shift operation, and & represents a bitwise AND operation. Indicates rounding down; The data structure containing version, number of jacquards, number of stitches, number of times, number of padding yarns, and a two-dimensional matrix will be output as the parsing result.
2. The method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files according to claim 1, characterized in that, The method of generating a coil topology network structure using yarn padding digital generation includes the following steps: For each pair of adjacent digital values in the padding code, create a single yarn diagram object as the base loop sequence; Based on the width W and height H parameters of the fabric, the basic coil sequence is expanded into a complete row and column structure, constructing a complete coil topology network structure. ,in, Indicates the lateral position of the coil; Indicates the longitudinal position of the coil; Indicates the direction selection of the coil. Indicates the connection relationship on the left end. This indicates the connection relationship on the right side.
3. The method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files according to claim 2, characterized in that, Creating a single yarn diagram object as the base loop sequence for each pair of adjacent digital values in the yarn padding code includes the following steps: Calculate the lateral position of the coil and direction selection , is represented as: ; ; Where j represents the index of the digit pair. A true value indicates a counter-clockwise direction, and a false value indicates a clockwise direction. Calculate the longitudinal position y of the coil and establish the longitudinal connection relationship, specifically: initialize the height. ,from Begin iterating through the number pairs, if = This indicates that no new loops are formed, only the height is increased to maintain yarn continuity, i.e. Incremental; otherwise at height Create a new coil at point 1, denoted as the 1st coil. A coil, its ordinate and with the The first coil is connected; the connection rule is based on the first... The rotation direction of the first coil is determined, when the first coil... When the first coil is in a counter-clockwise direction, its left end is connected to the first... The coil; when the first coil When the first coil is in a clockwise direction, its right end is connected to the first... The first coil; each connection simultaneously records the bidirectional relationship, i.e., the first... The first coil also records that its corresponding endpoint is connected to the first... One coil.
4. The method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files according to claim 2, characterized in that, The expansion of the basic loop sequence into a complete row and column structure based on the fabric width W and height H parameters includes the following steps: Calculate the skip flag for the row number. ,in, , represents the index within the underlying loop corresponding to the row-th row; if If true, no coil will be generated for that row; if... If false, the corresponding coil is selected from the basic loop for copying, and its vertical coordinate is adjusted, as shown below: ; in, This represents the initial ordinate of the coil in the basic cycle. This represents the ordinate of the coil in the row number 'row'. For the For each coil in the column, its x-coordinate In the original x-axis Based on this, a translation is performed, and at the same time, a right-end connection relationship is established between adjacent column coils in the same row, so that the coil located at the th The right end of the coil in column 1 is connected to the first... The column corresponds to the starting point of the coil.
5. The method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files according to claim 1, characterized in that, The type inference is performed on each coil of the coil topology network structure, and the type inference rules are as follows: Regarding direction selection If the coil is counterclockwise, and its left end is connected to a coil that is in the correct position, then... and Or, its right-end connecting coil exists and its position satisfies and If the condition is met, it is determined to be a left closed coil; otherwise, it is determined to be a left open coil. Regarding direction selection If the coil is clockwise, and the position of the coil connected to its right end satisfies... and Or the position of the coil connected to its left end satisfies and If so, it is determined to be a right closed coil; Otherwise, it is determined to be a right open coil; When adjacent connected coils are arranged at equal intervals in the longitudinal direction and have the same lateral distance, they are identified as chain coils, and selection is based on the direction. These are either right-chain or left-chain coils; in, Indicates the position of the coil connected at the left end. This indicates the position of the coil connected to the right end.
6. The method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files according to claim 1, characterized in that, The generation of three-dimensional geometric coordinates based on coil type includes the following steps: Define the geometric parameters of the coil, including the total width of the coil. Coil height Arc height Bottom offset and yarn diameter ; Given the center position of the coil Based on the coil type, calculate the coordinates of the key points of the coil backbone, where... These represent the transverse and longitudinal coordinates of the coil in the fabric plane, respectively. It indicates the coordinates of the loop in the fabric thickness direction, used to distinguish the front and rear needle beds or yarn layering relationships; Connect the key points of the coil backbone and the endpoints of the extension lines in the order of the yarn direction to generate the complete coil path Path ={ , , , , }, this path represents the geometric trajectory of a single yarn in three-dimensional space; where, Indicates the starting point of the upper extension line. Indicates the endpoint of the lower extension line; This represents the bottom left point of the closed coil. This indicates the bottom right point of the closed coil; The point on the arc representing a closed loop; For each coil in the topology network, generate corresponding three-dimensional geometric data, including coil type, center position, coordinates of key points on the main trunk, coordinates of endpoints of extension lines, and complete path, forming coil attitude data containing geometric information, which is used as the output of the intelligent inference and geometric modeling module for coil type.
7. The method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files according to claim 6, characterized in that, The given coil center position Based on the coil type, calculate the coordinates of key points on the coil backbone, including: For a closed loop, the coordinates of the bottom left and bottom right points are calculated as follows: ; ; The top arc point is generated parametrically. For a right closed loop, the coordinates of the arc point are: ; in, A smooth curve is formed by generating multiple arc points through discretization; For open coils, only some path points are generated, and the coordinates of the start and midpoints are determined according to the open direction; for chained coils, simplified polyline path points are generated. Then, calculate the coordinates of the endpoints of the coil extension line; based on the guide comb number. Total number of guide combs The starting point of the upper extension line and the end of the lower extension line The coordinates are calculated as follows: ; ; For the left closed coil, and of Invert coordinate signs; z-coordinate of the endpoint of the extension line. This reflects the layered structure of the yarn in the thickness direction in the multi-guide comb system.
8. The method for three-dimensional modeling and simulation of warp-knitted fabrics based on binary process files according to claim 1, characterized in that, The process of extracting line data and converting the processed 3D geometric data into a user-specified standardized format includes the following steps: Iterate through each coil in the coil pose dataset and extract adjacent point pairs from its complete path. , Construct a line segment object, where n represents the index of a path point, including the start point, end point, line segment type, and the identifier of the coil to which it belongs; based on the connection relationship between coils... Establish connecting line segments between the endpoints of the extension lines of adjacent coils. The line segment object includes the start point, end point, type, and the coil identifier to which it belongs. Convert line data into a standardized format and export it according to the user-specified format.
9. A three-dimensional modeling and simulation device for warp-knitted fabrics based on binary process files, used to implement the three-dimensional modeling and simulation method for warp-knitted fabrics based on binary process files as described in any one of claims 1 to 8, characterized in that, include: The data parsing module, given a binary process file, calls the LSB-first bit sequence for parsing. The parsing results include the number of needles, the number of time steps, the yarn padding number, and the needle movement matrix. The topology building module uses digital yarn padding to generate the coil topology network structure; The geometric modeling module performs type inference on each coil in the coil topology network structure, generates three-dimensional geometric coordinates based on the coil type, and finally obtains the coil attitude dataset. The export processing module extracts line data and converts the processed 3D geometric data into a user-specified standardized format, finally outputting a 3D model file.
Citation Information
Patent Citations
Simulation method, device and system for less-comb warp-knitted fabric
CN116090201A
Knitted fabric simulation based on data and model combined driving
CN117371250A