Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
CN117171826A - Pattern file editing method - Google Patents
[go: Go Back, main page]

CN117171826A - Pattern file editing method - Google Patents

Pattern file editing method Download PDF

Info

Publication number
CN117171826A
CN117171826A CN202311022156.5A CN202311022156A CN117171826A CN 117171826 A CN117171826 A CN 117171826A CN 202311022156 A CN202311022156 A CN 202311022156A CN 117171826 A CN117171826 A CN 117171826A
Authority
CN
China
Prior art keywords
stitch
point
points
data
curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311022156.5A
Other languages
Chinese (zh)
Inventor
段湘梁
侯文学
邢少鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dahao Industrial Sewing Intelligent Control Technology Co ltd
Beijing Dahao Technology Co Ltd
Original Assignee
Beijing Dahao Industrial Sewing Intelligent Control Technology Co ltd
Beijing Dahao Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dahao Industrial Sewing Intelligent Control Technology Co ltd, Beijing Dahao Technology Co Ltd filed Critical Beijing Dahao Industrial Sewing Intelligent Control Technology Co ltd
Priority to CN202311022156.5A priority Critical patent/CN117171826A/en
Publication of CN117171826A publication Critical patent/CN117171826A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Sewing Machines And Sewing (AREA)

Abstract

The application provides a pattern file editing method which can be used in the technical field of textiles. In the method, after a plurality of groups of target stitch data are obtained by identifying and screening the obtained pattern file, a repeated point group, an inflection point group, a straight line point group and a curve point group are determined according to stitch coordinates of stitch points. Then recombining the curve point groups to obtain target curve point groups; combining the repeated point group, the inflection point group, the straight line point group and the special sewing data to construct stitch reconstruction data; and finally, replacing the stitch data to be replaced in the pattern file with stitch reconstruction data to obtain the target pattern file. According to the scheme, the pattern files are identified and screened, the shape stitch groups are determined, then the stitch data are rebuilt, the stitch data in the pattern files are replaced, editing of the pattern files can be completed, workers are not required to manufacture the pattern files again, and editing efficiency is effectively improved.

Description

