Generation method of pattern file, computerized flat knitting machine and storage medium
By using knitting code information and positional relationships to generate pattern files in fully fashioned garment knitting, the problems of complex and error-prone pattern module drawing are solved, and the design process is simplified and accuracy is improved.
Patent Information
- Application Number
- CN202510570313.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-09-19
AI Technical Summary
The drawing of pattern modules in fully fashioned garment knitting is complex, and the pattern modules represent different color codes, which makes the design process complicated and error-prone, and errors are prone to occur when identifying pattern modules.
By obtaining the first pattern module and pattern drawing, expanding them into a pattern file; obtaining the second pattern module and pattern drawing, and using the knitting code information and position relationship to determine the second pattern file, the module color code is reduced and the accuracy of the pattern module is improved.
It simplifies the design process, reduces the use of module color codes, improves the accuracy and generation efficiency of pattern modules, and reduces the incidence of human errors.
Smart Images

Figure CN120666492A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computerized flat knitting machines, and in particular to a method for generating a pattern file, a computerized flat knitting machine, and a storage medium. Background Art
[0002] With the advancement of textile technology, wholly fashioned garment knitting technology has gradually attracted attention. Wholly fashioned garment knitting involves knitting individual garment components, such as the front and back pieces of the sleeves, body, trouser legs, and hat, separately on computerized flat knitting machines. These components are then assembled to create a complete garment. The design of the pattern needle positions on the computerized flat knitting machines is crucial in this process. The needle positions refer to the knitting positions for the front and back pieces. These positions are designed and patterned, and then distributed on the needle beds of the computerized flat knitting machines to create the finished garment.
[0003] Currently, wholly fashioned garments are knitted as a single piece, also known as spacer knitting. During spacer knitting, the front and back panels move in different directions due to the offset of needle positions, necessitating the drawing of separate pattern modules, each with a different color code. The complexity of pattern module drawing complicates the design process and pattern addition. Furthermore, the large number of module color codes required for wholly fashioned garments makes it easy to identify the corresponding pattern module. Summary of the Invention
[0004] This application mainly provides a method for generating a pattern file, a computer knitting machine and a storage medium to solve the problem of easy errors when drawing pattern modules.
[0005] The present application provides a method for generating a pattern file, which is applied to a computerized flat knitting machine, and the method comprises:
[0006] Acquire a first pattern module, where the first pattern module includes a first representative color code and a first knitting code corresponding to the first representative color code;
[0007] Expanding a first pattern image into a first pattern file based on the first pattern module, wherein the first pattern image includes a plurality of first representative color codes, and the plurality of first representative color codes are expanded into a plurality of first knitting codes;
[0008] Obtaining a second pattern module and a second pattern diagram, wherein the second pattern module includes a second representative color code, weaving code information, and a second weaving code corresponding to the weaving code information, and the second pattern diagram includes a plurality of the first weaving codes and a plurality of the second representative color codes;
[0009] The second knitting code is determined based on the knitting code information and the positional relationship between the second representative color code and the first knitting code in the second pattern diagram, the second pattern diagram is expanded into a second pattern file, and multiple second representative color codes are expanded into multiple second knitting codes.
[0010] In some embodiments, the front piece knitting needle positions and the back piece knitting needle positions are drawn at the preset position of the second representative color code in the second pattern module, and the knitting code information is the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code.
[0011] In some embodiments, the step of determining the second weaving code based on the weaving code information and the positional relationship between the second representative color code and the first weaving code in the second pattern diagram includes:
[0012] Based on the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code, and the first knitting code corresponding to the second representative color code at the preset position in the second pattern diagram, the second knitting code corresponding to the arrangement information is determined.
[0013] In some embodiments, the plurality of first knitting codes include a plurality of the front piece knitting needle positions and a plurality of the back piece knitting needle positions; the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position based on the second representative color code, and the first knitting code corresponding to the second representative color code at the preset position in the second pattern diagram, the step of determining the second knitting code includes:
[0014] When the odd-numbered columns of the first knitting codes corresponding to the second representative color code at the preset position in the second pattern are knitting needle positions of the front piece, the matching arrangement information is determined;
[0015] Based on the matched arrangement information, the second weaving code corresponding to the arrangement information is determined.
[0016] In some embodiments, the step of determining the second knitting code based on the arrangement information of the knitting needle positions of the front piece and the knitting needle positions of the back piece, and the first knitting code corresponding to the second representative color code at a preset position in the second pattern diagram includes:
[0017] When the odd-numbered columns of the first knitting codes corresponding to the second representative color code at the preset position in the second pattern are knitting needle positions for the back piece, the matching arrangement information is determined;
[0018] Based on the matched arrangement information, the second weaving code corresponding to the arrangement information is determined.
[0019] In some embodiments, the generating method further comprises:
[0020] The second pattern file is sent to a knitting machine so that the knitting machine completes garment making according to the second pattern file.
[0021] The present application also provides a computerized flat knitting machine, comprising a memory and a processor, wherein the memory is connected to the processor, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the following steps:
[0022] Acquire a first pattern module, where the first pattern module includes a first representative color code and a first knitting code corresponding to the first representative color code;
[0023] Expanding a first pattern image into a first pattern file based on the first pattern module, wherein the first pattern image includes a plurality of first representative color codes, and the plurality of first representative color codes are expanded into a plurality of first knitting codes;
[0024] Obtaining a second pattern module and a second pattern diagram, wherein the second pattern module includes a second representative color code, weaving code information, and a second weaving code corresponding to the weaving code information, and the second pattern diagram includes a plurality of the first weaving codes and a plurality of the second representative color codes;
[0025] The second knitting code is determined based on the knitting code information and the positional relationship between the second representative color code and the first knitting code in the second pattern diagram, the second pattern diagram is expanded into a second pattern file, and multiple second representative color codes are expanded into multiple second knitting codes.
[0026] In some embodiments, the front piece knitting needle positions and the back piece knitting needle positions are drawn at the preset position of the second representative color code in the second pattern module, and the knitting code information is the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code.
[0027] In some embodiments, the processor is configured to determine the second weaving code based on the weaving code information and a positional relationship between the second representative color code and the first weaving code in the second pattern diagram, comprising:
[0028] Based on the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code, and the first knitting code corresponding to the second representative color code at the preset position in the second pattern diagram, the second knitting code corresponding to the arrangement information is determined.
[0029] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the generation method described above is implemented.
[0030] The beneficial effects of the present application are as follows: the present application first obtains a first pattern module and a first pattern diagram, and expands the first pattern diagram into a first pattern file through the first pattern module; further, the second pattern module and a second pattern diagram containing a second representative color code and a first weaving code are obtained, and the second weaving code is determined through the weaving code information and the positional relationship between the second representative color code and the first weaving code in the second pattern diagram to finally generate a second pattern file containing multiple first weaving codes and multiple second weaving codes. Compared with the prior art that requires drawing different pattern modules, the present application matches and identifies the second weaving code through the weaving code information and the positional relationship between the second representative color code and the first weaving code to generate a second pattern file; not only does it reduce the number of module color codes used, making the design process and pattern addition simpler, but it also improves the accuracy of the pattern module through the matching and identification of the weaving code information and the positional relationship. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:
[0032] Figure 1 This is a flow chart of an embodiment of a method for generating a pattern file provided by the present application;
[0033] Figure 2 This is a schematic diagram of an embodiment of the first pattern module, the first pattern diagram, and the first pattern file provided by the present application;
[0034] Figure 3 This is a schematic diagram of an embodiment of the second pattern module, the second pattern image, and the second pattern file provided by the present application;
[0035] Figure 4 This is a schematic diagram of an embodiment of different color pattern modules, pattern drawings, and pattern files provided by the present application;
[0036] Figure 5 yes Figure 4 A schematic diagram of an embodiment of different color pattern modules, pattern diagrams and pattern diagrams after being inserted into pattern rows;
[0037] Figure 6 yes Figure 3 A schematic diagram of an embodiment of a pattern file after the second pattern is inserted into the pattern row and the expanded pattern file;
[0038] Figure 7 This is a flow chart of another embodiment of a method for generating a pattern file provided by the present application;
[0039] Figure 8 This is a structural diagram of an embodiment of a computerized flat knitting machine provided by the present application;
[0040] Figure 9 It is a structural diagram of an embodiment of a computer-readable storage medium provided by this application. DETAILED DESCRIPTION
[0041] The following embodiments of the technical solution of the present application will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application and are therefore only examples and are not intended to limit the scope of protection of the present application.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0043] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features.
[0044] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0045] Currently, wholly fashioned garments are knitted as a single piece, also known as spacer knitting. During spacer knitting, the front and back panels move in different directions due to the offset of needle positions, necessitating the drawing of separate pattern modules, each with a different color code. The complexity of pattern module drawing complicates the design process and pattern addition. Furthermore, the large number of module color codes required for wholly fashioned garments makes it easy to identify the corresponding pattern module.
[0046] See Figure 1-Figure 3 As shown, Figure 1 This is a flow chart of an embodiment of a method for generating a pattern file provided by the present application; Figure 2 This is a schematic diagram of an embodiment of the first pattern module, the first pattern diagram, and the first pattern file provided by the present application; Figure 3This is a schematic diagram of an embodiment of the second pattern module, the second pattern image, and the second pattern file provided by the present application. The method for generating the pattern file of this embodiment is applied to a computerized flat knitting machine, and the generation method includes the following steps:
[0047] Step S100 : obtaining a first pattern module 10 , wherein the first pattern module 10 includes a first representative color code 11 and a first knitting code 12 corresponding to the first representative color code 11 .
[0048] Among them, the first pattern module 10 refers to a digital module used to define the basic pattern design during the knitting process of the computer knitting machine. The first pattern module 10 includes a first representative color code 11 and a first knitting code 12 corresponding to the first representative color code 11. The first representative color code 11 and the first knitting code 12 are stored and processed in a specific encoding method so that they can be recognized and executed by the computer knitting machine during the knitting process.
[0049] The first representative color code 11 is a code used to represent a specific color in the first pattern module 10. In pattern design, color is an important component of the pattern's visual effect. The first representative color code 11 digitizes color information through a standardized encoding method, enabling computer programs to recognize and process it. For example, within a pattern design, different colors can be represented by different numerical or character codes. These numerical or character codes are converted into specific color instructions during the knitting process, instructing the computerized flat knitting machine to knit with the corresponding color.
[0050] The first knitting code 12 is a code corresponding to the first representative color code 11 and is used to represent knitting action information; for example, the knitting action information includes the arrangement and movement of needle positions, the lifting and lowering of needles, the formation of loops, and the like.
[0051] In some embodiments, in the pattern-making software of the computerized flat knitting machine, a user can define and draw the first pattern module 10. For example, the pattern-making software provides an editing window, through which the user sets the first representative color code 11 and the corresponding first knitting code 12 to draw the first pattern module 10. The drawn first pattern module 10 is stored in a pre-stored memory of the computerized flat knitting machine, or is saved and transferred via an external storage device (e.g., a USB), and can be directly called or retrieved when needed.
[0052] In some embodiments, the computerized flat knitting machine pre-stores the first pattern module 10, which can be directly called or obtained when needed.
[0053] In some embodiments, the pattern-making software can automatically generate the first pattern module 10 using mathematical models and algorithms based on user-input design parameters, including but not limited to stitches, stitch properties, and looping methods. For example, a mathematical function, fractal, or weak chaos model can be used to generate a graphic image, which is then deformed using a filter algorithm to generate the first pattern module 10. The user simply enters the design parameters, and the pattern-making software automatically matches the appropriate first representative color code 11 and first weave code 12 to generate the first pattern module 10.
[0054] For example, Figure 2 As shown, the computerized flat knitting machine obtains a first pattern module 10 , and the first pattern module 10 includes a first representative color code 11 and a first knitting code 12 .
[0055] Optionally, the first representative color code 11 includes a first color code 121 and a second color code 122 ; the first color code 121 is a code for representing red, and the second color code 122 is a code for representing blue.
[0056] Optionally, the first knitting code 12 includes a third knitting code 123 corresponding to the first color code 121 and a fourth knitting code 124 corresponding to the second color code 122 .
[0057] Optionally, since the fully fashioned garment is knitted as a whole with the front and back pieces, it is also called spacer knitting; the spacer knitting includes the front piece knitting needle position 1231 and the back piece knitting needle position 1241.
[0058] Optionally, the first pattern module 10 further includes first attribute information 13 corresponding to the first representative color code 11 . The first attribute information 13 is used to indicate a cycle mode of the first pattern module 10 , such as a cycle period, a cycle mode or a cycle direction.
[0059] Step S200 : Expanding the first pattern image 20 into a first pattern file 30 based on the first pattern module 10 , wherein the first pattern image 20 includes a plurality of first representative color codes 11 , and the plurality of first representative color codes 11 are expanded into a plurality of first knitting codes 12 .
[0060] Among them, the first pattern diagram 20 refers to a graphical representation used to represent the pattern design during the knitting process of a computer knitting machine. For example, the first pattern diagram 20 is a two-dimensional graphic that includes multiple first representative color codes 11. The multiple first representative color codes 11 are arranged in a certain order and pattern, intuitively showing the design of the pattern. The first pattern file 30 refers to a digital file generated based on the first pattern diagram 20, including the first knitting codes 12 corresponding to the multiple first representative color codes 11 in the first pattern diagram 20. The first pattern file 30 is a specific, executable file used to guide the computer knitting machine to perform knitting operations. The first pattern file 30 converts the graphical information in the first pattern diagram 20 into instructions that can be recognized and executed by the computer knitting machine, thereby realizing the knitting of the pattern.
[0061] In some embodiments, after obtaining the first pattern image 20, the first representative color codes 11 in the first pattern image 20 are matched with the first knitting codes 12 in the first pattern module 10 to obtain multiple first knitting codes 12, so that the first pattern image 20 is expanded into a first pattern file 30 containing multiple first knitting codes 12. For example, Figure 2 As shown, the first pattern diagram 20 includes multiple first color codes 121 and multiple second color codes 122. The first color code 121 and the second color code 122 are matched with the third weaving code 123 and the fourth weaving code 124 respectively to obtain multiple third weaving codes 123 and multiple fourth weaving codes 124. The first pattern diagram 20 is expanded into a first pattern file 30; the first pattern file 30 includes multiple third weaving codes 123 and multiple fourth weaving codes 124; since the first weaving code 12 includes the third weaving code 123 and the fourth weaving code 124, at this time, the first pattern file 30 includes multiple third weaving codes 123 and multiple fourth weaving codes 124, that is, the first pattern file 30 includes multiple first weaving codes 12.
[0062] Optionally, the plurality of first knitting codes 12 include a plurality of front panel knitting needle positions 1231 and a plurality of back panel knitting needle positions 1241 , that is, the first pattern file 30 includes a plurality of front panel knitting needle positions 1231 and a plurality of back panel knitting needle positions 1241 .
[0063] Step S300 , obtaining a second pattern module 40 and a second pattern diagram 50 , wherein the second pattern module 40 includes a second representative color code 41 , knitting code information 42 and a second knitting code 43 corresponding to the knitting code information 42 , and the second pattern diagram 50 includes a plurality of first knitting codes 12 and a plurality of second representative color codes 41 .
[0064] The second pattern module 40 is a digital module used to define complex pattern designs during the knitting process of a computerized flat knitting machine. The second pattern module 40 includes a second representative color code 41, knitting code information 42, and a second knitting code 43 corresponding to the knitting code information 42. The second pattern module 40 is typically used to further expand and refine the pattern design based on the first pattern module 10 to meet more complex knitting requirements.
[0065] In this embodiment, the second representative color code 41 is a type of representative color code in the second pattern module 40, representing a specific color code. The knitting code information 42 is information used to associate the second representative color code 41 with the second knitting code 43, such as the arrangement of knitting needle positions. The second knitting code 43 is the knitting instruction code corresponding to the knitting code information 42.
[0066] The second pattern image 50 is a complex graphical representation of a pattern generated based on the first pattern image 20 and in combination with the second pattern module 40. The second pattern image 50 includes multiple first knitting codes 12 and multiple second representative color codes 41. The combination of the second representative color codes 41 and the first knitting codes 12 displays a complex pattern and color distribution.
[0067] In some embodiments, in the pattern-making software of the computerized flat knitting machine, a user can define and draw the second pattern module 40. For example, the pattern-making software provides an editing window, through which the user sets the second representative color code 41, knitting code information 42, and the second knitting code 43 to draw the second pattern module 40. The drawn second pattern module 40 is stored in a pre-stored memory of the computerized flat knitting machine, or is saved and transferred via an external storage device (e.g., a USB), and can be directly called or retrieved when needed.
[0068] Alternatively, as Figure 3 As shown, the second representative color code 41 includes a third color code 131, which is a code for representing cyan; the weaving code information 42 includes first information 421 and second information 422; the second weaving code 43 includes a fifth weaving code 431 corresponding to the first information 421 and a sixth weaving code 432 corresponding to the second information 422; the second pattern module 40 also includes second attribute information 44 corresponding to the second representative color code 41, and the second attribute information 44 is used to indicate a cycle mode of the second pattern module 40, such as a cycle period, a cycle mode or a cycle direction.
[0069] In some embodiments, the front piece knitting needle position 1231 and the back piece knitting needle position 1241 are drawn at the preset position of the second representative color code 41 in the second pattern module 40, and the knitting code information 42 is the arrangement information of the front piece knitting needle position 1231 and the back piece knitting needle position 1241 drawn at the preset position of the second representative color code 41.
[0070] For example, Figure 3 As shown, the front piece knitting needle positions 1231 and the back piece knitting needle positions 1241 are drawn below the third color code 131, and the back piece knitting needle positions 1241 are in front and the front piece knitting needle positions 1231 are in the back; at this time, the first information 421 of the knitting code information 42 indicates that the odd-numbered columns are the back piece knitting needle positions 1241, and the first information 421 corresponds to the fifth knitting code 431. The front piece knitting needle positions 1231 and the back piece knitting needle positions 1241 are drawn below the third color code 131, and the front piece knitting needle positions 1231 are in front and the back piece knitting needle positions 1241 are in the back; at this time, the second information 422 of the knitting code information 42 indicates that the odd-numbered columns are the front piece knitting needle positions 1231, and the second information 422 corresponds to the sixth knitting code 432. Figure 2 compared to, Figure 3 Different graphics are used to represent the front piece knitting needle position 1231 and the back piece knitting needle position 1241 respectively.
[0071] The preset position is the lower position of the second representative color code 41. In other embodiments, the preset position is the upper position of the second representative color code 41.
[0072] Step S400: Determine the second knitting code 43 based on the knitting code information 42 and the positional relationship between the second representative color code 41 and the first knitting code 12 in the second pattern diagram 50, expand the second pattern diagram 50 into a second pattern file 60, and expand the plurality of second representative color codes 41 into a plurality of second knitting codes 43.
[0073] The second pattern file 60 refers to a digital file generated based on the second pattern diagram 50 , and includes a plurality of second knitting codes 43 and a plurality of first knitting codes 12 in the second pattern diagram 50 .
[0074] In some embodiments, the second pattern diagram 50 includes multiple second representative color codes 41 and multiple first weaving codes 12. Through the positional relationship between the second representative color code 41 and the first weaving code 12 in the second pattern diagram 50 and the weaving code information 42, the second weaving code 43 corresponding to the weaving code information 42 is automatically matched and identified, thereby expanding the second pattern diagram 50 into a second pattern file 60 containing multiple first weaving codes 12 and multiple second weaving codes 43.
[0075] This embodiment automatically matches and identifies the second knitting code 43 corresponding to the knitting code information 42 through the positional relationship between the second representative color code 41 and the first knitting code 12 in the second pattern diagram 50 and the knitting code information 42, thereby reducing human errors and improving the accuracy and reliability of the second pattern file 60.
[0076] In some embodiments, based on the arrangement information of the front piece knitting needle position 1231 and the back piece knitting needle position 1241 drawn at the preset position of the second representative color code 41, and the first knitting code 12 corresponding to the second representative color code 41 at the preset position in the second pattern diagram 50, the second knitting code 43 corresponding to the arrangement information is determined.
[0077] This embodiment can quickly and accurately determine the corresponding second knitting code 43 based on the preset arrangement information and the first knitting code 12 corresponding to the second representative color code 41 at the preset position in the second pattern diagram 50, thereby generating an accurate pattern file.
[0078] In some embodiments, when the odd-numbered column of the first knitting code 12 corresponding to the second representative color code 41 in the second pattern diagram 50 at the preset position is the front piece knitting needle position 1231, the matching arrangement information is determined; based on the matching arrangement information, the second knitting code 43 corresponding to the arrangement information is determined.
[0079] For example, see Figure 2 and Figure 3 As shown, the odd-numbered column of the first knitting code 12 corresponding to the third color code 131 in the first row of the second pattern diagram 50 is the front piece knitting needle position 1231, and the arrangement information of the third color code 131 is determined to be the odd-numbered column for the front piece knitting needle position 1231, which corresponds to the second information 422; according to the second pattern module 40, it can be known that the second information 422 corresponds to the sixth knitting code 432, and the third color code 131 in the first row of the second pattern diagram 50 is expanded into the sixth knitting code 432.
[0080] In some embodiments, when the odd-numbered column of the first knitting code 12 corresponding to the second representative color code 41 in the second pattern diagram 50 at the preset position is the back piece knitting needle position 1241, the matching arrangement information is determined; based on the matching arrangement information, the second knitting code 43 corresponding to the arrangement information is determined.
[0081] For example, see Figure 2 and Figure 3 As shown, the odd-numbered column of the first knitting code 12 corresponding to the third color code 131 in the third row of the second pattern diagram 50 is the back piece knitting needle position 1241, and the arrangement information of the third color code 131 is determined to be the odd-numbered column for the back piece knitting needle position 1241, which corresponds to the first information 421; according to the second pattern module 40, it can be known that the first information 421 corresponds to the fifth knitting code 431, and the third color code 131 in the third row of the second pattern diagram 50 is expanded into the fifth knitting code 431.
[0082] This embodiment automatically identifies the odd-numbered columns of the first knitting codes 12 corresponding to the second representative color code 41 at the preset position in the second pattern diagram 50 as the front piece knitting needle position 1231 or the back piece knitting needle position 1241, and matches the corresponding arrangement information. This allows the second knitting code 43 corresponding to the arrangement information to be quickly determined, significantly improving the generation efficiency of the second pattern file 60 and shortening the cycle from design to production.
[0083] In some embodiments, after the computer knitting machine obtains the first pattern module 10, it expands the first pattern diagram 20 into a first pattern file 30 containing multiple first knitting codes 12 according to the first pattern module 10; after obtaining the second pattern module 40 and the second pattern diagram 50, it automatically identifies the odd-numbered columns of the first knitting codes 12 corresponding to the second representative color code 41 in the second pattern diagram 50 at the lower position as the front piece knitting needle position 1231 or the back piece knitting needle position 1241, and matches the fifth knitting code 431 or the sixth knitting code 432, and then determines that the second representative color code 41 is expanded into the fifth knitting code 431 or the sixth knitting code 432, so that the expanded second pattern file 60 includes multiple fifth knitting codes 431, multiple sixth knitting codes 432 and multiple first knitting codes 12. Since the second knitting code 43 includes the fifth knitting code 431 and the sixth knitting code 432 , the second pattern file 60 includes multiple fifth knitting codes 431 , multiple sixth knitting codes 432 and multiple first knitting codes 12 , that is, the second pattern file 60 includes multiple second knitting codes 43 and multiple first knitting codes 12 .
[0084] Compared with the prior art that requires drawing different pattern modules, this embodiment matches and identifies the second knitting code 43 through the positional relationship between the knitting code information 42 and the second representative color code 41 and the first knitting code 12, and generates a second pattern file 60; this not only reduces the number of module color codes used, making the design process and pattern addition simpler, but also improves the accuracy of the pattern module through the matching and identification of the positional relationship between the knitting code information 42 and the first knitting code 12.
[0085] Currently, in the actual knitting process of fully fashioned garments, pattern modules of different colors are typically drawn at different needle positions on the front and back pieces according to design requirements, and these modules represent different color codes. Pattern module drawing is complex, and the current knitting process requires a large number of module color codes. When pattern rows need to be inserted or deleted, the corresponding pattern modules also need to be changed. For example, after inserting a few pattern rows, the colors corresponding to the previously drawn pattern module positions need to be adjusted. If the pattern changes significantly, manually adjusting these needle positions and module colors is not only inefficient and error-prone, but also requires the use of different color codes.
[0086] For example, see Figure 4 and Figure 5 As shown, Figure 4This is a schematic diagram of an embodiment of different color pattern modules, pattern drawings, and pattern files provided by the present application; Figure 5 yes Figure 4 Schematic diagram of an embodiment of different color pattern modules, pattern images and pattern images after inserting pattern rows; wherein, it includes different color pattern modules 100, pattern images 200, pattern files 300 and pattern images 400 after inserting pattern rows. Figure 4 and Figure 5 It can be seen that after inserting some pattern rows, the colors corresponding to the positions of the originally drawn pattern modules need to be adjusted. When the pattern changes greatly, manual adjustment is prone to errors and requires different representative color codes.
[0087] See Figure 6 As shown, Figure 6 yes Figure 3 Schematic diagram of an embodiment of a pattern file after the second pattern image is inserted into the pattern row and the expanded pattern file. For example, after the computerized flat knitting machine of this embodiment obtains the pattern image 600 after the second pattern image 50 is inserted into the pattern row, it automatically identifies that the first knitting code 12 corresponding to the second representative color code 41 in the first row of the pattern image 600 at the lower position is the back piece knitting needle position 1241 in the odd-numbered column, and matches the first information 421. Furthermore, the fifth knitting code 431 corresponding to the first information 421 is matched. Therefore, the first row of the expanded pattern file 700 contains the fifth knitting code 431.
[0088] Compared with the prior art, in this embodiment, after certain pattern rows are inserted into the second pattern diagram 50, it is possible that the first knitting code 12 corresponding to the second representative color code 41 at the preset position is changed. At this time, the knitting needle position of the first knitting code 12 corresponding to the changed second representative color code 41 at the preset position in the odd-numbered column can be automatically identified as the front piece knitting needle position 1231 or the back piece knitting needle position 1241, so as to expand the correct pattern file without drawing different color pattern modules and manually performing large-scale adjustments.
[0089] See also Figure 7 As shown, Figure 7 This is a flow chart of another embodiment of a method for generating a pattern file provided by the present application. The steps in this embodiment are the same as those in the above embodiment and will not be repeated here. The generation method in this embodiment includes the following steps:
[0090] Step S100 : obtaining a first pattern module 10 , wherein the first pattern module 10 includes a first representative color code 11 and a first knitting code 12 corresponding to the first representative color code 11 .
[0091] Step S200 : Expanding the first pattern image 20 into a first pattern file 30 based on the first pattern module 10 , wherein the first pattern image 20 includes a plurality of first representative color codes 11 , and the plurality of first representative color codes 11 are expanded into a plurality of first knitting codes 12 .
[0092] Step S300 , obtaining a second pattern module 40 and a second pattern diagram 50 , wherein the second pattern module 40 includes a second representative color code 41 , knitting code information 42 and a second knitting code 43 corresponding to the knitting code information 42 , and the second pattern diagram 50 includes a plurality of first knitting codes 12 and a plurality of second representative color codes 41 .
[0093] Step S400: Determine the second knitting code 43 based on the knitting code information 42 and the positional relationship between the second representative color code 41 and the first knitting code 12 in the second pattern diagram 50, expand the second pattern diagram 50 into a second pattern file 60, and expand the plurality of second representative color codes 41 into a plurality of second knitting codes 43.
[0094] Step S500: Send the second pattern file 60 to the knitting machine so that the knitting machine completes garment making according to the second pattern file 60.
[0095] In some embodiments, the computerized flat knitting machine can send the second pattern file 60 to the flat knitting machine so that the flat knitting machine can complete the garment making according to the stitches, the properties corresponding to the stitches, and the cycle information in the second pattern file 60 .
[0096] Another embodiment of the present application also provides a computerized flat knitting machine, see Figure 8 As shown, Figure 8 This is a schematic structural diagram of an embodiment of a computerized flat knitting machine provided by the present application. Figure 8 As shown, the computerized flat knitting machine includes a processor 21 and a memory 22 coupled to the processor 21 .
[0097] The memory 22 stores program instructions for implementing the generation method of any of the above-mentioned embodiments; the processor 21 is used to execute the program instructions stored in the memory 22 to implement the steps of the above-mentioned generation method embodiments. The processor 21 can also be called a CPU (Central Processing Unit). The processor 21 may be an integrated circuit chip with signal processing capabilities. The processor 21 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0098] Specifically, the processor 21 is configured to execute a computer program to implement the following steps:
[0099] Step S100: Acquire a first pattern module, where the first pattern module includes a first representative color code and a first knitting code corresponding to the first representative color code.
[0100] Step S200: Expanding a first pattern image into a first pattern file based on a first pattern module, wherein the first pattern image includes a plurality of first representative color codes, and the plurality of first representative color codes are expanded into a plurality of first knitting codes.
[0101] Step S300: Acquire a second pattern module and a second pattern diagram, wherein the second pattern module includes a second representative color code, weaving code information, and a second weaving code corresponding to the weaving code information, and the second pattern diagram includes a plurality of first weaving codes and a plurality of second representative color codes.
[0102] Step S400: Determine the second knitting code based on the positional relationship between the second representative color code and the first knitting code in the knitting code information and the second pattern image, expand the second pattern image into a second pattern file, and expand the plurality of second representative color codes into a plurality of second knitting codes.
[0103] Optionally, the front piece knitting needle positions and the back piece knitting needle positions are drawn at the preset position of the second representative color code in the second pattern module, and the knitting code information is the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code.
[0104] Optionally, the processor 21 is configured to determine the second weaving code based on the weaving code information and the positional relationship between the second representative color code and the first weaving code in the second pattern image, comprising:
[0105] Based on the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code, and the first knitting code corresponding to the second representative color code at the preset position in the second pattern diagram, the second knitting code corresponding to the arrangement information is determined.
[0106] Figure 9 This is a schematic diagram of the structure of an embodiment of a computer-readable storage medium provided by this application. Figure 9As shown, the computer-readable storage medium 90 of the embodiment of the present application stores program instructions 91, and when the program instructions 91 are executed, the method provided in the above embodiment of the present application is implemented. Among them, the program instructions 91 can form a program file and be stored in the above-mentioned computer-readable storage medium 90 in the form of a software product, so that a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of the methods of each embodiment of the present application. The aforementioned computer-readable storage medium 90 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0107] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for generating a pattern file, characterized in that: Applied to a computerized flat knitting machine, the method comprises: Acquire a first pattern module, where the first pattern module includes a first representative color code and a first knitting code corresponding to the first representative color code; Expanding a first pattern image into a first pattern file based on the first pattern module, wherein the first pattern image includes a plurality of first representative color codes, and the plurality of first representative color codes are expanded into a plurality of first knitting codes; Obtaining a second pattern module and a second pattern diagram, wherein the second pattern module includes a second representative color code, weaving code information, and a second weaving code corresponding to the weaving code information, and the second pattern diagram includes a plurality of the first weaving codes and a plurality of the second representative color codes; The second knitting code is determined based on the knitting code information and the positional relationship between the second representative color code and the first knitting code in the second pattern diagram, the second pattern diagram is expanded into a second pattern file, and multiple second representative color codes are expanded into multiple second knitting codes.
2. The generation method according to claim 1, characterized in that The front piece knitting needle positions and the back piece knitting needle positions are drawn at the preset position of the second representative color code in the second pattern module, and the knitting code information is the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code.
3. The generation method according to claim 2, characterized in that The step of determining the second weaving code based on the weaving code information and the positional relationship between the second representative color code and the first weaving code in the second pattern diagram includes: Based on the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code, and the first knitting code corresponding to the second representative color code at the preset position in the second pattern diagram, the second knitting code corresponding to the arrangement information is determined.
4. The generation method according to claim 3, characterized in that The plurality of first knitting codes include a plurality of front piece knitting needle positions and a plurality of back piece knitting needle positions; the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position based on the second representative color code, and the first knitting code corresponding to the second representative color code at the preset position in the second pattern diagram, the step of determining the second knitting code includes: When the odd-numbered columns of the first knitting codes corresponding to the second representative color code at the preset position in the second pattern are knitting needle positions of the front piece, the matching arrangement information is determined; Based on the matched arrangement information, the second weaving code corresponding to the arrangement information is determined.
5. The generation method according to claim 4, characterized in that The step of determining the second knitting code based on the arrangement information of the knitting needle positions of the front piece and the knitting needle positions of the back piece and the first knitting code corresponding to the second representative color code at a preset position in the second pattern diagram includes: When the odd-numbered columns of the first knitting codes corresponding to the second representative color code at the preset position in the second pattern are knitting needle positions for the back piece, the matching arrangement information is determined; Based on the matched arrangement information, the second weaving code corresponding to the arrangement information is determined.
6. The generation method according to claim 1, characterized in that The generating method further comprises: The second pattern file is sent to a knitting machine so that the knitting machine completes garment making according to the second pattern file.
7. A computerized flat knitting machine, characterized in that: The system comprises a memory and a processor, wherein the memory is connected to the processor, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the following steps: Acquire a first pattern module, where the first pattern module includes a first representative color code and a first knitting code corresponding to the first representative color code; Expanding a first pattern image into a first pattern file based on the first pattern module, wherein the first pattern image includes a plurality of first representative color codes, and the plurality of first representative color codes are expanded into a plurality of first knitting codes; Obtaining a second pattern module and a second pattern diagram, wherein the second pattern module includes a second representative color code, weaving code information, and a second weaving code corresponding to the weaving code information, and the second pattern diagram includes a plurality of the first weaving codes and a plurality of the second representative color codes; The second knitting code is determined based on the knitting code information and the positional relationship between the second representative color code and the first knitting code in the second pattern diagram, the second pattern diagram is expanded into a second pattern file, and multiple second representative color codes are expanded into multiple second knitting codes.
8. The computerized flat knitting machine according to claim 7, characterized in that: The front piece knitting needle positions and the back piece knitting needle positions are drawn at the preset position of the second representative color code in the second pattern module, and the knitting code information is the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code.
9. The computerized flat knitting machine according to claim 8, characterized in that: The processor is configured to determine the second weaving code based on the weaving code information and a positional relationship between the second representative color code and the first weaving code in the second pattern diagram, comprising: Based on the arrangement information of the front piece knitting needle positions and the back piece knitting needle positions drawn at the preset position of the second representative color code, and the first knitting code corresponding to the second representative color code at the preset position in the second pattern diagram, the second knitting code corresponding to the arrangement information is determined.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the generation method according to any one of claims 1 to 6 is implemented.