Pattern sewing track generation method and device, electronic equipment and storage medium
By receiving pattern type identifiers and structured parameters, identifying and converting key point geometry types, and generating a needle motion trajectory point sequence, the problem of distinguishing between straight lines and curves in existing technologies is solved. This achieves high-precision, low-redundancy pattern sewing trajectory generation, improving the automated production efficiency and accuracy of the equipment.
Patent Information
- Application Number
- CN202610287771.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-12
Smart Images

Figure CN122189955A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent sewing technology, and in particular to a method, apparatus, electronic device, and storage medium for generating patterned sewing tracks. Background Technology
[0002] With the increasing demand for flexible and customized production in industries such as apparel and bags, automated sewing equipment needs to be able to quickly generate diverse sewing patterns to support efficient and high-precision automated sewing operations.
[0003] Currently, for different pattern types (e.g., patch pockets, labels, decorative stitches, etc.), it is necessary to first complete the graphic design in specialized software, and then convert and discretize the outline of the graphic into a data file consisting of dense, continuous needle point coordinates. During sewing, the sewing equipment directly reads and sequentially executes each coordinate point in this file, thereby driving the needle to reproduce the preset pattern. This method expresses all pattern outlines as a dense sequence of coordinate points, failing to distinguish the geometrical differences between straight and curved segments in the path. This results in either insufficient point density causing outline distortion when processing patterns containing arcs or smooth curves, or the generation of a large number of redundant trajectory points to ensure accuracy, making it difficult to balance sewing precision and execution efficiency. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and storage medium for generating pattern sewing trajectories, in order to solve the problem in the prior art that the use of dense point sequences to express pattern outlines makes it impossible to distinguish the geometric essence of straight lines and curves, resulting in a difficulty in balancing accuracy and efficiency. This invention achieves high-fidelity, low-redundancy adaptive trajectory generation.
[0005] According to one aspect of the present invention, a method for generating a pattern sewing trajectory is provided, the method comprising: Receive the pattern type identifier of the target pattern input by the user and a set of structured parameters that match the pattern type identifier; A geometric model matching the pattern type identifier is determined, and based on the geometric model and the structured parameter set, the coordinates of the sewing path key point sequence of the target pattern in the local coordinate system are determined; wherein the local coordinate system has the center of the top of the pattern as the origin; The coordinates of each key point in the local coordinate system are transformed to the machine coordinate system with the center of the equipment fixture as the reference. The transformed key point sequence is analyzed for trajectory and the geometric type of the line connecting adjacent key points is identified. Determine the target interpolation method corresponding to the target geometry type. Based on the target interpolation method and the set stitch distance, generate a needle movement trajectory point sequence corresponding to the target geometry type. Then, splice the needle movement trajectory points of each segment in the order of the key point sequence to obtain the needle movement trajectory point sequence of the target pattern.
[0006] According to another aspect of the present invention, an apparatus for generating patterned sewing tracks is provided, the apparatus comprising: The receiving module is used to receive the pattern type identifier of the target pattern input by the user and the structured parameter set that matches the pattern type identifier; The first determining module is used to determine the geometric model that matches the pattern type identifier, and based on the geometric model and the structured parameter set, determine the coordinates of the sewing path key point sequence of the target pattern in the local coordinate system; wherein the local coordinate system takes the center of the top of the pattern as the origin; The geometry type recognition module is used to transform the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference, perform trajectory analysis on the transformed key point sequence, and identify the geometry type of the line connecting adjacent key points. The second determining module is used to determine the target interpolation method corresponding to the target geometry type, generate a needle movement trajectory point sequence corresponding to the target geometry type based on the target interpolation method and the set needle spacing, and splice the needle movement trajectory points of each segment in the order of the key point sequence to obtain the needle movement trajectory point sequence of the target pattern.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the method for generating pattern sewing tracks according to any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the method for generating pattern sewing trajectories according to any embodiment of the present invention.
[0009] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method for generating pattern sewing tracks as described in any embodiment of the present invention.
[0010] The technical solution of this invention involves receiving a pattern type identifier of a target pattern input by a user and a structured parameter set matching the pattern type identifier; determining a geometric model matching the pattern type identifier; and, based on the geometric model and the structured parameter set, determining the coordinates of the sewing path key point sequence of the target pattern in a local coordinate system; wherein the local coordinate system has the top center of the pattern as its origin; transforming the coordinates of each key point in the local coordinate system to a machine coordinate system with the center of the equipment fixture as its reference; and performing trajectory analysis on the transformed key point sequence. The method identifies the geometric type of the line connecting adjacent key points; determines the target interpolation method corresponding to the target geometric type; and generates a needle motion trajectory point sequence corresponding to the target geometric type based on the target interpolation method and the set needle spacing. The needle motion trajectory points of each segment are then spliced together in the order of the key point sequence to obtain the needle motion trajectory point sequence of the target pattern. This solves the problem in the prior art where the uniform use of dense point sequences to express the pattern outline makes it impossible to distinguish the geometric essence of straight lines and curves, resulting in a difficulty in balancing accuracy and efficiency. It achieves high-fidelity, low-redundancy adaptive trajectory generation.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart of a method for generating a pattern sewing trajectory according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a method for generating a pattern sewing trajectory according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the key point sequence of a patchwork pattern according to Embodiment 2 of the present invention; Figure 4 This is a parametric dimensioning diagram of a patch bag pattern provided in Embodiment 2 of the present invention; Figure 5 This is a schematic diagram of the structure of a pattern sewing trajectory generation device according to Embodiment 3 of the present invention; Figure 6This is a schematic diagram of the structure of an electronic device that implements the method for generating pattern sewing trajectories according to embodiments of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Example 1 Figure 1 This is a flowchart of a method for generating a pattern sewing trajectory according to Embodiment 1 of the present invention. This embodiment is applicable to the case of automatically generating pattern sewing trajectories. This method can be executed by a pattern sewing trajectory generating device, which can be implemented in hardware and / or software, and can be configured in electronic devices such as computers, servers, or tablet computers. Figure 1 As shown, the method includes: Step 110: Receive the pattern type identifier of the target pattern and the structured parameter set that matches the pattern type identifier from the user input.
[0017] The pattern type identifier can be a string or code that uniquely identifies a predefined sewing pattern, such as ROUND_POCKET_V1 or RECTANGLE_TAB_2025. The structured parameter set is a collection of named parameters that strictly match the pattern type identifier, organized in key-value pairs (e.g., { "DK": 80, "ZK": 10, "SX":45}). Each parameter name (e.g., DK) has explicit geometric semantics (e.g., pocket opening width), and its value range is constrained by the pattern type.
[0018] In this embodiment, the structured parameter set includes basic parameters for defining the overall outline of the pattern, and local geometric feature parameters corresponding to the pattern type identifier; wherein, the local geometric feature parameters include specific geometric element parameters that match the pattern type identifier.
[0019] In this embodiment, the structured parameter set adopts a hierarchical design, including basic parameters for defining the overall outline of the pattern and local geometric feature parameters corresponding to the pattern type identifier. The basic parameters reflect the main dimensions of the pattern, such as the width of the bag opening and the height of the bag, and are suitable for general scale control of the same type of pattern. The local geometric feature parameters are dynamically determined based on the geometric characteristics of the selected pattern type and are used to accurately describe specific detailed structures, such as corner radius, folding amount, chamfer angle, or spline control points. When a user selects a pattern type identifier, the system only loads the local parameter items matching that type, ensuring that the input parameters are strictly consistent with the pattern geometric model in semantics and structure, thereby supporting accurate and efficient parametric modeling of diverse pattern outlines.
[0020] Optionally, in this embodiment, the pattern type identifier of the target pattern and the structured parameter set matching the pattern type identifier are provided by the user through a human-computer interaction interface. The pattern type identifier is used to specify the pattern category of the sewing trajectory to be generated, such as predefined types like rounded corner patch pockets, pointed corner trademarks, or curved decorative lines. The structured parameter set includes one or more parameters with clear geometric semantics, and each parameter is organized in the form of named fields. The field names and number are predefined by the pattern template corresponding to the pattern type identifier.
[0021] For example, when the pattern type identifier indicates a rounded corner patch pocket, the structured parameter set may include the fields DK (pocket opening width), ZK (fold-up amount), and R (corner radius); if the pattern type identifier is a rectangular pocket, the structured parameter set does not include the R field, but may include the DD (pocket bottom width). It is understandable that there is a one-to-one correspondence between the content structure of the structured parameter set and the pattern type identifier, ensuring that the input parameters can drive the subsequent instantiation of the geometric model completely and unambiguously.
[0022] The received pattern type identifier and the structured parameter set together constitute the initial input data for the trajectory generation module, used to call the corresponding geometric model and calculate the coordinates of key points. In one implementation, the system can perform basic validity checks on the values of each parameter in the structured parameter set, such as whether the values are within a reasonable range and whether they meet geometric constraints. However, this check is not mandatory; its purpose is to improve system robustness. As long as the pattern type identifier and the structured parameter set logically match, it can be accepted as valid input and passed to the next processing stage.
[0023] Step 120: Determine the geometric model that matches the pattern type identifier, and based on the geometric model and the structured parameter set, determine the coordinates of the key point sequence of the sewing path of the target pattern in the local coordinate system.
[0024] The local coordinate system has its origin at the center of the top of the pattern.
[0025] In this embodiment, the geometric model can refer to a parameterized mathematical description of a certain type of pattern sewing path. It typically consists of a set of key points arranged in the sewing order. The coordinates of each key point are calculated using parameters from a structured parameter set as variables, through preset algebraic expressions or geometric rules (e.g., defining an arc with a center and radius). In this embodiment, the model is a static template and does not contain specific numerical values.
[0026] The local coordinate system is a coordinate system established for ease of modeling and bound to the geometric features of the pattern itself. In this invention, its origin is fixed at the top center of the pattern, that is, the highest point of the pattern in the vertical direction and the horizontally centered position (e.g., the center of the opening of a patch pocket). The X-axis is generally horizontal to the right, and the Y-axis is vertical downward (in accordance with sewing equipment conventions).
[0027] Understandably, each sewn pattern type corresponds to a predefined geometric model. This geometric model is stored in the system as data, containing a set of key points arranged in the actual sewing order, and the coordinate calculation rules for each key point in a local reference frame. These calculation rules are expressed using algebraic expressions, where the variable names are identical to the parameter names contained in the structured parameter set. For example, if the structured parameter set for a certain pattern type contains parameters DK and R, then the coordinate formulas for the key points in its geometric model might be X = DK / 2 - R, Y = R.
[0028] In this embodiment, upon receiving a user-specified pattern type identifier, a geometric model uniquely corresponding to that identifier can be retrieved from the geometric model library. Further, a local coordinate system is established with the top center of the pattern as the origin, where the X-axis is horizontal and the Y-axis is vertical (usually downwards is positive). In this coordinate system, the actual values of each parameter in the structured parameter set are substituted into the coordinate expression corresponding to each key point in the geometric model, and the specific coordinate value of each key point is obtained through mathematical operations. After calculation, all key points are combined into an ordered coordinate sequence according to their sewing order defined in the geometric model. This sequence is the complete representation of the key point sequence of the sewing path of the target pattern in the local coordinate system.
[0029] For example, when the pattern type is identified as a rounded corner patch pocket, the corresponding geometric model defines 14 key points. The first key point P1 has an X-coordinate expression of -DK / 2 and a Y-coordinate expression of 0. The fifth key point P5 is located at the end of the upper right rounded corner, and its coordinates are determined by the arc parametric equation. If the user-input structured parameter set is {"DK":80,"ZK":10,"R":5}, then substituting it into the set yields the local coordinates of P1 as (-40,0) and the local coordinates of P5 as (35,5). All 14 key points are calculated in this way, ultimately forming a complete sequence of local coordinates.
[0030] Step 130: Transform the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference, perform trajectory analysis on the transformed key point sequence, and identify the geometric type of the connection between adjacent key points.
[0031] Among them, the machine coordinate system, which is the physical coordinate system of the sewing equipment (e.g., computerized pattern sewing machine), can take the center of the equipment fixture (i.e. the fabric fixing reference point) as the origin, and align the X and Y axes with the equipment motion mechanism.
[0032] Coordinate transformation involves translating a point in the local coordinate system to the machine coordinate system. The transformation relationship is determined by the preset position of the top center of the pattern in the machine coordinate system.
[0033] In this embodiment, the geometric type of the line connecting adjacent key points can be a straight line segment or a circular arc segment, etc., and there is no limitation on it in this embodiment.
[0034] Optionally, in this embodiment, after determining the coordinates of the key point sequence of the sewing path of the target pattern in the local coordinate system, these local coordinates can be further transformed to the machine coordinate system used by the sewing equipment. This machine coordinate system uses the installation center of the equipment fixture as its origin, and its X and Y axes are aligned with the horizontal movement mechanism of the needle. The offset used for the transformation is determined by the preset installation position of the pattern on the fixture, specifically the fixed coordinate value (X0, Y0) of the top center of the pattern in the machine coordinate system. For example, if a certain equipment specifies that the top center of all patterns should be located at (-185mm, 2mm) in the machine coordinate system, then the corresponding coordinates of any key point (x, y) in the local coordinate system in the machine coordinate system are obtained through translation calculation: x_machine = x + X0, y_machine = y + Y0. After this transformation, all key points are located in the actual working space of the equipment, ensuring the accurate physical position of subsequent sewing actions on the fabric.
[0035] Furthermore, trajectory analysis is performed on the transformed keypoint sequence to identify the geometric type of the lines connecting adjacent keypoints. Specifically, each pair of adjacent keypoints can be extracted sequentially according to the sewing order, and the presence of geometric feature parameters associated with that pair in the structured parameter set can be checked. If arc feature parameters (including center coordinates, radius, and rotation direction) exist, the line is identified as an arc segment; if spline feature parameters (including control point coordinate set) exist, it is identified as a spline curve segment; if no geometric feature parameters associated with the pair are stored, the line is assumed to be a straight line segment.
[0036] For example, the local key point sequence of a rounded corner patch pattern is P1(-40,0), P2(-40,10), P3(-35,10), and P4(-35,5). The segment from P3 to P4 is associated with arc feature parameters in the structured parameter set: center at (-35,10), radius 5, and clockwise rotation. The machine coordinates of the top center of the pattern are preset to (-185,2). After coordinate transformation, the machine coordinates of P3 are (-220,12) and P4 are (-220,7). When parsing the P3–P4 segment, the system finds the corresponding arc parameter and therefore identifies this segment as an arc segment; while the P1–P2 segment has no additional parameters and is identified as a straight line segment.
[0037] Step 140: Determine the target interpolation method corresponding to the target geometry type. Based on the target interpolation method and the set stitch distance, generate a sequence of needle motion trajectory points corresponding to the target geometry type. Then, splice the needle motion trajectory points of each segment in the order of the key point sequence to obtain the needle motion trajectory point sequence of the target pattern.
[0038] The target geometry type is the path segment type identified in the above steps, such as a straight line segment, an arc segment, or a spline curve segment. The target interpolation method is a trajectory point generation algorithm that corresponds one-to-one with the geometry type; for example, straight line segment → straight line interpolation: divide the path between two points into equal segments with a fixed stitch distance; arc segment → arc interpolation: generate points along the arc path with an arc length equal to the stitch distance; spline curve segment → spline interpolation: sample according to the stitch distance using a parametric spline function (such as a B-spline) based on control points.
[0039] The stitch length setting can be the suture length between adjacent needle landing points preset by the user or the system (e.g., 2.0mm), and is a control parameter for the density of trajectory points. Stitching connects the trajectory points generated from each geometric segment end-to-end according to the original key point sequence, forming a continuous, seamless, and complete trajectory sequence.
[0040] Optionally, in this embodiment, after identifying the geometric type of the connection between adjacent key points, a corresponding interpolation strategy is used to generate dense needle motion trajectory points for each geometric type. When a segment is identified as a straight line, the system calculates the total length of the straight line and determines the number of intermediate points to be inserted based on the user-defined needle spacing. Then, all trajectory points are generated at equal intervals along the line from the start point to the end point. When a segment is identified as an arc, the system uses the center coordinates, radius, start angle, end angle, and rotation direction of the arc to segment the entire arc path according to the arc length, ensuring that the arc length of each segment is equal to the set needle spacing. The system also calculates the precise coordinates of each segment point in the machine coordinate system based on trigonometric functions. When a segment is identified as a spline curve, the system constructs a parametric spline curve model based on the coordinates of the control points associated with the segment. Trajectory points are generated along the curve path using a numerical sampling method with the set needle spacing as the step size, ensuring that the points are evenly distributed and conform to the curve shape.
[0041] After all the trajectory points for the geometric segments have been generated, they can be connected end-to-end according to the sewing sequence specified in the original keypoint sequence. During the splicing process, the last trajectory point of the previous segment is consistent with the first trajectory point of the next segment, thus forming a continuous, non-repeating, and gapless complete sequence of needle movement trajectory points. This sequence fully expresses the spatial movement path of the needle throughout the entire pattern sewing process and can be directly output to the sewing equipment controller to drive the actuator to complete the automatic sewing operation.
[0042] For example, the upper right corner of a patch pocket pattern contains a quarter-circle arc with its center at (-220, 12) in the machine coordinate system and a radius of 5mm, rotating clockwise from 90° to 0°. The stitch length is set to 2mm. The system calculates the total length of the arc to be approximately 7.85mm, requiring the generation of 4 trajectory points (including the starting point). Using an angle step Δθ = stitch length / radius ≈ 23°, the coordinates of each point are calculated sequentially: (-220, 17), (-218.1, 16.5), (-216.5, 15.2), and (-215, 12). The vertical line segment to its left (from (-225, 2) to (-225, 12)) is divided into 5 equal segments (2mm stitch length), generating 6 trajectory points. Finally, the trajectory points of the straight line segment and the arc segment are sequentially joined to form a continuous path.
[0043] The technical solution of this embodiment receives the pattern type identifier of the target pattern and a structured parameter set matching the pattern type identifier from the user input; determines the geometric model matching the pattern type identifier, and determines the coordinates of the key point sequence of the sewing path of the target pattern in the local coordinate system based on the geometric model and the structured parameter set; wherein the local coordinate system takes the center of the top of the pattern as the origin; transforms the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference; performs trajectory analysis on the transformed key point sequence and identifies the geometric type of the line connecting adjacent key points; determines the target interpolation method corresponding to the target geometric type; generates a needle motion trajectory point sequence corresponding to the target geometric type based on the target interpolation method and the set stitch distance; and splices the needle motion trajectory points of each segment in the order of the key point sequence to obtain the needle motion trajectory point sequence of the target pattern. This solves the problem in the prior art that it is difficult to balance accuracy and efficiency because a dense point sequence is uniformly used to express the pattern outline and the geometric essence of straight lines and curves cannot be distinguished. It achieves high-fidelity, low-redundancy adaptive trajectory generation.
[0044] Example 2 Figure 2 This is a flowchart of a method for generating a pattern sewing trajectory according to Embodiment 2 of the present invention. This embodiment is a further refinement of the above technical solution, and the technical solution in this embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method includes: Step 210: Receive the pattern type identifier of the target pattern and the structured parameter set that matches the pattern type identifier from the user input.
[0045] Step 220: Determine the geometric model that matches the pattern type identifier, and based on the geometric model and the structured parameter set, determine the coordinates of the key point sequence of the sewing path of the target pattern in the local coordinate system.
[0046] Optionally, in this embodiment, determining the geometric model that matches the pattern type identifier, and determining the coordinates of the key point sequence of the sewing path of the target pattern in the local coordinate system based on the geometric model and the structured parameter set, may include: determining the geometric model corresponding to the pattern type identifier from the preset mapping relationship between the pattern type identifier and the geometric model; wherein the geometric model contains multiple key points arranged in the sewing order, and the coordinate calculation rules for each key point; establishing a local coordinate system with the top center of the target pattern as the origin, and substituting the parameter values in the structured parameter set into the coordinate calculation rules corresponding to each key point to obtain the coordinates of each key point in the local coordinate system.
[0047] The mapping relationship between pattern type identifiers and geometric models can be established using a pre-stored one-to-one correspondence table (such as a database or configuration file) within the system, which associates each pattern name (such as "ROUND_POCKET_V2") with its own dedicated geometric model data structure.
[0048] Optionally, in this embodiment, after obtaining the pattern type identifier and structured parameter set input by the user, a geometric model matching the pattern type identifier can be retrieved from a pre-established correspondence table between pattern type identifiers and geometric models. This geometric model contains a list of key points arranged in the actual sewing path order. Each key point in the list is associated with a set of coordinate calculation rules, which are expressed in the form of algebraic expressions. The variable names used in the expressions are consistent with the parameter names defined in the structured parameter set.
[0049] Furthermore, a local coordinate system can be established with the top center of the target pattern as the origin. This origin is located at the highest point of the pattern in the vertical direction and centered in the horizontal direction. The X-axis of the local coordinate system points to the right, and the Y-axis points downwards. Next, the specific values of each parameter in the structured parameter set are substituted into the coordinate calculation rules corresponding to each key point in the geometric model. By performing mathematical operations, the X and Y coordinate values of each key point in the local coordinate system are obtained. After the coordinate calculation of all key points is completed, they are combined into an ordered coordinate sequence according to the sewing order defined in the geometric model. This sequence fully expresses the sewing path outline of the target pattern in its own reference frame.
[0050] For example, when a user selects the pattern type identifier as Rounded Corner Patch_V1, the system calls its corresponding geometric model, which contains 14 key points. The X-coordinate of the first key point P1 is calculated as -DK / 2, and the Y-coordinate as 0. The X-coordinate of the fifth key point P5 is calculated as DK / 2 – R×sin(π / 4), and the Y-coordinate as ZK - R + R×cos(π / 4). If the user-input structured parameter set is {DK: 80, ZK: 10, R: 5}, then substituting these values yields the local coordinates of P1 as (-40, 0) and the local coordinates of P5 as approximately (36.5, 6.5). The remaining key points follow the same pattern, ultimately forming a complete sequence of 14 local coordinates.
[0051] The solution in this embodiment calls the parametric geometric model corresponding to the pattern type identifier from the preset mapping relationship, and dynamically calculates the coordinates of key points based on the structured parameter set, thereby achieving accurate and automated generation of the pattern outline. The whole process does not rely on graphic interaction or discrete sampling, which significantly improves the consistency, repeatability and computational efficiency of trajectory generation, while providing a clear and semantically explicit input data foundation for subsequent coordinate transformation and geometric type recognition.
[0052] Step 230: Transform the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference.
[0053] Optionally, in this embodiment, transforming the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference may include: obtaining the preset coordinates of the top center of the pattern in the machine coordinate system, wherein the top center of the pattern coincides with the installation reference point of the equipment fixture; and using the preset coordinates as the transformation reference, translating and transforming the key point coordinate sequence from the local coordinate system to the machine coordinate system.
[0054] Among them, the top center of the pattern is the highest geometric point of the target pattern and is centered in the horizontal direction, such as the center of the opening of a patch bag.
[0055] Optionally, in this embodiment, after obtaining the coordinates of the key point sequence of the sewing path of the target pattern in the local coordinate system, the system further obtains the preset coordinates of the top center of the pattern in the machine coordinate system of the sewing equipment. These preset coordinates are determined by the installation reference point of the equipment fixture; that is, during the actual sewing process, the top center of the pattern must be aligned with a fixed physical position on the fixture. This position has fixed coordinate values in the machine coordinate system, such as X0 = -185 mm and Y0 = 2 mm.
[0056] Furthermore, using the preset coordinates as the transformation reference, a translation operation is performed on each key point in the local coordinate system. Specifically, for any key point in the local coordinate system, its X-coordinate is added to the X component of the preset coordinates, and its Y-coordinate is added to the Y component of the preset coordinates, thereby obtaining the new coordinates of the key point in the machine coordinate system. Through this translation transformation, the original local path with the top center of the pattern as its origin is moved as a whole to the actual physical position of the machine's worktable, ensuring that the subsequently generated needle movement trajectory can accurately reproduce the design pattern on the fabric.
[0057] In this embodiment, by aligning the top center of the pattern with the installation reference point of the equipment fixture and using this to determine the preset coordinates, a deterministic mapping relationship is established between the pattern design space and the physical space of the equipment. The converted key point coordinates directly reflect the actual movement position of the equipment actuator, providing an accurate spatial reference for subsequent trajectory analysis, interpolation generation, and controller command output.
[0058] Step 240: Perform trajectory analysis on the converted keypoint sequence and identify the geometric type of the line connecting adjacent keypoints.
[0059] Optionally, in this embodiment, performing trajectory parsing on the converted keypoint sequence and identifying the geometric type of the lines connecting adjacent keypoints may include: traversing adjacent keypoint pairs in the keypoint sequence; when it is determined that the structured parameter set does not store geometric feature parameters associated with the current adjacent keypoint pair, determining the lines connecting adjacent keypoint pairs as straight line segments; when it is determined that the structured parameter set stores arc feature parameters associated with the current adjacent keypoint pair, determining the lines connecting adjacent keypoint pairs as arc segments; when it is determined that the structured parameter set stores spline feature parameters associated with the current adjacent keypoint pair, determining the lines connecting adjacent keypoint pairs as spline curve segments; wherein, the arc feature parameters include the center coordinates, radius, and rotation direction; the spline feature parameters include the control point coordinates.
[0060] Among them, adjacent keypoint pairs refer to two consecutive points in the keypoint sequence arranged in the sewing order, such as (P1,P2), (P2,P3), etc. Each pair defines a path segment to be sewn.
[0061] In an optional implementation of this embodiment, after obtaining the keypoint sequence transformed to the machine coordinate system, trajectory analysis can be performed on the sequence to determine the geometric type of each path segment. Specifically, the system extracts two adjacent keypoints sequentially according to the sewing order, forming multiple keypoint pairs. For each keypoint pair, the system searches the structured parameter set to see if there are any geometric feature parameters associated with that pair.
[0062] If no geometric feature parameters associated with the current keypoint pair are found in the structured parameter set, the line connecting the keypoint pair is determined as a straight line segment. If a set of arc feature parameters associated with the current keypoint pair is found in the structured parameter set, including the X and Y coordinates of the center in the coordinate system, the radius of the arc, and the rotation direction (e.g., CW for clockwise, CCW for counterclockwise), the line connecting the keypoint pair is determined as an arc segment. If a set of spline feature parameters associated with the current keypoint pair is found in the structured parameter set, including the coordinates of one or more control points, the line connecting the keypoint pair is determined as a spline curve segment. Through the above judgment logic, the entire keypoint sequence is divided into several continuous geometric segments, each with a clear geometric type identifier.
[0063] For example, a keypoint sequence for a patchwork pattern includes point pairs (P3, P4) and (P4, P5). In the structured parameter set, (P3, P4) is not associated with any additional parameters and is therefore identified as a straight line segment; while (P4, P5) is associated with arc feature parameters: center coordinates (-220, 12), radius 5 mm, and clockwise rotation. Based on this, the system identifies the (P4, P5) segment as an arc segment. Another decorative pattern includes point pairs (P7, P8), which are associated with three control point coordinates: (-150, 30), (-145, 35), and (-140, 30). Therefore, the system identifies this segment as a spline curve segment.
[0064] The solution in this embodiment explicitly stores the geometric feature parameters associated with specific key point pairs in a structured parameter set, and determines the geometric type based on the existence of the parameters. This gives the trajectory parsing process a clear semantic basis, avoiding the uncertainty and computational overhead caused by relying on numerical fitting or image recognition algorithms. It achieves reliable and efficient classification of mixed geometric paths, providing an accurate input basis for subsequent type-based matching interpolation, thereby improving the overall efficiency of trajectory generation and the robustness of the system while ensuring sewing accuracy.
[0065] Step 250: Determine the target interpolation method corresponding to the target geometry type. Based on the target interpolation method and the set stitch distance, generate a sequence of needle motion trajectory points corresponding to the target geometry type. Then, splice the needle motion trajectory points of each segment in the order of the key point sequence to obtain the needle motion trajectory point sequence of the target pattern.
[0066] Optionally, in this embodiment, a target interpolation method corresponding to the target geometry type is determined. Based on the target interpolation method and the set stitch spacing, a sequence of needle movement trajectory points corresponding to the target geometry type is generated. The needle movement trajectory points of each segment are then spliced together in the order of the key point sequence to obtain the needle movement trajectory point sequence of the target pattern. This can include: when the target geometry type is a straight line segment, using a straight interpolation method, needle movement trajectory points with equal spacing are generated between adjacent key points according to the set stitch spacing; when the target geometry type is an arc segment, using an arc interpolation method, needle movement trajectory points are generated along the arc path according to the set stitch spacing; when the target geometry type is a spline curve segment, using a spline interpolation method, needle movement trajectory points are generated according to the set stitch spacing and spline control parameters; and the needle movement trajectory points generated for each geometry type segment are then spliced together in the order of the key point sequence to form a complete sequence of needle movement trajectory points.
[0067] Linear interpolation generates intermediate trajectory points by dividing the curve into segments at fixed intervals between two endpoints. It is computationally simple, requiring only vector direction and length. Circular interpolation calculates the coordinates of each point along a real circular arc path, with the arc length equal to the set stitch distance as the step size, using angle increments (Δθ = stitch distance / radius) to ensure uniform point distribution and a close fit to the curve. Spline interpolation, based on spline control parameters (such as control points from Bezier or B-splines), generates trajectory points along the curve with a set stitch distance by parametrically defining the curve equation and employing numerical sampling methods (such as adaptive step-size iteration).
[0068] In one optional implementation of this embodiment, after identifying the geometric type of the lines connecting adjacent key points, the system generates dense needle movement trajectory points using corresponding interpolation strategies for different types of path segments. When a certain path segment is determined to be a straight line segment, the system calculates the total length of the straight line segment and determines the number of intermediate points to be inserted based on the user-defined needle spacing value. Then, it generates all trajectory points on the line connecting the start point and the end point at equal intervals, such that the straight-line distance between adjacent trajectory points is equal to the set needle spacing.
[0069] When a certain road segment is determined to be an arc segment, the system uses the center coordinates, radius, starting angle, ending angle, and rotation direction of the corresponding arc segment to calculate the total arc length of the arc, and divides it into segments with the set stitch distance as the unit arc length to obtain the required number of trajectory points; then, it calculates the X and Y coordinates of each segment point in the machine coordinate system in turn by stepping the angle, to ensure that each trajectory point is accurately distributed on the arc path, and the arc length between adjacent points is equal to the set stitch distance.
[0070] When a road segment is identified as a spline curve segment, the system constructs a parametric spline curve model based on the spline control parameters associated with that segment (including the coordinates of multiple control points), and uses a numerical sampling method to generate trajectory points along the curve path with a set spline spacing as the step size. During the sampling process, the parameter step size is iteratively adjusted to make the curve distance between adjacent trajectory points as close as possible to the set spline spacing, thereby ensuring the uniformity of trajectory point distribution and the accuracy of curve representation.
[0071] After all the trajectory points of all geometric types of road segments are generated, the trajectory points generated by each road segment are connected end to end in the sewing order specified by the original key point sequence. During the splicing process, the last trajectory point of the previous road segment is consistent with the first trajectory point of the next road segment, and finally a continuous, non-repeating and gapless complete needle movement trajectory point sequence is formed. This sequence fully expresses the spatial movement path of the needle in the entire pattern sewing process.
[0072] For example, the right side of a patch pocket pattern includes a quarter-circle arc with its center at (-220, 12) and a radius of 5 mm, extending clockwise from 90° to 0°, with a stitch spacing of 2 mm. The system calculates the total length of this arc to be approximately 7.85 mm, requiring the generation of 5 trajectory points (including endpoints). Using an angle step of Δθ≈23°, the coordinates of each point are calculated sequentially: (-220, 17), (-218.1, 16.5), (-216.5, 15.2), (-215.3, 13.6), and (-215, 12). The vertical line segment on its left side (from (-225, 2) to (-225, 12)) is divided into 5 equal segments (2 mm stitch spacing), generating 6 trajectory points. Finally, the sequence of trajectory points for the straight line segments and the sequence of trajectory points for the arc segments are seamlessly spliced together sequentially to form a continuous path.
[0073] The solution in this embodiment dynamically selects the corresponding interpolation method according to the geometric type, enabling straight line segments to generate trajectory points efficiently with the simplest calculation, circular arc segments to accurately express curvature in a way that conforms to their geometric nature, and spline curve segments to achieve high-fidelity restoration of free curves through parametric models. This effectively solves the problems of trajectory distortion or point redundancy that exist in traditional full-straight-line interpolation when processing curves, and significantly improves the sewing quality of complex patterns, the stability of equipment operation, and the efficiency of program generation.
[0074] Step 260: In the sequence of needle movement points, according to the preset process rules, embed at least one functional sewing operation instruction to generate a complete pattern program; wherein, the functional sewing operation instruction includes at least one of the following types: reinforcing stitch instruction, bar knot stitch instruction, presser foot height switching instruction, and thread cutting instruction; output the complete pattern program to the sewing equipment controller, which parses and executes the program to drive the needle to automatically complete the sewing of the target pattern containing the embedded sewing operation instructions.
[0075] Optionally, in this embodiment, after obtaining the complete needle movement trajectory point sequence, the system further embeds at least one functional sewing operation instruction at a specific position in the sequence according to preset process rules, thereby generating a complete pattern program. The process rules can be configured by the user or automatically matched by the system according to the pattern type. For example, a reinforcing stitch instruction can be automatically added at the starting point of the trajectory, a bar knot stitch instruction can be added at each corner of the closed path, a presser foot height switching instruction can be added in areas marked with folds or thickness changes in the structured parameters, and a thread cutting instruction can be added at the ending point of the trajectory.
[0076] Each functional sewing operation instruction is represented by a specific control code and bound to the nearest needle movement trajectory point, forming a composite data unit containing position information and process instructions. All trajectory points and their associated instructions are organized into a structured data file, i.e., a complete pattern program, according to the sewing sequence. This program is sent to the controller of the sewing equipment via a wired or wireless communication interface. During execution, the controller reads the program point by point. When it parses a trajectory point with a functional sewing operation instruction, it synchronously sends control signals to the corresponding actuators, such as driving the return sewing motor to complete reinforcement, activating the bartacking module, adjusting the presser foot cylinder height, or triggering the electromagnetic thread cutter, thereby accurately realizing the embedded process actions during automatic sewing.
[0077] For example, for a rectangular rounded corner patch pocket pattern, after generating the sequence of track points, the system automatically embeds a reinforcing stitch instruction at the first track point (the starting point), a bar knot stitch instruction at each of the four rounded corner endpoints, an instruction to switch the presser foot height from high to low at the corresponding folded area on the upper edge of the pocket opening, and a thread trimming instruction at the last track point. These instructions are encoded into G-codes supported by the device or a custom instruction set, and are written into the pattern program file along with the corresponding track points. When the program is loaded into the computerized pattern machine, the controller automatically performs backstitching, bar knotting, presser foot adjustment, and thread trimming actions when it reaches each designated position, without manual intervention.
[0078] The solution in this embodiment deeply integrates trajectory generation and process control by embedding functional sewing operation instructions into the sequence of needle movement points according to process rules. This ensures the accuracy of process actions in space and time, avoiding the errors and efficiency losses caused by traditional reliance on manual intervention or post-editing. The complete pattern program contains all motion and control information, which can be directly parsed and executed by the sewing equipment controller, significantly improving the consistency and reliability of automated sewing.
[0079] To better understand the method for generating the pattern sewing trajectory involved in this embodiment, Figure 3 This is a schematic diagram of the key point sequence of a patchwork pattern according to Embodiment 2 of the present invention; Figure 4 This is a parametric dimensioning diagram of a patch bag pattern provided according to Embodiment 2 of the present invention.
[0080] Figure 3 Solid lines represent the actual sewing trajectory, while dashed lines represent auxiliary positioning or folding outlines. The diagram marks 14 key points from 1 to 14, arranged in the sewing sequence to form a complete closed-loop path. Key points 1 to 8 are located in the upper opening area, forming the bag opening outline; key points 9 to 14 constitute the lower closing structure, including the side bevels and the bottom V-shaped fold. This sequence of key points forms the basis of geometric modeling; each point has unique coordinates in the local coordinate system and serves as a control node for subsequent trajectory generation.
[0081] Correspondingly, Figure 4 This diagram illustrates the parametric design dimensions of the patch pocket pattern, used to define its overall outline and local geometric features. Several adjustable parameters are labeled in the diagram: DK: Pocket opening width, determining the top horizontal length; ZK: Upper fold amount, i.e., the depth to which the pocket opening is folded inward; SX: Side shrinkage amount, affecting the degree of inclination of the bag's sides; ZB: Total bag height, the distance from the pocket opening to the bottom; ZX: Bottom fold width, determining the degree of unfolding of the bottom V-shaped fold. These parameters collectively constitute the basic parameter part of the structured parameter set, used to drive the calculation of keypoint coordinates. For example, the X coordinates of keypoints 1 and 8 are determined by DK / 2, while the Y coordinates of keypoints 5 and 3 are determined by both ZB and SX.
[0082] refer to Figure 3 and Figure 4 The user selects the pattern type identifier as "Trapezoidal Patch Bag_V1", and the corresponding geometric model is retrieved from the preset mapping relationship based on this identifier. This model contains... Figure 1 The 14 keypoints shown below and their coordinate calculation rules are as follows: for example, the X-coordinate of keypoint 1 is DK / 2, and the Y-coordinate is 0; the X-coordinate of keypoint 5 is -DK / 2 + SX, and the Y-coordinate is ZB; the X-coordinate of keypoint 11 is 0, and the Y-coordinate is ZB - ZX. When the user inputs a structured parameter set, such as {DK: 80, ZK: 10, SX: 5, ZB: 60, ZX: 15}, the following will be used: Figure 3 Establish a local coordinate system with the center of the middle pocket (i.e. the midpoint between key points 1 and 8) as the origin. Substitute the above parameters into the coordinate formula of each key point to calculate the precise coordinates of all key points in the local coordinate system.
[0083] Furthermore, the preset coordinates of the equipment fixture installation reference points in the machine coordinate system are obtained (e.g., X0=-185mm, Y0=2mm), and all local coordinates are translated to the machine coordinate system. Next, adjacent key point pairs are traversed to check whether geometric feature parameters are stored in the structured parameter set. If not, it is determined to be a straight line segment; if arc or spline parameters are present, it is identified as an arc segment or spline curve segment, respectively.
[0084] For each segment, the needle movement trajectory points are generated using a corresponding interpolation method: for straight segments, points are interpolated at equal intervals according to the set needle spacing; for arc segments, points are sampled along the arc length based on the center, radius, and rotation direction; for spline segments, points are parametrically sampled based on control points. The trajectory points for all segments are then... Figure 3 The key points shown are pieced together in sequence to form a complete path.
[0085] Finally, functional sewing operation instructions are embedded in this trajectory point sequence: a reinforcing stitch instruction is inserted at the starting point, a bar knot stitch instruction is inserted at the four corners, a presser foot height switching instruction is inserted in the bottom hem area, and a thread trimming instruction is inserted at the end point. The final generated complete pattern program is output to the sewing equipment controller, which parses and executes it to achieve fully automatic and high-precision patch pocket sewing.
[0086] This invention integrates parametric modeling, geometric type recognition, trajectory interpolation, and process instructions into a single design, achieving full automation from parameter input to program output. This significantly improves pattern making efficiency and sewing accuracy, and solves problems such as complex operation, poor flexibility, and inability to fine-tune in existing technologies. It is suitable for various complex pattern types and has good industrial applicability and scalability.
[0087] Example 3 Figure 5 This is a schematic diagram of a device for generating pattern sewing tracks according to Embodiment 3 of the present invention. Figure 5 As shown, the device includes: a receiving module 510, a first determining module 520, a geometric type identification module 530, and a second determining module 540.
[0088] The receiving module 510 is used to receive the pattern type identifier of the target pattern input by the user and the structured parameter set matching the pattern type identifier; The first determining module 520 is used to determine the geometric model that matches the pattern type identifier, and based on the geometric model and the structured parameter set, determine the coordinates of the sewing path key point sequence of the target pattern in the local coordinate system; wherein the local coordinate system takes the center of the top of the pattern as the origin; The geometry type recognition module 530 is used to transform the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference, perform trajectory analysis on the transformed key point sequence, and identify the geometry type of the line connecting adjacent key points. The second determining module 540 is used to determine the target interpolation method corresponding to the target geometry type, generate a needle movement trajectory point sequence corresponding to the target geometry type based on the target interpolation method and the set needle spacing, and splice the needle movement trajectory points of each segment in the order of the key point sequence to obtain the needle movement trajectory point sequence of the target pattern.
[0089] In an optional implementation of this embodiment, the structured parameter set includes basic parameters for defining the overall outline of the pattern, and local geometric feature parameters corresponding to the pattern type identifier; The local geometric feature parameters include specific geometric element parameters that match the pattern type identifier.
[0090] In an optional implementation of this embodiment, the first determining module 520 is specifically used to determine the geometric model corresponding to the pattern type identifier from a preset mapping relationship between pattern type identifiers and geometric models; wherein, the geometric model includes multiple key points arranged in the sewing order, and coordinate calculation rules for each key point; A local coordinate system is established with the top center of the target pattern as the origin. The parameter values in the structured parameter set are substituted into the coordinate calculation rules corresponding to each key point to obtain the coordinates of each key point in the local coordinate system.
[0091] In an optional implementation of this embodiment, the geometry type recognition module 530 is specifically used to obtain the preset coordinates of the top center of the pattern in the machine coordinate system, wherein the top center of the pattern coincides with the installation reference point of the equipment fixture; Using the preset coordinates as the transformation reference, the key point coordinate sequence is translated and transformed from the local coordinate system to the machine coordinate system.
[0092] In an optional implementation of this embodiment, the geometry type recognition module 530 is further specifically used to traverse adjacent key point pairs in the key point sequence; When it is determined that the structured parameter set does not store geometric feature parameters associated with the current adjacent key point pair, the line connecting the adjacent key point pair is determined as a straight line segment; When it is determined that the structured parameter set stores arc feature parameters associated with the current adjacent key point pair, the line connecting the adjacent key point pair is determined as an arc segment. When it is determined that the structured parameter set stores spline feature parameters associated with the current adjacent key point pair, the line connecting the adjacent key point pair is determined as a spline curve segment; The circular arc feature parameters include the center coordinates, radius, and rotation direction; The spline feature parameters include the coordinates of the control points.
[0093] In an optional implementation of this embodiment, the second determining module 540 is specifically used to generate equally spaced needle movement trajectory points between adjacent key points by using linear interpolation when the target geometry is a straight line segment, based on the set needle spacing. When the target geometry is an arc segment, the circular interpolation method is used to generate the needle movement trajectory points along the arc path according to the set needle spacing; When the target geometry is a spline curve segment, spline interpolation is used to generate needle movement trajectory points based on the set needle spacing and spline control parameters. The needle motion trajectory points generated by each geometric type of road segment are sequentially spliced together according to the order of the key point sequence to form a complete needle motion trajectory point sequence.
[0094] In an optional implementation of this embodiment, the pattern sewing trajectory generation device further includes: a complete pattern program generation module, used to embed at least one functional sewing operation instruction into the needle movement trajectory point sequence according to preset process rules to generate a complete pattern program; wherein, the functional sewing operation instruction includes at least one of the following types: reinforcing stitch instruction, bark stitch instruction, presser foot height switching instruction, and thread cutting instruction; The complete pattern program is output to the sewing equipment controller, which parses and executes the program to drive the needle to automatically complete the sewing of the target pattern containing the embedded sewing operation instructions.
[0095] The pattern sewing trajectory generation device provided in this embodiment of the invention can execute the pattern sewing trajectory generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0096] Example 4 Figure 6A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0097] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from the storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0098] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0099] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods described above, such as the method for generating pattern sewing trajectories.
[0100] In some embodiments, the method for generating the pattern sewing trajectory can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for generating the pattern sewing trajectory described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the method for generating the pattern sewing trajectory by any other suitable means (e.g., by means of firmware).
[0101] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0103] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM), optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0104] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0105] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0106] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) in terms of management difficulty and weak business scalability.
[0107] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
[0109] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements a database detection method as provided in any embodiment of this application.
[0110] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LANs or WANs—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0111] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the solution has been or necessarily used.
[0112] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for generating a pattern sewing trajectory, characterized in that, The method includes: Receive the pattern type identifier of the target pattern input by the user and a set of structured parameters that match the pattern type identifier; A geometric model matching the pattern type identifier is determined, and based on the geometric model and the structured parameter set, the coordinates of the sewing path key point sequence of the target pattern in the local coordinate system are determined; wherein the local coordinate system has the center of the top of the pattern as the origin; The coordinates of each key point in the local coordinate system are transformed to the machine coordinate system with the center of the equipment fixture as the reference. The transformed key point sequence is analyzed for trajectory and the geometric type of the line connecting adjacent key points is identified. Determine the target interpolation method corresponding to the target geometry type. Based on the target interpolation method and the set stitch distance, generate a needle movement trajectory point sequence corresponding to the target geometry type. Then, splice the needle movement trajectory points of each segment in the order of the key point sequence to obtain the needle movement trajectory point sequence of the target pattern.
2. The method for generating pattern sewing tracks according to claim 1, characterized in that, The structured parameter set includes basic parameters for defining the overall outline of the pattern, as well as local geometric feature parameters corresponding to the pattern type identifier; The local geometric feature parameters include specific geometric element parameters that match the pattern type identifier.
3. The method for generating pattern sewing tracks according to claim 1, characterized in that, Determine the geometric model that matches the pattern type identifier, and based on the geometric model and the structured parameter set, determine the coordinates of the sewing path key point sequence of the target pattern in the local coordinate system, including: From the preset mapping relationship between pattern type identifiers and geometric models, the geometric model corresponding to the pattern type identifier is determined; wherein, the geometric model includes multiple key points arranged in the sewing order, and the coordinate calculation rules for each key point; A local coordinate system is established with the top center of the target pattern as the origin. The parameter values in the structured parameter set are substituted into the coordinate calculation rules corresponding to each key point to obtain the coordinates of each key point in the local coordinate system.
4. The method for generating pattern sewing tracks according to claim 1, characterized in that, The step of transforming the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference includes: Obtain the preset coordinates of the top center of the pattern in the machine coordinate system, wherein the top center of the pattern coincides with the installation reference point of the equipment fixture; Using the preset coordinates as the transformation reference, the key point coordinate sequence is translated and transformed from the local coordinate system to the machine coordinate system.
5. The method for generating pattern sewing tracks according to claim 4, characterized in that, The process of parsing the trajectory of the converted keypoint sequence and identifying the geometric type of the lines connecting adjacent keypoints includes: Iterate through adjacent keypoint pairs in the keypoint sequence; When it is determined that the structured parameter set does not store geometric feature parameters associated with the current adjacent key point pair, the line connecting the adjacent key point pair is determined as a straight line segment; When it is determined that the structured parameter set stores arc feature parameters associated with the current adjacent key point pair, the line connecting the adjacent key point pair is determined as an arc segment. When it is determined that the structured parameter set stores spline feature parameters associated with the current adjacent key point pair, the line connecting the adjacent key point pair is determined as a spline curve segment; The circular arc feature parameters include the center coordinates, radius, and rotation direction; The spline feature parameters include the coordinates of the control points.
6. The method for generating pattern sewing tracks according to claim 1, characterized in that, The step of determining the target interpolation method corresponding to the target geometry type involves generating a needle movement trajectory point sequence corresponding to the target geometry type based on the target interpolation method and a set stitch distance. The needle movement trajectory points of each segment are then concatenated according to the sequence of key points to obtain the needle movement trajectory point sequence of the target pattern, including: When the target geometry is a straight line segment, a linear interpolation method is used to generate equally spaced needle movement trajectory points between adjacent key points according to the set needle spacing; When the target geometry is an arc segment, the circular interpolation method is used to generate the needle movement trajectory points along the arc path according to the set needle spacing; When the target geometry is a spline curve segment, spline interpolation is used to generate needle movement trajectory points based on the set needle spacing and spline control parameters. The needle motion trajectory points generated by each geometric type of road segment are sequentially spliced together according to the order of the key point sequence to form a complete needle motion trajectory point sequence.
7. The method for generating pattern sewing tracks according to claim 1, characterized in that, The method further includes: In the sequence of needle movement points, at least one functional sewing operation instruction is embedded according to preset process rules to generate a complete pattern program; wherein, the functional sewing operation instruction includes at least one of the following types: reinforcing stitch instruction, bar knot stitch instruction, presser foot height switching instruction, and thread cutting instruction; The complete pattern program is output to the sewing equipment controller, which parses and executes the program to drive the needle to automatically complete the sewing of the target pattern containing the embedded sewing operation instructions.
8. A device for generating pattern sewing tracks, characterized in that, include: The receiving module is used to receive the pattern type identifier of the target pattern input by the user and the structured parameter set that matches the pattern type identifier; The first determining module is used to determine the geometric model that matches the pattern type identifier, and based on the geometric model and the structured parameter set, determine the coordinates of the sewing path key point sequence of the target pattern in the local coordinate system; wherein the local coordinate system takes the center of the top of the pattern as the origin; The geometry type recognition module is used to transform the coordinates of each key point in the local coordinate system to the machine coordinate system with the center of the equipment fixture as the reference, perform trajectory analysis on the transformed key point sequence, and identify the geometry type of the line connecting adjacent key points. The second determining module is used to determine the target interpolation method corresponding to the target geometry type, generate a needle movement trajectory point sequence corresponding to the target geometry type based on the target interpolation method and the set needle spacing, and splice the needle movement trajectory points of each segment in the order of the key point sequence to obtain the needle movement trajectory point sequence of the target pattern.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the method for generating the pattern sewing trajectory according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for generating the pattern sewing trajectory according to any one of claims 1-7.