Pattern file editing method
Technical Field
The application relates to the technical field of textiles, in particular to a pattern file editing method.
Background
Along with development of technology, the pattern woven by the pattern machine is more and more complex, and in the running process of the pattern machine, the pattern machine needs to be run according to pattern files.
In the prior art, in the running process of the pattern machine according to the pattern file, if workers find that the woven pattern is wrong or the pattern does not meet the requirements, fine adjustment is needed to the pattern file, and the worker can only reproduce the pattern file.
In summary, in the prior art, when the pattern file needs to be adjusted, only the worker can reproduce the pattern file, resulting in lower efficiency.
Disclosure of Invention
The embodiment of the application provides a pattern file editing method which is used for solving the problem that in the prior art, when a pattern file needs to be adjusted, only workers can reproduce the pattern file, so that the efficiency is low.
In a first aspect, an embodiment of the present application provides a method for editing a spline file, including:
identifying and screening the obtained pattern files to obtain a plurality of groups of target stitch data; each group of target stitch data comprises special sewing data and stitch data to be replaced, wherein the stitch data to be replaced comprises stitch coordinates corresponding to a plurality of stitch points;
for each group of target stitch data, determining a shape stitch point group according to stitch coordinates of each stitch point in the target stitch data, wherein the shape stitch point group comprises a repetition point group, an inflection point group, a straight line point group and a curve point group;
For each group of curve point groups, reorganizing the curve point groups according to stitch coordinates of stitch points in the curve point groups to obtain at least one group of target curve point groups;
constructing stitch reconstruction data according to the repeated point group, the inflection point group, the straight line point group, the target curve point group and the special sewing data;
and replacing the stitch data to be replaced in the pattern file with the stitch reconstruction data to obtain the target pattern file.
In a specific embodiment, the identifying and screening the obtained pattern file to obtain multiple groups of target stitch data includes:
identifying the pattern file to obtain a plurality of groups of stitch data to be screened;
and screening the multiple groups of stitch data to be screened to obtain multiple groups of target stitch data.
In a specific embodiment, the identifying the pattern file to obtain the data of the to-be-screened stitch includes:
sequentially aiming at the stitch points in the pattern file according to the sequence of the stitch points in the pattern file, if the stitch points carry a start mark, determining an end stitch point carrying an end mark after the stitch points;
Taking initial stitch data of all stitch points from the stitch point to the end stitch point as stitch data to be replaced, wherein the initial stitch data comprises stitch coordinates;
determining special sewing data according to stitch coordinates of all stitch points from the stitch point to the end stitch point;
and taking the stitch data to be replaced and the special sewing data as a group of stitch data to be screened.
In one embodiment, the determining special sewing data according to the stitch coordinates of all the stitch points from the stitch point to the end stitch point includes:
respectively taking the first preset discrimination number of stitch points from the stitch point to the previous stitch point of the ending stitch point and the first preset discrimination number of stitch points of the reciprocal as a group of discrimination stitch point groups;
if the number of the stitch points with repeated stitch coordinates in the two groups of judging stitch points is larger than the second preset judging number, determining that the sewing type in the special sewing data is an overlapped sewing type;
if the number of the stitch points with repeated stitch coordinates in the two groups of the judging stitch points is smaller than or equal to the second preset judging number, determining whether the reciprocating points exist in the judging stitch point groups according to the stitch coordinates of the stitch points in the judging stitch point groups for each group of the judging stitch point groups;
If the judgment stitch point group has the round-trip point, dividing the judgment stitch point group according to the round-trip point to obtain a plurality of round-trip stitch point groups;
determining the round trip number of the round trip point groups with the same stitch coordinates in the plurality of round trip point groups;
if the round trip number is larger than the third preset judging number, determining that the sewing type in the special sewing data is a backstitch type;
if the two groups of judging stitch points do not have round trip points or the round trip number is smaller than or equal to the third preset judging number, determining that the sewing type in the special sewing data is a non-target special sewing type.
In a specific embodiment, the special sewing data includes a special sewing type, and the selecting the plurality of groups of stitch data to be screened to obtain the plurality of groups of target stitch data includes:
for each group of stitch data to be screened, deleting the stitch data to be screened if the special sewing type in the stitch data to be screened is a non-target special sewing type;
if the stitch coordinates in the stitch data to be screened only comprise the stitch coordinates of one or two stitch points, deleting the stitch data to be screened;
Performing straight line fitting according to stitch coordinates in the stitch data to be screened to obtain a first straight line;
if each stitch point in the stitch data to be screened belongs to the first straight line, deleting the stitch data to be screened;
and taking the remaining stitch data in the plurality of groups of stitch data to be screened as the plurality of groups of target stitch data.
In one embodiment, the determining the shape stitch group according to the stitch coordinates of each stitch in the target stitch data includes:
determining a repetition point according to the stitch coordinates of each stitch point in the target stitch data;
performing de-duplication treatment on the repeated points, and taking each repeated point after de-duplication as a group of repeated point groups respectively;
determining an inflection point group according to stitch coordinates and stitch sequences of each stitch point in the target stitch data, wherein the inflection point group comprises at least one inflection point;
dividing the stitch points in the target stitch data according to the inflection points in the inflection point group to obtain a plurality of stitch point groups to be distinguished;
and for each stitch point group to be distinguished, determining a straight line point group or a curve point group according to stitch coordinates of stitch points in the stitch point group to be distinguished.
In one specific embodiment, the determining the inflection point group according to the stitch coordinates and the stitch sequence of each stitch point in the target stitch data includes:
sequentially carrying out straight line fitting on each stitch point in the target stitch data according to the stitch point sequence in the target stitch data, and if the stitch point belongs to a preset position range, carrying out straight line fitting according to stitch coordinates of a preset fitting number of stitch points before the stitch point to obtain a second straight line;
performing straight line fitting according to the stitch coordinates of the preset fitting number of stitch points after the stitch points to obtain a third straight line;
and if the distance between the stitch point and the second straight line is greater than a preset distance threshold value, and/or if the distance between the stitch point and the third straight line is greater than the preset distance threshold value, taking the stitch point as an inflection point in the inflection point group.
In one specific embodiment, the determining a straight line point group or a curve point group according to the stitch coordinates of the stitch points in the stitch point group to be distinguished includes:
performing straight line fitting according to stitch coordinates of stitch points in the stitch point group to be distinguished to obtain a fourth straight line;
If each stitch point in the stitch point group to be distinguished belongs to the fourth straight line, determining a first stitch point and a last stitch point in the stitch point group to be distinguished as a straight line point group;
and if the stitch points in the stitch point group to be distinguished do not belong to the fourth straight line, screening the stitch points in the stitch point group to be distinguished by using a Target-Puck algorithm, and taking the stitch points obtained by screening as a curve point group.
In a specific embodiment, the reorganizing the curve point set according to the stitch coordinates of the stitch points in the curve point set to obtain at least one set of target curve point sets includes:
performing curve fitting according to stitch coordinates of stitch points in the curve point group to obtain a first curve;
acquiring all reference stitch points from the first curve point of the curve point group to the last curve point of the curve point group in the target stitch data, wherein all the reference stitch points comprise curve points in the curve point group;
dividing all the reference stitch points according to the curve points in the curve point group to obtain at least one group of reference stitch point groups;
performing curve fitting on each group of reference stitch point groups according to stitch coordinates of stitch points in the reference stitch point groups to obtain a second curve;
Calculating the maximum distance between the stitch points in the reference stitch point group and the distance of the first curve;
calculating a first average distance between the stitch points in the reference stitch point group and the first curve;
calculating a second average distance between the stitch points in the reference stitch point group and the second curve;
if the maximum distance is greater than a preset recombination distance threshold value, and/or the quotient of the first average distance divided by the second average distance is greater than a preset multiple threshold value, taking the curve points in the reference stitch point group as segmentation reference points;
and cutting the curve point group according to the obtained cutting reference point to obtain a target curve point group.
In one specific embodiment, the constructing stitch reconstruction data according to the repeated point group, the inflection point group, the straight line point group, the target curve point group and the special sewing data includes:
generating stitch data of the linear reconstruction track points according to the linear point groups and the preset stitch length;
generating stitch data of curve reconstruction track points according to the target curve point group and a preset stitch length;
generating stitch data of special reconstruction track points according to the special sewing data;
And combining the stitch data of the stitch points in the repeated point group, the stitch data of the stitch points in the inflection point group, the stitch data of the straight-line reconstruction track points, the stitch data of the curve reconstruction track points and the stitch data of the special reconstruction track points to obtain the stitch reconstruction data.
According to the pattern file editing method provided by the embodiment of the application, after a plurality of groups of target stitch data are obtained by identifying and screening the obtained pattern file, a repeated point group, an inflection point group, a straight line point group and a curve point group are determined according to stitch coordinates of stitch points. Then recombining the curve point groups to obtain target curve point groups; combining the repeated point group, the inflection point group, the straight line point group and the special sewing data to construct stitch reconstruction data; and finally, replacing the stitch data to be replaced in the pattern file with stitch reconstruction data to obtain the target pattern file. According to the scheme, the pattern files are identified and screened, the shape stitch groups are determined, then the stitch data are rebuilt, the stitch data in the pattern files are replaced, editing of the pattern files can be completed, workers are not required to manufacture the pattern files again, and editing efficiency is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1a is a schematic flow chart of a first embodiment of a method for editing a pattern file according to the present application;
FIG. 1b is a schematic diagram of the editing flow of the pattern file provided by the application;
FIG. 1c is a schematic diagram of a new stitch point generated from a set of straight line points according to the prior art;
FIG. 1d is a schematic diagram of a new stitch generated from a set of shape stitches provided by the present application;
FIG. 2a is a schematic flow chart of a second embodiment of a method for editing a pattern file according to the present application;
FIG. 2b is a schematic drawing of backstitch type stitch provided by the present application;
FIG. 2c is a schematic view of an overlapping seam type stitch provided by the present application;
FIG. 3 is a schematic flow chart of a third embodiment of the method for editing a pattern file;
FIG. 4 is a schematic flow chart of a fourth embodiment of the method for editing a pattern file according to the present application;
FIG. 5 is a schematic flow chart of a fifth embodiment of the method for editing a pattern file;
FIG. 6 is a schematic structural diagram of an embodiment of a pattern file editing apparatus provided by the application;
fig. 7 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which are made by a person skilled in the art based on the embodiments of the application in light of the present disclosure, are intended to be within the scope of the application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Along with development of technology, the pattern woven by the pattern machine is more and more complex, and in the running process of the pattern machine, the pattern machine needs to be run according to pattern files.
In some cases, there may be a need to edit the pattern file, for example, since the pattern file is generated by using plate making software, and the patterns generated by different plate making software are different, and the patterns processed by different pattern machines are also different, when using the pattern machine, format conversion needs to be performed on the pattern file generated by the plate making software, and errors may occur in the conversion process, so that when the pattern machine operates according to the converted pattern file, a problem occurs in the pattern of weaving, and when this time, the pattern file needs to be edited. For another example, workers find that the woven pattern does not meet the requirements, the stitch length is inconsistent, and the like, and the pattern file needs to be edited.
In the prior art, no method for directly editing the pattern file exists, and only workers can reproduce the pattern file, so that the problem of low efficiency is caused.
Aiming at the problems in the prior art, the inventor finds that in the process of researching the pattern file editing method, in order to improve the editing efficiency, the pattern file can be directly edited. And after identifying and screening the pattern file, obtaining a plurality of groups of target stitch data, further determining a repeated point group, an inflection point group, a straight line point group and a curve point group, and then reorganizing the curve point group to obtain a target curve point group. Combining the repeated point group, the inflection point group, the straight line point group and the special sewing data to construct stitch reconstruction data; and finally, replacing the stitch data to be replaced in the pattern file with stitch reconstruction data to complete editing, thereby effectively improving editing efficiency. Based on the inventive concept, the pattern file editing scheme is designed.
The main body of execution of the pattern file editing method in the application can be a pattern machine, and also can be a computer, a server and other devices, and the application is not limited to the method, and the following description will take a computer as an example.
The application scenario of the pattern file editing method provided by the application is illustrated below.
In the application scenario, the worker performs format conversion on the pattern file generated by using plate making software and inputs the pattern file into the pattern machine for weaving, but during the weaving process, the problem that the size of the woven pattern is large, namely the problem that the needle pitch is uneven is found, and the pattern file needs to be edited.
The worker inputs the pattern file into a computer and resets the gauge. The computer can acquire the pattern file, and then identify and screen the pattern file to obtain a plurality of groups of target stitch data, wherein each group of target stitch data comprises special sewing data and stitch data to be replaced. And determining a repeated point group, an inflection point group, a straight line point group and a curve point group according to the stitch coordinates of each group of template stitch data.
Then recombining each group of curve point groups to obtain a target curve point group; constructing stitch reconstruction data according to the repeated point group, the inflection point group, the straight line point group, the target curve point group, the special sewing data and the reset stitch length;
And replacing the stitch data to be replaced in the pattern file with stitch reconstruction data to obtain the target pattern file, and finishing editing.
And the computer can send the target pattern file to a pattern machine, and the pattern machine can weave patterns with uniform needle pitch.
It should be noted that the above scenario is only an example of an application scenario provided by the embodiment of the present application, and the embodiment of the present application does not limit the actual forms of various devices included in the scenario, nor limit the interaction modes between the devices, and in a specific application of the scheme, the application may be set according to actual requirements.
The technical scheme of the application is described in detail through specific embodiments. It should be noted that the following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 1a is a schematic flow chart of an embodiment of a method for editing a pattern file, which is provided by the application, wherein after a computer identifies and screens an obtained pattern file, a repeated point group, an inflection point group, a straight line point group and a target curve point group are determined according to obtained target stitch data, stitch reconstruction data is constructed by combining special sewing data, and then the condition that the stitch data to be replaced in the pattern file is replaced to complete editing is explained. The method in this embodiment may be implemented by software, hardware, or a combination of software and hardware. As shown in FIG. 1a, the method for editing the pattern file specifically comprises the following steps:
S101: and identifying and screening the obtained pattern file to obtain a plurality of groups of target stitch data.
When the pattern file is required to be edited, a worker can input the pattern file into a computer, and the computer can acquire the pattern file.
In the step, after the pattern file is obtained by the computer, the obtained pattern file can be identified and screened to obtain a plurality of groups of target stitch data. Each group of target stitch data comprises special sewing data and stitch data to be replaced, and the stitch data to be replaced comprises stitch coordinates corresponding to a plurality of stitch points.
Specifically, pattern files can be identified first to obtain a plurality of groups of stitch data to be screened; namely, the pattern file is segmented, special sewing data corresponding to each segmented pattern file are identified, and each segmented pattern file and the corresponding special sewing data form a group of stitch data to be screened.
And then screening a plurality of groups of stitch data to be screened to obtain a plurality of groups of target stitch data. Because not every group of stitch data to be screened needs to be edited, the stitch data to be screened which needs to be edited is screened out, and the target stitch data can be obtained.
S102: and for each group of target stitch data, determining a shape stitch group according to stitch coordinates of each stitch point in the target stitch data.
In this step, after the computer obtains the target stitch data, the computer processes each set of stitch data in turn. And for each group of target stitch data, determining a shape stitch group according to stitch coordinates of each stitch point in the target stitch data. The shape stitch point group comprises a repetition point group, an inflection point group, a straight line point group and a curve point group.
S103: and for each group of curve point groups, recombining the curve point groups according to the stitch coordinates of the stitch points in the curve point groups to obtain at least one group of target curve point groups.
In this step, after the computer obtains the shape stitch point set, since a new stitch point needs to be generated according to the curve fitting curve of the curve point set in the following step, in order to ensure the correctness of the newly generated stitch point, the curve point set needs to be recombined according to the stitch coordinates of the stitch point in the curve point set, so as to obtain at least one set of target curve point set.
S104: and constructing stitch reconstruction data according to the repeated point group, the inflection point group, the straight line point group, the target curve point group and the special sewing data.
In the step, after the computer obtains the target curve point group, the stitch reconstruction data can be constructed according to the repeated point group, the inflection point group, the straight line point group, the target curve point group and the special sewing data.
Specifically, stitch data of straight-line reconstruction track points is generated according to the straight-line point group and a preset stitch length. Because each straight line point group comprises two stitch points, the two stitch points are used for fitting a straight line, and then a new stitch point is determined on the straight line at each preset stitch distance, and further stitch data can be determined, wherein the stitch data comprises stitch coordinates.
And generating the stitch data of the curve reconstruction track points according to the target curve point group and the preset stitch length. For each target curve point group, a curve is fitted according to the stitch points in the curve, a new stitch point is further determined on the curve at intervals of preset stitch distance, and stitch data comprising stitch coordinates can be further determined.
And generating stitch data of the special reconstruction track points according to the special sewing data. If the sewing type in the special sewing data is a backstitch type, the special sewing data also comprises backstitch positions, backstitch times and backstitch needle numbers, wherein the backstitch positions represent real positions or end positions, and if the backstitch positions represent initial positions, the backstitch needle points are generated according to the backstitch times and the backstitch needle numbers at the initial positions of needle track tracks formed by the repeated point groups, the inflection point groups, the straight line reconstruction track points and the curve reconstruction track points. Namely, the stitch data of a plurality of stitch points of the backstitch at the initial position are copied, the backstitch is copied for a plurality of times, the backstitch stitch points are obtained, and the backstitch stitch points are sequenced to form a reciprocating track. If the backstitch position represents the end position, the process of obtaining the stitch data is similar to that of the backstitch position representing the start position, and the description is omitted here.
If the sewing type in the special sewing type is the overlapped sewing type, the special sewing data also comprises the repeated sewing needle number, the needle track formed by the repeated point group, the inflection point group, the straight line reconstruction track point and the curve reconstruction track point is determined, the needle track data of the needle track points are repeatedly sewn before the needle track is copied, and the needle track data of the last needle track point of the needle track is placed.
The stitch data of the stitch points in the repeated point group, the inflection point group, the straight line point group and the target curve point group are ordered according to the sequence in the pattern file, and the stitch data of the straight line reconstruction track points are placed between the stitch data of two stitch points of the corresponding straight line point group according to the sequence on the straight line; and inserting the stitch data of the curve reconstruction track points into the stitch data of the stitch points of the corresponding curve point group according to the sequence on the curve to obtain the stitch reconstruction data.
It should be noted that, the preset gauge length is a gauge length set by a worker, and may be 0.3 mm, 0.5 mm, 1 mm, etc., and the embodiment of the present application does not limit the preset gauge length, and may be set according to actual situations.
S105: and replacing the stitch data to be replaced in the pattern file with stitch reconstruction data to obtain the target pattern file.
In the step, after the computer obtains the stitch reconstruction data, the stitch data to be replaced in the pattern file is replaced by the stitch reconstruction data, the processing of the group of target stitch data is completed, and after the processing of each group of target stitch data is completed, the editing can be completed, so that the target pattern file is obtained.
For example, fig. 1b is a schematic diagram of an editing flow of a pattern file provided by the present application, as shown in fig. 1b, black dots in fig. 1b represent stitch points, a first track is a track formed by stitch points in the pattern file before editing, the stitch distance is uneven, so that a shape stitch point group is obtained by editing, a second track is a track formed by stitch points in the shape stitch point group, a new stitch point is generated by using the shape stitch point group, a third track can be obtained, and the third track is a track formed by stitch points in the pattern file after editing, and the stitch distance is more uniform.
It should be noted that, the repeated point group, the inflection point group, the straight line point group, the target curve point group and the special sewing data can be stored after corresponding relation is established with the pattern file, the pattern file before editing is needed to be edited again later, the data can be directly obtained, and the stitch reconstruction data can be constructed.
In the prior art, the pattern file before editing only has the corresponding linear point group, and the number of the stitch points in the linear point group corresponding to the pattern file before editing is generally small, if the stitch points are generated according to the linear point group, the stitch points are sequentially connected in a linear manner, and a new stitch point is selected from the linear. The shape stitch point group of the scheme comprises a repeated point group, an inflection point group, a straight line point group and a curve point group, and the generated new stitch point is more accurate. For example, fig. 1c is a schematic diagram of a new stitch point generated according to a straight line point group in the prior art, as shown in fig. 1c, where a black point is a stitch point in the straight line point group, a white point is a newly generated stitch point, and the goal is to generate a circular stitch, but a stitch formed by the newly generated stitch point and the stitch point in the straight line point group is a diamond. Fig. 1d is a schematic diagram of a new stitch generated according to a shape stitch set provided by the application, as shown in fig. 1d, wherein black dots are stitch points in a straight line dot set, white dots are newly generated stitch points, the number of stitch points in the shape stitch set obtained by editing a pattern file is more, and stitches formed by the newly generated stitch points and the stitch points in the straight line dot set are circular, so that the method meets requirements better.
According to the pattern file editing method provided by the embodiment, after a plurality of groups of target stitch data are obtained by identifying and screening the obtained pattern file, a repeated point group, an inflection point group, a straight line point group and a curve point group are determined according to stitch coordinates of stitch points. Then recombining the curve point groups to obtain target curve point groups; combining the repeated point group, the inflection point group, the straight line point group and the special sewing data to construct stitch reconstruction data; and finally, replacing the stitch data to be replaced in the pattern file with stitch reconstruction data to obtain the target pattern file. Compared with the prior art that the pattern file cannot be directly edited and can only be manufactured again, the pattern file is identified and screened, the needle trace data are rebuilt after the shape needle trace point group is determined, the needle trace data in the pattern file are replaced, the pattern file can be edited, workers do not need to manufacture the pattern file again, direct editing of the pattern file is achieved, and editing efficiency is effectively improved.
Fig. 2a is a schematic flow chart of a second embodiment of the pattern file editing method provided by the application, and on the basis of the above embodiment, the embodiment of the application illustrates the situation that a computer identifies a pattern file to obtain data to be screened and stitch data to be screened. As shown in FIG. 2a, the method for editing the pattern file specifically comprises the following steps:
S201: and according to the sequence of the stitch points in the pattern file, sequentially aiming at the stitch points in the pattern file, if the stitch points carry the initial mark, determining the end stitch points carrying the end mark after the stitch points are determined.
In the step, after the computer obtains the pattern file, the stitch data of each stitch point in the pattern file is in sequence, and when the pattern machine weaves, the weaving is also performed according to the sequence of the stitch points in the pattern file. Therefore, the stitch points in the pattern file can be sequentially subjected to the sequence of the stitch points in the pattern file, and if the stitch points carry the initial marks, the end stitch points carrying the end marks after the stitch points are determined.
Because during weaving, multiple sections are required to be woven, each section needs to determine which stitch point starts and which stitch point ends, some stitch points can carry starting marks, some stitch points can carry ending marks, and one stitch point can carry both the starting marks and the ending marks.
Determining an ending stitch point carrying an ending mark after the stitch point is determined, namely determining whether the ending mark is carried from the stitch point, and further sequentially determining whether the following stitch point carries the ending mark until the ending stitch point carrying the ending mark is determined.
S202: and taking the initial stitch data of all the stitch points from the stitch point to the end stitch point as the stitch data to be replaced.
In this step, after the computer obtains the ending stitch point, the initial stitch data of all the stitch points from the ending stitch point to the ending stitch point can be used as the stitch data to be replaced, and the initial stitch data includes stitch coordinates.
S203: and determining special sewing data according to the stitch coordinates of all the stitch points from the stitch point to the end stitch point.
In this step, after the computer obtains the stitch data to be replaced, since the target stitch data further includes special sewing data, the special sewing data can be determined according to the stitch coordinates of all the stitch points from the stitch point to the end stitch point.
Specifically, the first preset discrimination number of stitch points and the first last preset discrimination number of stitch points from the stitch point to the end stitch point are respectively used as a group of discrimination stitch point groups.
If the number of the stitch points with repeated stitch coordinates in the two groups of judging stitch points is larger than the second preset judging number, the first track points and the second track points are overlapped in the track formed by all the stitch points from the stitch point to the end stitch point, and the sewing type in the special sewing data is determined to be the overlapped sewing type. The repeated stitch points are the repeated sewing needle numbers.
If the number of the stitch points with repeated stitch coordinates in the two groups of judging stitch points is smaller than or equal to the second preset judging number, indicating that the sewing type is not the overlapped sewing type, determining whether the reciprocating points exist in the judging stitch point groups according to the stitch coordinates of the stitch points in the judging stitch point groups for each group of judging stitch point groups.
For each stitch point except the first stitch point and the last stitch point in the judging stitch point group, determining whether an included angle formed by the previous stitch point, the stitch point and the later stitch point of the stitch point is 0, and if the included angle is 0, indicating that the point is a round trip point.
If the trace point group is judged to have the round-trip point, the trace point group is judged to be cut according to the round-trip point, and a plurality of round-trip trace point groups are obtained. And further determining the round trip number of the round trip point groups with the same needle trace coordinates in the plurality of round trip point groups.
If the round trip number is larger than the third preset judging number, determining that the sewing type in the special sewing data is the backstitch type. If the round trip points belong to the first preset discrimination number of stitch points from the stitch point to the end stitch point, determining that the backstitch position represents the initial position; if the round trip point belongs to the last preset number of stitch points from the stitch point to the ending stitch point, determining that the backstitch position represents the ending position. The backstitch times are the back and forth numbers, and the backstitch needle numbers are the needle point numbers in the back and forth needle point groups with the same needle point coordinates.
If the two groups of judging stitching points do not have round trip points or the round trip number is smaller than or equal to the third preset judging number, determining that the stitching type in the special stitching data is a non-target special stitching type.
It should be noted that, the first preset number of decisions may be 3, 4, 5, etc., the second preset number of decisions may be 3, 4, 5, etc., the third preset number of decisions may be 2, 3, 4, etc., and the embodiment of the present application does not limit the first preset number of decisions, the second preset number of decisions, the third preset number of decisions, and may be set according to practical situations.
It should be noted that, the non-target special sewing type may be a multiple sewing type, a side off sewing type, a herringbone sewing type, etc., and the embodiment of the present application does not limit the non-target special sewing type, and may be determined according to the actual situation.
Fig. 2b is a schematic diagram of backstitch type stitching provided in the present application, as shown in fig. 2b, in which dots represent stitching points, backstitch exists at a starting position, and it can be seen that there are reciprocating stitching points when the starting position is unfolded, so that backstitch can be formed.
For example, fig. 2c is a schematic diagram of an overlapping stitch of the type provided by the present application, as shown in fig. 2c, in which the dots indicate stitch points, the upper left corner is the initial stitch point, and the stitch points behind the initial point are unfolded to see that there are repeated stitch points, because for reinforcing the pattern, after the woven stitch points are woven from the initial stitch point, after the woven stitch points are woven back to the initial stitch point, a plurality of stitches are woven again for reinforcing, so that the overlapping stitch exists at the initial position.
S204: and taking the stitch data to be replaced and the special sewing data as a group of stitch data to be screened.
In the step, after the computer obtains the stitch data to be replaced and the special sewing data, the stitch data to be replaced and the special sewing data are used as a group of stitch data to be screened. And after the stitch points in the pattern file are sequentially processed, obtaining all groups of stitch data to be screened.
According to the pattern file editing method provided by the embodiment, the data in the pattern file is divided according to the start mark and the end mark carried by the stitch points, each piece of divided data is used as the stitch data to be replaced, the special sewing type is determined according to the stitch coordinates in each piece of data, the stitch data to be screened can be obtained, the accuracy of the stitch data to be screened can be effectively improved, and the backstitch type and the overlap stitch type can be identified.
Fig. 3 is a schematic flow chart of a third embodiment of the pattern file editing method provided by the application, and on the basis of the above embodiment, the embodiment of the application screens the stitch data to be screened to obtain the stitch data to be replaced. As shown in FIG. 3, the method for editing the pattern file specifically comprises the following steps:
S301: judging whether the special sewing type in the stitch data to be screened is a non-target special sewing type or not for each group of stitch data to be screened; if the special sewing type in the stitch data to be screened is the non-target special sewing type, executing step S305; if the special sewing type in the stitch data to be screened is not the non-target special sewing type, step S302 is executed.
In this step, after the computer obtains the plurality of groups of stitch data to be screened, since some groups of data to be screened do not need to be edited, the groups need to be screened out. And judging whether the special sewing type in the stitch data to be screened is a non-target special sewing type or not for each group of stitch data to be screened.
S302: judging whether the stitch coordinates in the stitch data to be screened only contain the stitch coordinates of one or two stitch points; if the stitch coordinates in the stitch data to be screened only contain the stitch coordinates of one or two stitch points, executing step S305; if the stitch coordinates in the stitch data to be screened contain more than two stitch coordinates, step S303 is performed.
In this step, if the specific stitching type in the stitching data to be screened is not the non-target specific stitching type, it is indicated that the stitching data to be screened may be data that does not need editing, and it is further necessary to continuously determine whether the stitching coordinates in the stitching data to be screened only include stitching coordinates of one or two stitching points.
S303: and performing straight line fitting according to stitch coordinates in the stitch data to be screened to obtain a first straight line.
In this step, if the stitch coordinates in the stitch data to be screened include more than two stitch coordinates, it is indicated that the stitch data to be screened may be data that does not need editing, and further needs to be continued. And performing linear fitting according to stitch coordinates in the stitch data to be screened to obtain a first linear.
S304: judging whether each stitch point in the stitch data to be screened belongs to a first straight line or not; if each stitch point in the stitch data to be screened belongs to the first straight line, executing step S305; if the stitch points in the stitch data to be screened do not belong to the first straight line, step S306 is performed.
In this step, after the computer obtains the first straight line, it is determined whether each stitch point in the stitch data to be screened belongs to the first straight line.
The method for judging whether each stitch point in the stitch data to be screened belongs to the first straight line may be that: judging whether the distance between each stitch point in the stitch data to be screened and the first straight line is smaller than a preset screening distance threshold value, and if so, indicating that each stitch point in the stitch data to be screened belongs to the first straight line. And if the distance between the stitch points in the stitch data to be screened and the first straight line is greater than or equal to a preset screening distance threshold value, indicating that the stitch points in the stitch data to be screened do not belong to the first straight line.
It should be noted that, the preset screening distance threshold may be 0.05 mm, 0.07 mm, 0.1 mm, etc., and the embodiment of the present application does not limit the preset screening threshold, and may be set according to actual situations.
S305: and deleting the stitch data to be screened.
In this step, if the stitch coordinates in the stitch data to be screened only include the stitch coordinates of one or two stitch points, or each stitch point in the stitch data to be screened belongs to the first straight line, it is indicated that the stitch data to be screened does not need to be edited, and the stitch data to be screened is deleted.
S306: and retaining the stitch data to be screened.
In this step, if the stitch points in the stitch data to be screened do not belong to the first straight line, the stitch data to be screened is described to be edited, and the stitch data to be screened is reserved.
S307: and taking the remaining stitch data in the plurality of groups of stitch data to be screened as a plurality of groups of target stitch data.
In this step, the computer deletes the stitch data which does not need to be edited from the plurality of groups of stitch data to be screened, and after the stitch data which needs to be edited is reserved, the remaining stitch data in the plurality of groups of stitch data to be screened, that is, the reserved stitch data, can be used as a plurality of groups of target stitch data.
According to the pattern file editing method, multiple groups of stitch data to be screened are screened, the stitch data to be screened which does not need to be edited is deleted, the target stitch data is obtained, and editing efficiency can be effectively improved.
Fig. 4 is a schematic flow chart of a fourth embodiment of the pattern file editing method provided by the present application, and on the basis of the foregoing embodiment, the embodiment of the present application describes a case of determining a shape stitch group according to stitch coordinates of each stitch point in target stitch data. As shown in FIG. 4, the method for editing the pattern file specifically comprises the following steps:
s401: and determining a repeated point according to the stitch coordinates of each stitch point in the target stitch data.
S402: and performing de-duplication treatment on the repeated points, and taking each repeated point after de-duplication as a group of repeated point groups respectively.
Since the stitch points subsequently need to be regenerated from the set of shape stitch points, the shape points therein need to be determined.
In the above step, the repetition point is determined according to the stitch coordinates of each stitch point in the target stitch data. Since the repetition point belongs to the shape point, the repetition point is determined and is reserved for one. And further, carrying out de-duplication treatment on the repeated points, and taking each repeated point after de-duplication as a group of repeated point groups respectively.
S403: and determining the inflection point group according to the stitch coordinates and stitch sequence of each stitch point in the target stitch data.
In this step, the inflection points also belong to the shape points, so that an inflection point group is determined according to the stitch coordinates and stitch sequence of each stitch point in the target stitch data, and the inflection point group includes at least one inflection point.
Specifically, according to the stitch sequence in the target stitch data, for each stitch in the target stitch data in turn, if the stitch belongs to a preset position range, performing straight line fitting according to stitch coordinates of a preset fitting number of stitch points before the stitch, and obtaining a second straight line.
It should be noted that, the preset position range is from the start of the stitch after the preset number of stitch to the end of the stitch before the last preset number of stitch. The preset fitting number can be 3, 4, 5, etc., and the embodiment of the application does not limit the preset fitting number and can be set according to actual conditions.
And then, performing straight line fitting according to stitch coordinates of a preset fitting number of stitch points after stitch points, and obtaining a third straight line. And if the distance between the stitch point and the second straight line is greater than the preset distance threshold value, and/or if the distance between the stitch point and the third straight line is greater than the preset distance threshold value, the stitch point is used as an inflection point in the inflection point group.
If the distance between the stitch point and the second straight line is smaller than or equal to the preset distance threshold value, and the distance between the stitch point and the third straight line is smaller than or equal to the preset distance threshold value, the stitch point is not an inflection point.
It should be noted that, the preset distance threshold may be 0.2 mm, 0.3 mm, 0.4 mm, etc., and the embodiment of the present application does not limit the preset distance threshold, and may be set according to practical situations.
It should be noted that, by sequentially processing each stitch point in the target stitch data, the preset fitting number may form a sliding window, and once a stitch point is processed, the sliding window slides back once to process the next stitch point.
S404: and cutting the stitch points in the target stitch data according to the inflection points in the inflection point groups to obtain a plurality of stitch point groups to be distinguished.
In this step, after determining the inflection point group, the computer needs to determine a straight line point group and a curve point group, which needs to segment the stitch points in the target stitch data according to the inflection points in the inflection point group, so as to obtain a plurality of stitch point groups to be distinguished.
S405: and for each stitch point group to be distinguished, determining a straight line point group or a curve point group according to stitch coordinates of stitch points in the stitch point group to be distinguished.
In this step, after the computer obtains a plurality of stitch groups to be distinguished, for each stitch group to be distinguished, a straight line point group or a curve point group is determined according to stitch coordinates of stitch points in the stitch groups to be distinguished.
Specifically, according to stitch coordinates of stitch points in the stitch point group to be distinguished, straight line fitting is performed to obtain a fourth straight line.
If each stitch point in the stitch point group to be distinguished belongs to a fourth straight line, determining the first stitch point and the last stitch point in the stitch point group to be distinguished as the straight line point group.
The method for judging whether each stitch point in the stitch point group to be distinguished belongs to the fourth straight line may be as follows: judging whether the distance between each stitch point in the stitch point group to be distinguished and the fourth straight line is smaller than a preset distinguishing distance threshold value, and if so, indicating that each stitch point in the stitch point group to be distinguished belongs to the fourth straight line. And if the distance between the stitch points in the stitch point group to be distinguished and the fourth straight line is larger than or equal to a preset distinguishing distance threshold value, indicating that the stitch points in the stitch point group to be distinguished do not belong to the fourth straight line.
It should be noted that, the preset distinguishing distance threshold may be 0.05 mm, 0.07 mm, 0.1 mm, etc., and the embodiment of the present application does not limit the preset distinguishing distance threshold, and may be set according to practical situations.
If the stitch points in the stitch point group to be distinguished do not belong to the fourth straight line, the stitch points in the stitch point group to be distinguished are screened by using a Fabry-Perot algorithm, and the screened stitch points are used as curve point groups.
The stitch points in the stitch point groups to be distinguished are sequentially connected to form a curve, and the screened stitch points can be obtained by using the Fabry-Perot algorithm on the curve.
For processing a curve by using a Douglas-Prak algorithm, firstly connecting the head and tail points of the curve to obtain a datum line, calculating the maximum distance between each stitch point on the curve and the datum line, and if the maximum distance is greater than or equal to a preset algorithm threshold value, reserving the stitch point corresponding to the maximum distance; and if the maximum distance is smaller than the preset algorithm threshold, deleting the stitch points which belong to the two endpoints of the datum line from the stitch points in the stitch point group to be distinguished. If the stitch points are reserved, dividing the curve into two parts by taking the reserved points as the center, and repeating the steps until no stitch points can be deleted, thereby finishing screening.
It should be noted that, the preset algorithm threshold may be 0.3 mm, 0.4 mm, 0.5 mm, etc., and the embodiment of the present application does not limit the preset algorithm threshold, and may be set according to practical situations.
According to the pattern file editing method provided by the embodiment, the repeated point groups are determined by identifying the repeated points, the inflection point groups are determined by the stitch coordinates and stitch sequence, then the stitch points in the target stitch data are segmented according to the inflection points in the inflection point groups, further the straight line point groups and the curve point groups are determined according to the stitch point groups to be distinguished obtained by segmentation, and the stitch point groups of the determined shape are more accurate.
Fig. 5 is a schematic flow chart of a fifth embodiment of the pattern file editing method provided by the present application, and on the basis of the foregoing embodiment, the case that the curve point group is reorganized to obtain the target curve point group is illustrated in the embodiment of the present application. As shown in FIG. 5, the method for editing the pattern file specifically comprises the following steps:
s501: and performing curve fitting according to the stitch coordinates of the stitch points in the curve point group to obtain a first curve.
After the computer obtains the curve point group, as a new stitch point is generated according to the curve fitting curve of the curve point group in the follow-up process, in order to ensure the correctness of the newly generated stitch point, the curve point group is recombined according to the stitch coordinates of the stitch point in the curve point group, so as to obtain at least one group of target curve point group.
In this step, after the computer obtains the curve point groups, for each curve point group, curve fitting may be performed according to stitch coordinates of stitch points in the curve point group, so as to obtain a first curve.
S502: and acquiring all reference stitch points from the first curve point of the curve point group to the last curve point of the curve point group in the target stitch data.
In this step, after the computer obtains the curve point set, it is further required to obtain all the reference stitch points from the first curve point of the curve point set to the last curve point of the curve point set in the target stitch data, where all the reference stitch points include curve points in the curve point set.
It should be noted that, the execution sequence of the step S501 and the step S502 may be that the step S501 is executed first and then the step S502 is executed; step S502 may be executed first, and step S501 may be executed later; step S501 may be performed simultaneously with step S502. The embodiment of the present application does not limit the execution sequence of step S501 and step S502, and may be set according to practical situations.
S503: and cutting all the reference stitch points according to the curve points in the curve point group to obtain at least one group of reference stitch point groups.
In this step, after the computer obtains the reference stitch points, all the reference stitch points are segmented according to the curve points in the curve point group, so as to obtain at least one group of reference stitch point groups.
S504: and for each group of reference stitch point groups, performing curve fitting according to stitch coordinates of stitch points in the reference stitch point groups to obtain a second curve.
In the step, after the computer obtains the reference stitch point groups, curve fitting is performed on each reference stitch point group according to stitch coordinates of stitch points in the reference stitch point groups, so as to obtain a second curve.
S505: the maximum distance of the distances of the stitch points in the reference stitch point group from the first curve is calculated.
In this step, after the computer obtains the second curve, it is necessary to calculate the maximum distance among the distances between the stitch points in the reference stitch point group and the first curve.
S506: a first average distance of stitch points in the reference stitch point set from the first curve is calculated.
In this step, after the computer obtains the second curve, it is necessary to calculate a first average distance between the stitch points in the reference stitch point group and the first curve.
S507: a second average distance between the stitch point in the reference stitch point group and the second curve is calculated.
In this step, after the computer obtains the second curve, it is further necessary to calculate a second average distance between the stitch points in the reference stitch point group and the second curve.
It should be noted that, the execution sequence of the step S505, the step S506, and the step S507 may be that the step S505 is executed first, the step S506 is executed, and the step S507 is executed last; step S507 may be executed first, step S506 may be executed later, and step S505 may be executed finally; step S507 may be executed first, step S505 may be executed later, and step S506 may be executed finally; step S505, step S506, and step S507 may be performed simultaneously. The embodiment of the application does not limit the execution sequence of the step S505, the step S506 and the step S507, and can be set according to practical situations.
S508: and if the maximum distance is greater than a preset recombination distance threshold value and/or the quotient of the first average distance and the second average distance is greater than a preset multiple threshold value, taking the curve points in the reference stitch point group as the segmentation reference points.
In this step, after the computer obtains the maximum distance, the first average distance and the second average distance, it may be determined whether the maximum distance is greater than a preset recombination distance threshold, and whether a quotient of the first average distance divided by the second average distance is greater than a preset multiple threshold, so as to determine whether the stitch points in the reference stitch point group are matched with the first curve.
And if the maximum distance is greater than a preset recombination distance threshold value and/or the quotient of the first average distance and the second average distance is greater than a preset multiple threshold value, indicating that the stitch points in the reference stitch point group are not matched with the first curve, taking the curve points in the reference stitch point group as the segmentation reference points.
It should be noted that, the preset recombination distance threshold may be 0.4 mm, 0.5 mm, 0.6 mm, etc., and the preset multiple threshold may be 3, 4, 5, etc., and the embodiment of the present application does not limit the preset recombination distance threshold and the preset multiple threshold, and may be set according to practical situations.
S509: and cutting the curve point group according to the obtained cutting reference point to obtain a target curve point group.
In the step, after obtaining the segmentation datum points corresponding to each group of datum trace point groups, the computer segments the curve point groups according to the obtained segmentation datum points, and at least one group of target curve point groups can be obtained.
If the curve point set does not have the segmentation reference point, the curve point set is taken as the target curve point set.
According to the pattern file editing method provided by the embodiment, the curve point groups are recombined by judging whether the maximum distance is larger than the preset recombination distance threshold value or not and judging whether the quotient of the first average distance divided by the second average distance is larger than the preset multiple threshold value or not, so that new stitch points are generated according to the recombined target curve point groups more accurately.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
FIG. 6 is a schematic structural diagram of an embodiment of a pattern file editing apparatus provided by the application; as shown in fig. 6, the pattern file editing apparatus 60 includes:
A processing module 61 for:
identifying and screening the obtained pattern files to obtain a plurality of groups of target stitch data; each group of target stitch data comprises special sewing data and stitch data to be replaced, wherein the stitch data to be replaced comprises stitch coordinates corresponding to a plurality of stitch points;
for each group of target stitch data, determining a shape stitch point group according to stitch coordinates of each stitch point in the target stitch data, wherein the shape stitch point group comprises a repetition point group, an inflection point group, a straight line point group and a curve point group;
for each group of curve point groups, reorganizing the curve point groups according to stitch coordinates of stitch points in the curve point groups to obtain at least one group of target curve point groups;
a reconstruction module 62, configured to construct stitch reconstruction data according to the repeated point set, the inflection point set, the straight line point set, the target curve point set, and the special sewing data;
the processing module 61 is further configured to replace the stitch data to be replaced in the pattern file with the stitch reconstruction data, so as to obtain a target pattern file.
Further, the processing module 61 is specifically configured to:
identifying the pattern file to obtain a plurality of groups of stitch data to be screened;
And screening the multiple groups of stitch data to be screened to obtain multiple groups of target stitch data.
Further, the processing module 61 is specifically further configured to:
sequentially aiming at the stitch points in the pattern file according to the sequence of the stitch points in the pattern file, if the stitch points carry a start mark, determining an end stitch point carrying an end mark after the stitch points;
taking initial stitch data of all stitch points from the stitch point to the end stitch point as stitch data to be replaced, wherein the initial stitch data comprises stitch coordinates;
determining special sewing data according to stitch coordinates of all stitch points from the stitch point to the end stitch point;
and taking the stitch data to be replaced and the special sewing data as a group of stitch data to be screened.
Further, the processing module 61 is specifically further configured to:
respectively taking the first preset discrimination number of stitch points from the stitch point to the previous stitch point of the ending stitch point and the first preset discrimination number of stitch points of the reciprocal as a group of discrimination stitch point groups;
if the number of the stitch points with repeated stitch coordinates in the two groups of judging stitch points is larger than the second preset judging number, determining that the sewing type in the special sewing data is an overlapped sewing type;
If the number of the stitch points with repeated stitch coordinates in the two groups of the judging stitch points is smaller than or equal to the second preset judging number, determining whether the reciprocating points exist in the judging stitch point groups according to the stitch coordinates of the stitch points in the judging stitch point groups for each group of the judging stitch point groups;
if the judgment stitch point group has the round-trip point, dividing the judgment stitch point group according to the round-trip point to obtain a plurality of round-trip stitch point groups;
determining the round trip number of the round trip point groups with the same stitch coordinates in the plurality of round trip point groups;
if the round trip number is larger than the third preset judging number, determining that the sewing type in the special sewing data is a backstitch type;
if the two groups of judging stitch points do not have round trip points or the round trip number is smaller than or equal to the third preset judging number, determining that the sewing type in the special sewing data is a non-target special sewing type.
Further, the processing module 61 is specifically further configured to:
for each group of stitch data to be screened, deleting the stitch data to be screened if the special sewing type in the stitch data to be screened is a non-target special sewing type;
If the stitch coordinates in the stitch data to be screened only comprise the stitch coordinates of one or two stitch points, deleting the stitch data to be screened;
performing straight line fitting according to stitch coordinates in the stitch data to be screened to obtain a first straight line;
if each stitch point in the stitch data to be screened belongs to the first straight line, deleting the stitch data to be screened;
and taking the remaining stitch data in the plurality of groups of stitch data to be screened as the plurality of groups of target stitch data.
Further, the processing module 61 is specifically further configured to:
determining a repetition point according to the stitch coordinates of each stitch point in the target stitch data;
performing de-duplication treatment on the repeated points, and taking each repeated point after de-duplication as a group of repeated point groups respectively;
determining an inflection point group according to stitch coordinates and stitch sequences of each stitch point in the target stitch data, wherein the inflection point group comprises at least one inflection point;
dividing the stitch points in the target stitch data according to the inflection points in the inflection point group to obtain a plurality of stitch point groups to be distinguished;
and for each stitch point group to be distinguished, determining a straight line point group or a curve point group according to stitch coordinates of stitch points in the stitch point group to be distinguished.
Further, the processing module 61 is specifically further configured to:
sequentially carrying out straight line fitting on each stitch point in the target stitch data according to the stitch point sequence in the target stitch data, and if the stitch point belongs to a preset position range, carrying out straight line fitting according to stitch coordinates of a preset fitting number of stitch points before the stitch point to obtain a second straight line;
performing straight line fitting according to the stitch coordinates of the preset fitting number of stitch points after the stitch points to obtain a third straight line;
and if the distance between the stitch point and the second straight line is greater than a preset distance threshold value, and/or if the distance between the stitch point and the third straight line is greater than the preset distance threshold value, taking the stitch point as an inflection point in the inflection point group.
Further, the processing module 61 is specifically further configured to:
performing straight line fitting according to stitch coordinates of stitch points in the stitch point group to be distinguished to obtain a fourth straight line;
if each stitch point in the stitch point group to be distinguished belongs to the fourth straight line, determining a first stitch point and a last stitch point in the stitch point group to be distinguished as a straight line point group;
And if the stitch points in the stitch point group to be distinguished do not belong to the fourth straight line, screening the stitch points in the stitch point group to be distinguished by using a Target-Puck algorithm, and taking the stitch points obtained by screening as a curve point group.
Further, the processing module 61 is specifically further configured to:
performing curve fitting according to stitch coordinates of stitch points in the curve point group to obtain a first curve;
acquiring all reference stitch points from the first curve point of the curve point group to the last curve point of the curve point group in the target stitch data, wherein all the reference stitch points comprise curve points in the curve point group;
dividing all the reference stitch points according to the curve points in the curve point group to obtain at least one group of reference stitch point groups;
performing curve fitting on each group of reference stitch point groups according to stitch coordinates of stitch points in the reference stitch point groups to obtain a second curve;
calculating the maximum distance between the stitch points in the reference stitch point group and the distance of the first curve;
calculating a first average distance between the stitch points in the reference stitch point group and the first curve;
Calculating a second average distance between the stitch points in the reference stitch point group and the second curve;
if the maximum distance is greater than a preset recombination distance threshold value, and/or the quotient of the first average distance divided by the second average distance is greater than a preset multiple threshold value, taking the curve points in the reference stitch point group as segmentation reference points;
and cutting the curve point group according to the obtained cutting reference point to obtain a target curve point group.
Further, the reconstruction module 62 is specifically configured to:
generating stitch data of the linear reconstruction track points according to the linear point groups and the preset stitch length;
generating stitch data of curve reconstruction track points according to the target curve point group and a preset stitch length;
generating stitch data of special reconstruction track points according to the special sewing data;
and combining the stitch data of the stitch points in the repeated point group, the stitch data of the stitch points in the inflection point group, the stitch data of the straight-line reconstruction track points, the stitch data of the curve reconstruction track points and the stitch data of the special reconstruction track points to obtain the stitch reconstruction data.
The pattern file editing apparatus provided in this embodiment is configured to execute the technical scheme in any one of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 7 is a schematic structural diagram of an electronic device according to the present application. As shown in fig. 7, the electronic device 70 includes:
a processor 71, a memory 72, and a communication interface 73;
the memory 72 is for storing executable instructions of the processor 71;
wherein the processor 71 is configured to perform the technical solution of any of the method embodiments described above via execution of the executable instructions.
Alternatively, the memory 72 may be separate or integrated with the processor 71.
Optionally, when the memory 72 is a device separate from the processor 71, the electronic device 70 may further include:
bus 74, memory 72 and communication interface 73 are coupled to processor 71 via bus 74 and communicate with each other, and communication interface 73 is used to communicate with other devices.
Alternatively, the communication interface 73 may be implemented by a transceiver, in particular. The communication interface is used to enable communication between the database access apparatus and other devices (e.g., clients, read-write libraries, and read-only libraries). The memory may comprise random access memory (random access memory, RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Bus 74 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The processor may be a general-purpose processor, including a Central Processing Unit (CPU), a network processor (network processor, NP), etc.; but may also be 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, a discrete hardware component.
The electronic device is configured to execute the technical scheme in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
The embodiment of the application also provides a readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the technical solution provided by any of the foregoing embodiments of the method.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program is used for realizing the technical scheme provided by any one of the method embodiments when being executed by a processor.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features can be replaced equivalently; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A pattern file editing method, comprising:
identifying and screening the obtained pattern files to obtain a plurality of groups of target stitch data; each group of target stitch data comprises special sewing data and stitch data to be replaced, wherein the stitch data to be replaced comprises stitch coordinates corresponding to a plurality of stitch points;
For each group of target stitch data, determining a shape stitch point group according to stitch coordinates of each stitch point in the target stitch data, wherein the shape stitch point group comprises a repetition point group, an inflection point group, a straight line point group and a curve point group;
for each group of curve point groups, reorganizing the curve point groups according to stitch coordinates of stitch points in the curve point groups to obtain at least one group of target curve point groups;
constructing stitch reconstruction data according to the repeated point group, the inflection point group, the straight line point group, the target curve point group and the special sewing data;
and replacing the stitch data to be replaced in the pattern file with the stitch reconstruction data to obtain the target pattern file.
2. The method according to claim 1, wherein the identifying and screening the obtained pattern file to obtain multiple sets of target stitch data includes:
identifying the pattern file to obtain a plurality of groups of stitch data to be screened;
and screening the multiple groups of stitch data to be screened to obtain multiple groups of target stitch data.
3. The method according to claim 2, wherein the identifying the pattern file to obtain the data to be screened includes:
Sequentially aiming at the stitch points in the pattern file according to the sequence of the stitch points in the pattern file, if the stitch points carry a start mark, determining an end stitch point carrying an end mark after the stitch points;
taking initial stitch data of all stitch points from the stitch point to the end stitch point as stitch data to be replaced, wherein the initial stitch data comprises stitch coordinates;
determining special sewing data according to stitch coordinates of all stitch points from the stitch point to the end stitch point;
and taking the stitch data to be replaced and the special sewing data as a group of stitch data to be screened.
4. A method according to claim 3, wherein said determining special sewing data based on stitch coordinates of all of said stitch points to said end stitch point comprises:
respectively taking the first preset discrimination number of stitch points from the stitch point to the previous stitch point of the ending stitch point and the first preset discrimination number of stitch points of the reciprocal as a group of discrimination stitch point groups;
if the number of the stitch points with repeated stitch coordinates in the two groups of judging stitch points is larger than the second preset judging number, determining that the sewing type in the special sewing data is an overlapped sewing type;
If the number of the stitch points with repeated stitch coordinates in the two groups of the judging stitch points is smaller than or equal to the second preset judging number, determining whether the reciprocating points exist in the judging stitch point groups according to the stitch coordinates of the stitch points in the judging stitch point groups for each group of the judging stitch point groups;
if the judgment stitch point group has the round-trip point, dividing the judgment stitch point group according to the round-trip point to obtain a plurality of round-trip stitch point groups;
determining the round trip number of the round trip point groups with the same stitch coordinates in the plurality of round trip point groups;
if the round trip number is larger than the third preset judging number, determining that the sewing type in the special sewing data is a backstitch type;
if the two groups of judging stitch points do not have round trip points or the round trip number is smaller than or equal to the third preset judging number, determining that the sewing type in the special sewing data is a non-target special sewing type.
5. The method of claim 4, wherein the special sewing data includes a special sewing type, and the filtering the plurality of sets of stitch data to be filtered to obtain the plurality of sets of target stitch data includes:
For each group of stitch data to be screened, deleting the stitch data to be screened if the special sewing type in the stitch data to be screened is a non-target special sewing type;
if the stitch coordinates in the stitch data to be screened only comprise the stitch coordinates of one or two stitch points, deleting the stitch data to be screened;
performing straight line fitting according to stitch coordinates in the stitch data to be screened to obtain a first straight line;
if each stitch point in the stitch data to be screened belongs to the first straight line, deleting the stitch data to be screened;
and taking the remaining stitch data in the plurality of groups of stitch data to be screened as the plurality of groups of target stitch data.
6. The method of claim 1, wherein said determining a set of shape stitches based on stitch coordinates of each stitch in said target stitch data comprises:
determining a repetition point according to the stitch coordinates of each stitch point in the target stitch data;
performing de-duplication treatment on the repeated points, and taking each repeated point after de-duplication as a group of repeated point groups respectively;
determining an inflection point group according to stitch coordinates and stitch sequences of each stitch point in the target stitch data, wherein the inflection point group comprises at least one inflection point;
Dividing the stitch points in the target stitch data according to the inflection points in the inflection point group to obtain a plurality of stitch point groups to be distinguished;
and for each stitch point group to be distinguished, determining a straight line point group or a curve point group according to stitch coordinates of stitch points in the stitch point group to be distinguished.
7. The method of claim 6, wherein determining the inflection point group based on the stitch coordinates and stitch order for each stitch in the target stitch data comprises:
sequentially carrying out straight line fitting on each stitch point in the target stitch data according to the stitch point sequence in the target stitch data, and if the stitch point belongs to a preset position range, carrying out straight line fitting according to stitch coordinates of a preset fitting number of stitch points before the stitch point to obtain a second straight line;
performing straight line fitting according to the stitch coordinates of the preset fitting number of stitch points after the stitch points to obtain a third straight line;
and if the distance between the stitch point and the second straight line is greater than a preset distance threshold value, and/or if the distance between the stitch point and the third straight line is greater than the preset distance threshold value, taking the stitch point as an inflection point in the inflection point group.
8. The method according to claim 6, wherein determining a set of straight-line points or a set of curved-line points according to stitch coordinates of stitch points in the set of stitch points to be distinguished comprises:
performing straight line fitting according to stitch coordinates of stitch points in the stitch point group to be distinguished to obtain a fourth straight line;
if each stitch point in the stitch point group to be distinguished belongs to the fourth straight line, determining a first stitch point and a last stitch point in the stitch point group to be distinguished as a straight line point group;
and if the stitch points in the stitch point group to be distinguished do not belong to the fourth straight line, screening the stitch points in the stitch point group to be distinguished by using a Target-Puck algorithm, and taking the stitch points obtained by screening as a curve point group.
9. The method of claim 1, wherein reorganizing the set of curve points according to stitch coordinates of stitch points in the set of curve points to obtain at least one set of target set of curve points comprises:
performing curve fitting according to stitch coordinates of stitch points in the curve point group to obtain a first curve;
acquiring all reference stitch points from the first curve point of the curve point group to the last curve point of the curve point group in the target stitch data, wherein all the reference stitch points comprise curve points in the curve point group;
Dividing all the reference stitch points according to the curve points in the curve point group to obtain at least one group of reference stitch point groups;
performing curve fitting on each group of reference stitch point groups according to stitch coordinates of stitch points in the reference stitch point groups to obtain a second curve;
calculating the maximum distance between the stitch points in the reference stitch point group and the distance of the first curve;
calculating a first average distance between the stitch points in the reference stitch point group and the first curve;
calculating a second average distance between the stitch points in the reference stitch point group and the second curve;
if the maximum distance is greater than a preset recombination distance threshold value, and/or the quotient of the first average distance divided by the second average distance is greater than a preset multiple threshold value, taking the curve points in the reference stitch point group as segmentation reference points;
and cutting the curve point group according to the obtained cutting reference point to obtain a target curve point group.
10. The method of claim 1, wherein said constructing stitch reconstruction data from said set of repeat points, said set of inflection points, said set of straight line points, said set of target curve points, said special stitching data comprises:
Generating stitch data of the linear reconstruction track points according to the linear point groups and the preset stitch length;
generating stitch data of curve reconstruction track points according to the target curve point group and a preset stitch length;
generating stitch data of special reconstruction track points according to the special sewing data;
and combining the stitch data of the stitch points in the repeated point group, the stitch data of the stitch points in the inflection point group, the stitch data of the straight-line reconstruction track points, the stitch data of the curve reconstruction track points and the stitch data of the special reconstruction track points to obtain the stitch reconstruction data.
CN202311022156.5A 2023-08-14 2023-08-14 Pattern file editing method Pending CN117171826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311022156.5A CN117171826A (en) 2023-08-14 2023-08-14 Pattern file editing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311022156.5A CN117171826A (en) 2023-08-14 2023-08-14 Pattern file editing method

Publications (1)

Publication Number Publication Date
CN117171826A true CN117171826A (en) 2023-12-05

Family

ID=88946003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311022156.5A Pending CN117171826A (en) 2023-08-14 2023-08-14 Pattern file editing method

Country Status (1)

Country Link
CN (1) CN117171826A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118581644A (en) * 2024-05-31 2024-09-03 深圳市雅诺科技股份有限公司 A sewing pattern generation method, generation system and processing method for bra back buckle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118581644A (en) * 2024-05-31 2024-09-03 深圳市雅诺科技股份有限公司 A sewing pattern generation method, generation system and processing method for bra back buckle

Similar Documents

Publication Publication Date Title
CN104793560A (en) Method and system for generating a trajectory
CN117171826A (en) Pattern file editing method
CN107194885A (en) A kind of CAD diagram Intelligent Portable Correcting System and method
CN119203951A (en) Drawing list generation method, device, equipment, storage medium and program product
CN104915053A (en) Position determining method and device for interface controls
CN111125466A (en) Instrument panel layout method and device
CN114444185B (en) In-situ marking recognition method, device and electronic equipment
CN115239884A (en) A method and device for reconstructing a three-dimensional model in a middle assembly
JP3564371B2 (en) Figure editing apparatus and method
CN106094732B (en) A kind of teeth processing route generating method of What You See Is What You Get
CN106757816B (en) Method for adding shape information
CN114898119B (en) Building outline drawing method, device, equipment and medium
CN114373014B (en) Laser welding point generation method, system and storage medium
CN117611831A (en) Heuristic rule-based profile end face groove feature recognition method and system
CN117351059A (en) A method and terminal for managing long and narrow vectors inside a single image spot in the field of natural resources
CN115488535A (en) Welding gun track generation method and device for medium-assembly welding seam
CN111397560B (en) Method and device for acquiring theoretical value of square groove, computer equipment and storage medium
CN117972862B (en) Roof slope finding layer model generation method, device, equipment and storage medium
CN118885632B (en) A method for updating urban physical areas based on ArcGIS platform
CN115302092B (en) A laser marking method for automatically generating printing paths
KR101340983B1 (en) Method for generating offset tool path
CN112329280B (en) Solder point creation method, device, electronic device and storage medium
CN115512101B (en) An image processing method, apparatus, electronic device, and storage medium
CN120707524B (en) A method and system for detecting overlapping patterns in fabric layout
CN118552558B (en) High-similarity reservoir clipping method, device and equipment for reservoir site selection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination