Layout method for processing, processing apparatus, processing system, and storage medium
The fully automated visual nesting method and device solves the problem of time-consuming pattern drawing in material processing, realizes efficient and accurate pattern processing, reduces material and time waste, and improves processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MAKER WORKS TECH CO LTD
- Filing Date
- 2025-04-15
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, drawing patterns for material processing is time-consuming and inefficient, requiring manual configuration of processing positions, which leads to material and time waste.
A fully automated visual nesting method and apparatus are provided. By acquiring the nesting object and target image in an editable interface, the nesting is performed in response to user operations, and the nesting results are displayed in the interface, thereby realizing real-time visual nesting of materials to be processed.
It improves processing efficiency, reduces material and time waste, ensures that the nesting results match the processing requirements, and enhances processing accuracy and transparency.
Smart Images

Figure CN122175048A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer technology and materials processing technology, and in particular to a sorting method, processing equipment, processing system and storage medium for processing. Background Technology
[0002] In the field of material processing (such as carving and cutting), the process typically involves drawing the processing pattern and determining its processing position. Then, the material is processed according to these positions to obtain the corresponding result. Currently, the processing positions for each pattern are usually manually configured in the processing equipment, which results in long processing times and low efficiency. Summary of the Invention
[0003] This application provides a nesting method, processing equipment, processing system, and storage medium for processing, which can realize fully automatic and visualized nesting, improve processing efficiency, and present the nesting effect to the user in real time, ensuring the rationality of the nesting results.
[0004] On one hand, embodiments of this application provide a sorting method for processing, including:
[0005] Retrieve the layout object from the editable interface;
[0006] Acquire a target image and display the target image within the editable interface; wherein the target image is used to present the material to be processed placed in the processing area of the processing equipment;
[0007] In response to the sorting confirmation operation for the sorting object, sorting processing is performed on the sorting object;
[0008] The target image displayed within the editable interface shows the arranged objects after the arrangement.
[0009] Furthermore, embodiments of this application provide a sorting device for processing, comprising:
[0010] The acquisition unit is used to acquire the layout object in the editable interface;
[0011] The display unit is used to acquire a target image and display the target image within the editable interface; wherein the target image is used to present the material to be processed placed in the processing area of the processing equipment;
[0012] A sorting unit is configured to perform sorting processing on the sorting object in response to a sorting confirmation operation for the sorting object;
[0013] The display unit is also used to display the arranged objects in the target image displayed within the editable interface.
[0014] Furthermore, embodiments of this application provide a processing apparatus, including:
[0015] slide rail;
[0016] A processing head, which is slidably disposed on the slide rail, is used to perform at least one of laser processing, cutting processing or printing processing on the material to be processed;
[0017] A processing platform, the processing platform including a processing area for placing the material to be processed, and the processing head being movable on the processing area;
[0018] A communication component, the communication component being used to receive processing instructions generated from the nested object obtained by the steps of the nesting method for processing described in the first aspect;
[0019] A controller, based on the processing instructions, controls the processing head to move on the slide rail to process the material to be processed placed in the processing area.
[0020] Furthermore, embodiments of this application provide a processing system, including:
[0021] A processing device, comprising a slide rail, a processing head, a processing platform, communication components, and a controller; wherein the processing head is slidably mounted on the slide rail; the processing platform includes a processing area for placing the material to be processed, and the processing head is movable on the processing area; and
[0022] A terminal device that communicates with the processing equipment, the terminal device being used to execute the nesting method for processing as described in the first aspect.
[0023] In another aspect, embodiments of this application also provide a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the sorting method for processing as described in the first aspect.
[0024] In another aspect, embodiments of this application also provide a computer program product, characterized in that the computer program product includes a computer program, which, when executed by a processor, implements the steps of the nesting method for processing as described in the first aspect.
[0025] In this embodiment, by acquiring the layout object in the editable interface and the target image of the material to be processed placed in the processing area of the processing equipment, and displaying the target image in the editable interface, and then performing layout processing on the layout object after detecting the layout confirmation operation of the layout object, the layout object after layout is displayed in the target image displayed in the editable interface. This realizes the visualization of layout by combining the real-time image of the material to be processed with the editable interface, allowing users to intuitively preview and adjust the layout results against the background of the real target image. This ensures the transparency and adjustability of the layout operation, thereby significantly improving the fit between the layout effect and the processing requirements, greatly reducing material waste and time waste caused by trial and error, and improving the overall processing efficiency. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the structure of a processing system provided in an embodiment of this application;
[0028] Figure 2 This is a schematic flowchart of a sorting method for processing provided in an embodiment of this application;
[0029] Figure 3 This is a schematic diagram illustrating the positional relationship between bounding boxes according to an embodiment of this application;
[0030] Figure 4a This is a schematic diagram of the positional relationship of patterns provided in an embodiment of this application;
[0031] Figure 4b This is a schematic diagram illustrating another pattern positional relationship provided in an embodiment of this application;
[0032] Figure 5 This is a schematic diagram of a pattern outline extraction method for a combined pattern provided in an embodiment of this application;
[0033] Figure 6 This is a schematic flowchart of another sorting method for processing provided in the embodiments of this application;
[0034] Figure 7 This is a schematic diagram illustrating the generation principle of an inner-critical polygon provided in an embodiment of this application;
[0035] Figure 8This is a schematic diagram illustrating the generation principle of an externally adjacent critical polygon provided in an embodiment of this application;
[0036] Figure 9 This is a schematic diagram of an inner and outer critical polygons with an associated relationship, provided in an embodiment of this application.
[0037] Figure 10 This is a schematic diagram illustrating the application of sorting before and after sorting, provided in an embodiment of this application;
[0038] Figure 11 This is a schematic flowchart of another sorting method for processing provided in the embodiments of this application;
[0039] Figure 12 This is a schematic diagram of an editable interface provided in an embodiment of this application;
[0040] Figure 13 This is a schematic diagram of a pre-processing layout process provided in an embodiment of this application;
[0041] Figure 14 This is a schematic diagram of a captured image (or target image) of a processing area provided in an embodiment of this application;
[0042] Figure 15 This is a schematic diagram of a binarized image provided in an embodiment of this application;
[0043] Figure 16 This is a schematic diagram of an image obtained by visually drawing the outer and inner contours according to an embodiment of this application;
[0044] Figure 17 This is a schematic diagram of the structure of a sorting device for processing provided in an embodiment of this application;
[0045] Figure 18 This is a schematic diagram of the structure of a processing device provided in an embodiment of this application. Detailed Implementation
[0046] It should be noted in advance that, in order to enable those skilled in the art to better understand the technical solutions proposed in the embodiments of this application, the embodiments of this application will be described clearly and completely in conjunction with one or more accompanying drawings. Furthermore, the accompanying drawings shown in the embodiments of this application are merely illustrative examples; for instance, the execution order of each step in the drawings can be adaptively adjusted according to the actual application scenario.
[0047] Furthermore, in the embodiments of this application, the block diagrams, modules, and units shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. Each module or unit can be part of a larger module or unit that includes the functionality of that module or unit. That is, the terms "module" or "unit" mentioned in the embodiments of this application refer to a computer program or part of a computer program with a predetermined function, which can work together with other related parts to achieve a predetermined goal. It can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof, or implemented in different network and / or processor devices and / or microcontroller devices. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units.
[0048] This application provides a layout scheme for processing. The scheme specifies that before processing the layout object, it can be imported into an editable interface, where the layout object and a target image are displayed. The target image can be obtained by photographing the processing area of the processing equipment, where the material to be processed is placed. After detecting a layout confirmation operation in the editable interface, layout processing is performed on the layout object, and the layout object after layout is displayed in the target image shown in the editable interface. Here, the layout object refers to the graphic that needs to be layoutd to determine its processing position, and layout refers to simulating the placement of the layout object within a processable area on the material to be processed. Furthermore, the number of layout objects can be one or more. When there are multiple layout objects, they can be layoutd sequentially, and the layout must be performed under the constraint that "the layout positions of each layout object do not overlap." The layout position can be understood as the simulated and determined processing position.
[0049] By applying this solution to processing tasks, fully automated and visualized nesting of processing objects can be achieved among processing materials of various shapes (such as scraps and new processing materials). This significantly improves the fit between the nesting effect and processing requirements, greatly reduces material and time waste caused by trial and error, and improves overall processing efficiency.
[0050] Based on the above technical solutions, this application further proposes that the result of the nesting process can be the nesting position. After determining the nesting position of the nesting object, the nesting position and the nesting object can be associated and imported into the processing process to control the processing equipment to process the nesting object based on the nesting position. It is worth mentioning that, generally, the nesting position is determined using the processing area as a planar coordinate system, so that the processing equipment can quickly and accurately locate the processing position based on the nesting position. Optionally, the nesting position can also be constructed using the target image as a planar coordinate system, where one coordinate point corresponds to one pixel, and each pixel is mapped to a processing position in the processing area. Therefore, when processing based on the nesting position is required, the specific processing position of the nesting object in the processing area can be further determined based on the position of each pixel in the target image relative to the processing area.
[0051] In one feasible implementation, the aforementioned processing procedure can run on a computer device or a processing device, and is used to control the processing device to process the sampled object on the relevant processing material within the processing area, and / or, after creating a processing instruction based on the sampled object and its position, to send the processing instruction to the processing device to instruct the processing device to schedule the corresponding function for processing. The computer device may include one or both of a terminal device and a server.
[0052] When the computer device includes a terminal device, the terminal device can run an application program (hereinafter referred to as the control program) for processing control. This control program can be used to display an editable interface and implement the nesting scheme for processing provided in the embodiments of this application based on the editable interface. Optionally, the control program can be used to create a processing process or to interact with the processing process (such as sending processing instructions). Furthermore, the type of terminal device may specifically include, but is not limited to, smartphones, tablets, laptops, desktop computers, in-vehicle terminals, smart TVs, and smart wearable devices (such as wristbands and watches).
[0053] When computer equipment includes a server, the server can be used to provide support services such as data computing and data storage services to the control program. That is, the server establishes a communication connection with the control program to generate computer-readable data (such as layout objects, target images, layout positions, etc.) that meet user needs through interaction with the control program. Furthermore, the type of server can specifically include, but is not limited to, independent physical servers, server clusters or distributed systems composed of multiple physical servers, and cloud servers that provide one or more of the following basic cloud services: cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. No specific restrictions are imposed here.
[0054] In another feasible implementation, this application can implement the relevant technical solution through a processing system that includes computer equipment and processing equipment. Exemplarily, the structure of the processing system can be as follows: Figure 1 .based on Figure 1 As can be seen, a processing system can include n computer devices (such as...) Figure 1 One or more devices marked with 101), and at least one processing device (such as...) Figure 1 In this system, the processing process can run as a host computer within a computer device, and the processing equipment can act as a slave computer responding to relevant processing instructions. For example, the host computer can send processing instructions containing the layout object and its layout position to the slave computer (i.e., the processing equipment) to instruct (or control) the processing equipment to perform corresponding processing in the processing area, thereby obtaining the corresponding graphic. Alternatively, the host computer can also be used to determine the layout position of the layout object on the target image based on the layout object and the target image corresponding to the processing area, and then use the position on the processing area that maps to this layout position as the processing position of the layout object in the processing area. No specific limitations are placed on the functionality of the host computer here.
[0055] In one feasible implementation, the material to be processed in this technical solution can be a defective material (such as material with holes, irregularly shaped material, etc.). To address this, this solution further points out that after obtaining the layout object, the outer contour and hole contours (if any) of the material to be processed can be identified from the target image. Then, based on the object contour of the layout object and the outer contour and hole contours of the material to be processed, a minimum processing area sufficient for complete processing of the layout object is determined on the material to be processed displayed in the target image. The layout position of the layout object is then determined within this minimum processing area to achieve layout. Processing based on this layout position allows the processing technology to break through the dependence on material integrity in traditional processing, enabling various processing tasks to reuse defective materials, thereby significantly improving resource utilization in processing scenarios.
[0056] In one feasible implementation, the number of materials to be processed in the above implementation can be one or more pieces, and at least one piece of non-overlapping material to be processed is displayed on a target image. That is to say, the number of target images can be one or more. One target image can be used to present part of the material to be processed placed in the processing area, and a combination of all target images (such as splicing) can be used to present the complete processing area. However, in general, only one target image is used to display all the material to be processed to avoid overlapping processing positions of different layout objects in subsequent processing due to pixel deviations. For the case with at least two pieces of material to be processed, this solution further points out that when arranging each layout object, each material to be processed can be used to arrange the layout object in order of increasing processable area until a target processing material sufficient to completely process the layout object is determined. Then, the layout position determined on the target processing material is used as the layout position of the layout object. This allows various processing tasks to maximize the utilization of incomplete processing materials and significantly improve the resource utilization rate in the processing scenario.
[0057] The processable area refers to the area of a complete region of the material to be processed. Generally, the target processing material refers to the material with the smallest usable area that can be used to process a complete layout object. In some cases, the target processing material can also meet the following two conditions: (1) it can be used to process a complete layout object; (2) after processing on the material to be processed, the material utilization rate of the material to be processed is greater than or equal to the utilization rate threshold. It is understood that in the technical solution proposed in this application, the area of the processing area in the processing equipment ≥ the processable area of the target processing material ≥ the area occupied by the layout position of the layout object on the target processing material.
[0058] Based on the principles of the above-mentioned schemes, this application specifically proposes a nesting method for processing. This method can be executed by the aforementioned computer equipment or processing equipment. For ease of description, the following explanation will consistently use a terminal device as an example. Specifically, such as... Figure 2 The method may include the following steps S201-S204:
[0059] S201. Obtain the layout object in the editable interface.
[0060] In specific embodiments, an editable interface refers to an editable interface provided by software (such as processing pattern drawing software, processing simulation software, etc.). The editable interface can interact with the user; for example, the user can input data in various forms such as text, images, audio, and video, and the interface can respond to user operations by displaying corresponding data in these forms. A layout object refers to a processing object used for processing, including but not limited to characters, lines, and patterns composed of lines and / or colors. In some embodiments, the layout object can be a graphic generated based on the graphic to be processed to determine the processing position; the layout object can be the outline of the graphic to be processed. In practical applications, the editable interface can be displayed on either the processing equipment or the terminal device. This application embodiment uses the display of the editable interface on the terminal device as an example. The user can import or select a corresponding processing reference image within the editable interface based on processing requirements. This processing reference image contains one or more patterns to be processed. Furthermore, the terminal device can identify one or more layout objects that need to be layoutd based on the various patterns on the processing reference image, thereby obtaining the layout objects in the editable interface.
[0061] Therefore, as an exemplary implementation, the terminal device can obtain the layout object in the editable interface by following the steps (1)-(3):
[0062] (1) Obtain the processing reference image.
[0063] The processing reference image contains at least one pattern, which can be used to form a pattern to be processed on the material to be processed, referred to as the processing pattern. It can be understood that a processing pattern can be composed of one or more patterns in the processing reference image, and each processing pattern can subsequently correspond to a layout object.
[0064] (2) Perform image recognition on the processing reference image to obtain the pattern position relationship between each pattern in the processing reference image.
[0065] The positional relationships in the diagrams can be independent, containment, or intersecting. The positional relationship between any two patterns can be determined based on the relative positional relationship between their outlines.
[0066] In one feasible implementation, when determining the positional relationship between various patterns, the bounding box corresponding to each pattern can be identified first in the processing reference image. This bounding box refers to the smallest rectangular frame that can completely enclose the corresponding pattern. Then, the positional relationship between the corresponding patterns is determined by identifying the positional relationship between the bounding boxes of each pattern. Specifically, as... Figure 3 As shown, if the positional relationship between the bounding box of one pattern and the bounding box of another pattern is intersecting, then the pattern intersection points between these two patterns are identified from the processing reference image. Furthermore, if at least two pattern intersection points exist, the positional relationship between these two patterns is determined to be intersecting (e.g., ...). Figure 3 (Illustrated diagram of intersection relationships); In the absence of pattern intersections, the positional relationship between these two patterns is determined as an independent relationship (e.g., ...). Figure 3 (Illustrated diagram of independent relationships).
[0067] Accordingly, such as Figure 4a As shown, if the positional relationship between the bounding box of one pattern and the bounding box of another pattern is non-intersecting, the positional relationship between the endpoints of one pattern and the other pattern is identified from the processing reference image. If all endpoints of the first pattern are within the other pattern, the positional relationship between the two patterns is determined to be an inclusion relationship; if some endpoints of the first pattern are within the other pattern, the positional relationship is determined to be an intersection relationship. Furthermore, when the positional relationship between the bounding boxes of two patterns is non-intersecting (e.g., ...), the positional relationship is determined to be intersecting. Figure 4b When the bounding boxes are defined as "independent" or "containing," the positional relationship between the two patterns can also be defined as independent if none of the endpoints of either pattern are within the other pattern (e.g., ...). Figure 4b (The illustration shows that the two patterns are independent)
[0068] (3) Extract the pattern outline from the processing reference image according to the pattern position relationship to obtain at least one layout object.
[0069] Specifically, different methods can be used to extract pattern contours for different pattern positional relationships. For example, when the pattern positional relationship is independent, the pattern boundary contours of each pattern can be directly extracted as the layout object; when the pattern positional relationship is inclusive, the patterns with inclusive relationship can be treated as a whole, and then the outermost pattern boundary contour can be extracted as the layout object; when the pattern positional relationship is intersecting, the combined pattern can be identified from the patterns with intersecting relationship first, then the pattern layout strategy associated with the processing reference image can be obtained, and then the pattern contours of the combined pattern can be extracted based on the pattern layout strategy to obtain the pattern contours of the corresponding layout object.
[0070] Among them, a composite pattern refers to a complex pattern composed of at least two patterns with combination attributes, and each pattern in the composite pattern intersects with at least one other pattern in the composite pattern (e.g., ...). Figure 5 The combined patterns shown are either intersecting or tangent, where tangency means that the two patterns share only one common edge (e.g., two collinear polygons) or a common point (e.g., two tangent circles). Optionally, the terminal device can use patterns with intersecting or tangent relationships in the reference processing image as combined patterns, or it can use only patterns with user-configured combination attributes as combined patterns; there is no limitation here. It is understood that during the movement of the combined pattern, the relative positional relationship of each pattern within the combined pattern remains unchanged. Exemplarily, in the embodiments of this application, the relative positional relationship remains unchanged during the movement by recording the relative positions between each pattern. For example, an arbitrary point in the first pattern can be determined as a reference point RefA, and an arbitrary point in the second pattern can be determined as a reference point RefB. The relative position between RefA and RefB can be recorded, and then, after detecting the translation of the first pattern, the second pattern can be translated relative to this relative position.
[0071] Furthermore, the pattern layout strategy can be used to indicate independent layout after canceling the grouping attribute, or overall layout with the grouping attribute, depending on the user's layout requirements for the combined patterns. The pattern layout strategy can be determined based on user actions in the editable interface, such as interactive controls indicating independent layout after canceling the grouping attribute, and interactive controls indicating overall layout with the grouping attribute. Specifically, in response to a user interaction with the interactive control indicating independent layout after canceling the grouping attribute, if the pattern layout strategy is determined to indicate independent layout after canceling the grouping attribute, the terminal device can extract the pattern outlines of each pattern in the combined pattern to obtain a layout object based on one pattern in the combined pattern, thereby obtaining at least two layout objects corresponding to the combined pattern (e.g., ...). Figure 5The example shown is the "layout object obtained after canceling the grouping attribute". In response to a user interaction with an interactive control that uses the grouping attribute for overall layout, if the pattern layout strategy indicates that the overall layout uses the grouping attribute, the terminal device can extract the outer contour of the grouped pattern and use this outer contour as the layout object corresponding to the grouped pattern (e.g., ...). Figure 5 The example shown is "the layout object obtained after retaining the combined attributes" (the example shown).
[0072] In the process of extracting the outer contour of a combined pattern, any two intersecting or tangent patterns in the combined pattern can be first taken as the current pattern group to be processed. Then, the pattern contour corresponding to the current pattern group to be processed is extracted, and the pattern to be merged is determined from the remaining patterns in the combined pattern. The pattern to be merged refers to a pattern that intersects or is tangent to at least one pattern in the current pattern group to be processed. Then, the pattern to be merged and its contour are taken as a new pattern group to be processed, and based on this new pattern group, the step of extracting the pattern contour corresponding to the current pattern group to be processed is triggered until there are no remaining patterns in the combined pattern. At this point, the terminal device can use the currently obtained pattern contour as the layout object corresponding to the combined pattern.
[0073] For example, suppose the composite image consists of two intersecting patterns, referred to as the first pattern and the second pattern, with all endpoints of the first pattern arranged in a first preset order and all endpoints of the second pattern arranged in a second preset order, where the first and second preset orders are reversed (e.g., clockwise and counter-clockwise). The terminal device can extract the outer contour of the composite pattern to obtain the layout object as follows: First, obtain all intersection points of the first and second patterns. Starting from any non-intersection point of the first pattern that is not within the second pattern, find the next endpoint according to the first preset order. If an intersection point is encountered during this process, switch to the second pattern and start from any non-intersection point of the second pattern that is not within the first pattern, finding the next endpoint according to the second preset order. Repeat the above operation until the found endpoint matches the starting point; the contour formed by all found endpoints is then determined as the outer contour. If the combined image consists of two or more intersecting patterns, then each pattern can be traversed, and after obtaining the merged contour of two intersecting patterns, the merged contour is used to merge with the next pattern until the outer contour of all patterns is obtained.
[0074] By employing the methods described above, different contour extraction techniques can be used to extract the outlines of intersecting patterns based on the diversity of user layout requirements. This results in more accurate layout objects that better meet the user's needs, enabling more precise layout and improving material utilization, thus significantly saving processing consumables. It is evident that by obtaining the positional relationships of various patterns in the reference processing image and extracting the outlines of patterns with different positional relationships using different methods, the actual layout objects that the user wants to arrange can be obtained more accurately. This allows for more accurate subsequent layout of these objects, thereby improving layout accuracy, material utilization, and saving consumables for the user.
[0075] S202. Acquire the target image and display it in the editable interface; wherein, the target image is used to present the material to be processed placed in the processing area of the processing equipment.
[0076] In a specific embodiment, the processing area refers to the area in the processing equipment where effective processing operations (such as engraving, cutting, printing, etc.) can be performed on the material. It is usually the working area defined by the movement limits of the processing head (such as laser head, cutter head, printing head, etc.) in different directions of movement.
[0077] One or more pieces of material to be processed can be placed within the processing area. These materials can be complete (with regular or irregular boundaries) or incomplete (with regular or irregular boundaries) materials with holes. The target image can be obtained by real-time imaging of the processing area, and at least one target image can be captured for each processing area. When there are two or more target images, they can be stitched together to show the complete processing area. Each target image can be used to display one or more pieces of material to be processed.
[0078] Normally, processing equipment captures only one target image for a single processing area. This single image is used to fully represent the material to be processed within the processing area, avoiding positioning errors in different processing positions due to pixel differences between images. If, due to special processing requirements, at least two target images must be captured to represent the processing area, priority should be given to ensuring that the material to be processed displayed in each target image has a complete boundary line; that is, one material to be processed should only be displayed in one target image.
[0079] It should be noted that, for ease of understanding, unless otherwise specified, the embodiments in this application are described using a processing area and a target image as an example.
[0080] S203. In response to the nesting confirmation operation for the nesting object, perform nesting processing on the nesting object.
[0081] In a specific embodiment, the goal of the nesting process is to determine the nesting position of the nesting object in the target image. The nesting position can be represented by a set of coordinates, which are typically determined with the target image as the coordinate system. Each coordinate point on the target image maps to a specific location on the processing area. After detecting a nesting confirmation operation on the nesting object, nesting can be performed using different nesting algorithms. Optionally, the nesting algorithms include heuristic algorithms, genetic algorithms, particle swarm optimization algorithms, or simulated annealing algorithms, etc.
[0082] S204. The target image displayed in the editable interface shows the layout objects after layout.
[0083] In a specific embodiment, the terminal device can arrange the layout objects and then display the arranged objects in an editable interface. Specifically, after determining the layout position of the layout objects, the layout objects can be placed in the layout position in the editable interface to simulate the processing position of the corresponding pattern to be processed. Optionally, since the layout object is the outline of the pattern to be processed, in order to achieve rapid processing to obtain a complete pattern or to provide users with more intuitive and complete visual feedback, the terminal device can also place the complete pattern corresponding to the layout object in the layout position in the editable interface; this is not limited here.
[0084] In this embodiment, by acquiring the layout object in the editable interface and the target image of the material to be processed placed in the processing area of the processing equipment terminal device, and displaying the target image in the editable interface, and then performing layout processing on the layout object after detecting the layout confirmation operation of the layout object, the layout object after layout is displayed in the target image displayed in the editable interface, a visual layout combining the real-time image of the material to be processed with the editable interface is realized. This allows users to intuitively preview and adjust the layout results in the context of a real processing area, ensuring the transparency and adjustability of the layout operation, thereby significantly improving the fit between the layout effect and processing requirements, greatly reducing material and time waste caused by trial and error, and improving overall processing efficiency.
[0085] Based on the above Figure 2In addition to the method shown, this application also proposes an implementation for arranging at least one arrangement object on a piece of material to be processed, and further proposes another method for arrangement. This method specifically points out that when there are multiple arrangement objects to be arranged, they can be arranged on the material to be processed in a certain arrangement order. Before arranging each arrangement object, the processable area and processable region of the material to be processed need to be updated based on the arrangement position of the previously arranged arrangement object, so that the arrangement objects after arrangement do not overlap (i.e., the arrangement positions of the arrangement objects on the material to be processed do not overlap).
[0086] For example, please see Figure 6 , Figure 6 A schematic flowchart of another method for sorting is shown above. This method can still be executed by the aforementioned computer equipment or processing equipment. For consistency and ease of understanding, the terminal device will still be used as an example here. Specifically, as... Figure 6 As shown, the method may include steps S601-S606:
[0087] S601. Obtain the layout objects in the editable interface. The number of layout objects can be one or more.
[0088] In this application embodiment, one or more layout objects in the editable interface can be obtained by referring to the relevant implementation of the aforementioned step S201, which will not be repeated here.
[0089] S602. Acquire the target image and display it in the editable interface; wherein the target image is used to present the material to be processed placed in the processing area of the processing equipment.
[0090] In this embodiment, only one piece of material to be processed is placed within the processing area, and the target image is used to present the material to be processed placed within the processing area. The material to be processed can be a perforated material or a non-perforated material; no limitation is made here. It is understood that the specific implementation of step S602 can follow the various implementations shown in the aforementioned step S202, and will not be repeated here.
[0091] S603. In response to the layout confirmation operation for the layout object, obtain the outline information of the layout object.
[0092] In one embodiment of this application, when there are two or more arrangement objects, the terminal device can first obtain the arrangement order of each arrangement object, then obtain the outline information of each arrangement object sequentially according to the arrangement order, and perform subsequent steps S604-S605 for the current arrangement object to determine the arrangement position of the arrangement object. In this case, the arrangement order can also be understood as the traversal order of the arrangement objects.
[0093] As an example implementation, the arrangement order of each arrangement object can be determined based on the processing area occupied by each arrangement object. Specifically, the processing area occupied by each arrangement object can be obtained first, and then the arrangement objects can be sorted in descending order of processing area, and the sorting result can be used as the arrangement order of each arrangement object. The processing area occupied can be the minimum material area required for processing determined based on the preset processing dimensions associated with the arrangement object, or it can be the display area currently on the editable interface. The display area can be understood as the interface area covered by the editable interface of the arrangement object.
[0094] By pre-configuring the processing dimensions of the layout objects, user errors in the editable interface will not affect the expected processing results, providing greater tolerance for mistakes and helping to improve user experience and ensure the accuracy of processing results. In this case, determining the occupied area based on the processing dimensions associated with the layout objects, and accordingly determining the layout order of each layout object, ensures that the determined layout order matches the user's expected layout logic, thereby guaranteeing the accuracy of the layout results. Furthermore, sorting based on the display area allows users to flexibly update the processing dimensions of each layout object in the editable interface, thereby improving the operability and convenience of layout.
[0095] As another exemplary implementation, the layout order of each layout object can also be determined during the layout process. In this case, the layout order can be determined based on the fitness of each layout object to be layoutd. It is worth mentioning that when actually obtaining the fitness of the un-layout layout object (i.e., the layout object to be layoutd), the pre-layout constraints of the un-layout layout object can be determined first, and a preliminary layout position of the un-layout layout object can be determined accordingly for pre-layout, so as to quickly calculate the fitness. Optionally, the pre-layout constraints may include: the un-layout layout object has the smallest ordinate in the mapped area, the un-layout layout object does not intersect with the already-layout layout object and has the smallest spacing, and the un-layout layout object is within the corresponding external critical polygon. Here, the corresponding external critical polygon specifically refers to the external critical polygon of the un-layout layout object relative to the already-layout layout object.
[0096] In practical applications, objects with the same visual image can be repeatedly arranged, the number of repetitions depending on the pre-set arrangement quantity for that object. Optionally, if the arrangement quantity is greater than one, an already arranged object can be arranged again as an unarranged object to obtain a second such object. In this case, unarranged objects can be identified by the following method: obtaining the total arrangement quantity and the already arranged quantity for each object; subtracting the total arrangement quantity from the already arranged quantity to obtain the remaining arrangement quantity for each object; and identifying objects with a non-zero remaining arrangement quantity as unarranged objects.
[0097] For example, the layout objects include layout object a, layout object b, and layout object c. The total layout quantity of layout object a is 10 pieces, and the number of pieces already laid out is 5 pieces. The total layout quantity of layout object b is 10 pieces, and the number of pieces already laid out is 6 pieces. The total layout quantity of layout object c is 10 pieces, and the number of pieces already laid out is 7 pieces. Therefore, the remaining layout quantities of layout objects a, b, and c are not 0. Thus, layout objects a, b, and c can all be used as un-layouted layout objects to calculate the corresponding fitness. If the total number of samples for sample object a is 10, and the number of samples already sampled is 10, and the same applies to sample objects b and c, then since the remaining number of samples for sample object a is 0, it is considered that sample object a has completed its sample task and does not need to be sampled again. However, the remaining number of samples for sample objects b and c is not 0. In this case, sample objects b and c can be used as unsampled sample objects to calculate the corresponding fitness.
[0098] Optionally, when the number of layouts is greater than 1, a corresponding number of layout objects of the same visual image can be generated in advance according to the number of layouts, and all of them can be used as layout objects for layout, so as to avoid repeatedly laying out layout objects that have been laid out as unlaid layout objects, thereby minimizing the logical complexity of layout.
[0099] Furthermore, when calculating the fitness of un-arranged objects, the material utilization rate, bounding box overlap area, and arrangement height of each un-arranged object in the target image can be obtained first. Then, based on the material utilization rate (denoted by U), bounding box overlap area (denoted by O), and arrangement height (denoted by L), the fitness (denoted by F) of each un-arranged object is determined, and the object with the highest fitness is selected as the next object to be arranged. For example, the terminal device can determine the fitness of the arrangement object according to the principle that there is a positive correlation between material utilization rate and fitness, a positive correlation between bounding box overlap area and fitness, and a negative correlation between arrangement height and fitness. For example, the calculation formula can be F = U + OL. Optionally, the terminal device can further obtain the weight parameter (denoted by k) of the material to be processed, and introduce the weight parameter to adjust the material utilization rate based on this calculation formula, so that the calculation formula can be such as F = kU + OL.
[0100] The weighting parameters of the materials to be processed can be determined based on their material type. Different material types can correspond to different weighting parameters; for example, higher-priced material types can correspond to higher weighting parameters. By setting the weighting parameters of the materials to be processed in this way, the weighting parameters can be used to measure the value of the materials (e.g., a higher weight indicates that the materials are more expensive). Therefore, a more compact layout of the materials is needed to improve material utilization.
[0101] For example, material utilization rate can be the ratio between the area occupied by the layout object on the material to be processed and the processable area of the material to be processed. The layout area occupied here can be specifically understood as the area occupied by the layout object after it is placed in the processable area of the material to be processed. It can be understood that the processable area of the material to be processed will be updated as the layout progress is updated. For example, the processable area of the i-th layout refers to the new processable area after subtracting the layout area occupied by the i-th layout from the processable area corresponding to the i-1-th layout at the beginning of the i-1-th layout, where i is a positive integer. The bounding box overlap area refers to the overlap area between the bounding box corresponding to the un-layout layout object and the bounding box of the already-layout layout object. The layout height refers to the total height of the existing layout positions in the material to be processed.
[0102] In this embodiment, the fitness of each un-laid-out object is calculated in a way that maximizes material utilization, maximizes the overlap area of the bounding box, and minimizes the layout height. Then, the un-laid-out object with the highest fitness is determined as the next layout object for layout. This can minimize material waste, give subsequent layout objects more space for layout, and minimize the overlap and conflict between layout objects during layout, thus ensuring the accuracy and rationality of the layout results.
[0103] It should be further explained that before calculating the fitness of the layout object, the layout object can be rotated at least one preset rotation angle. Then, the fitness corresponding to the layout object at each preset rotation angle can be obtained, and the maximum fitness calculated can be used as the fitness of the layout object. By obtaining the layout object at least one preset rotation angle, the un-layouted layout objects can have more layout angles on the target image. Compared with the method of directly laying out according to the default angle, it is beneficial to select the angle with better layout effect, thereby further improving the rationality and compactness of the layout, making more layout space available for subsequent layout objects, thereby improving material utilization and effectively saving consumables for users.
[0104] S604. Perform image recognition on the target image to obtain the area indication information of the processable area of the material to be processed in the target image.
[0105] In one embodiment of this application, when a terminal device needs to determine the area indication information corresponding to a material to be processed, it can do so by recognizing the material contour of the material to be processed in a target image. The material contour includes at least an outer contour and may further include an inner contour. The outer contour indicates the outer boundary line of the material to be processed, and the inner contour indicates the inner boundary line of the material to be processed. Specifically, the inner boundary line may be the boundary line of a material hole contained in the material to be processed. That is, the inner contour can be used to indicate the contour of a hole in the material to be processed.
[0106] When the terminal device needs to identify the material contour, it can first identify each closed edge line in the target image. Then, the closed edge line coinciding with the material boundary line of the material to be processed (referred to as the first closed edge line for easy distinction) is taken as the outer contour of the material to be processed. Conversely, the closed edge line within the material boundary line of the material to be processed (referred to as the second closed edge line for easy distinction) is taken as the inner contour of the material to be processed. In identifying closed edge lines, the target image can first be binarized to obtain a binarized image. Then, edge line recognition processing is performed on the binarized image to reduce the impact of image color information on the accuracy of edge line recognition.
[0107] Optionally, the terminal device can further perform contour erosion (i.e., shrink the area enclosed by the outer contour) on the identified outer contour to obtain a new outer contour, and / or perform contour expansion (i.e., enlarge the area enclosed by the hole contour) on the identified inner contour to obtain a new inner contour. The new outer contour and the new inner contour (if any) are then used as the material contour of the material to be processed. Through contour erosion and contour expansion, the actual processable area involved in the calculation can be reduced, thereby reducing the phenomenon that related patterns cannot be completely processed due to image recognition errors in the terminal device, and thus reducing material waste.
[0108] As an example implementation, when the identified material contour only includes the outer contour, the region indication information generated by the terminal device can be used only to describe the outer contour, so that the image area enclosed by the outer contour is regarded as a processable area; when the material contour includes both the inner and outer contours, the region indication information generated by the terminal device can be used to describe both the outer and inner contours, so that the image area within the outer contour and outside the inner contour is regarded as a processable area.
[0109] S605. Based on the currently acquired contour information and the area indication information corresponding to the material to be processed, determine the current layout position of the layout object in the target image so that the layout position is within the processable area.
[0110] The currently acquired contour information refers to the contour information of the current layout object mentioned in step S603. In one implementation of this application embodiment, when determining the layout position of the current layout object in the target image based on the currently acquired contour information and the area indication information corresponding to the material to be processed, the object contour of the current layout object can be determined first based on the contour information. Then, based on the area indication information and the object contour, it can be detected whether the current layout object can be placed entirely into the processable area indicated by the area indication information. If it can be placed entirely into the processable area, the layout position of the current layout object in the target image is determined based on the object contour and the area indication information.
[0111] Since step S604 indicates that the region indication information can be used to describe the outer contour, or to describe both the outer and inner contours, depending on whether the current material to be processed contains material pores, this implementation further proposes two methods to detect whether the current layout object can be placed entirely into the processable area indicated by the region indication information. Specifically, when the region indication information is only used to indicate the outer contour, detection can be performed by moving the object contour within the target image; "movement" specifically includes one or both translation and rotation. Then, if the object contour can be moved to be completely within the outer contour, it can be determined that the current layout object can be placed entirely into the processable area; otherwise, if the object contour cannot be moved to be completely within the outer contour, it can be determined that the current layout object cannot be placed entirely into the processable area.
[0112] Correspondingly, when the area indication information is used to describe the outer and inner contours, detection can be performed by determining the outer and inner critical polygons corresponding to the current nesting object. As an example, a Boolean difference operation can be performed on the inner and outer critical polygons to obtain the nestable area within the processable region. Then, if the current nesting object can be completely placed within the nestable area, it is determined that the current nesting object can be placed entirely within the processable region; otherwise, it is determined that the current nesting object cannot be placed entirely within the processable region. Compared to directly searching for the nesting position within the entire material to be processed, the nesting area obtained through the difference operation significantly narrows the search range, thereby reducing the computational load and improving nesting efficiency. Furthermore, a precise nesting area can accelerate the nesting process, making the entire processing flow smoother and more efficient, while ensuring that each nesting object is nested in the most suitable position and angle, maximizing space utilization and reducing raw material waste.
[0113] For example, the corresponding outer and inner critical polygons can be determined based on different movement trajectories of the same reference point on the object contour of the layout object. Specifically, such as Figure 7 When determining the critical polygon for interior alignment, a translation reference point can be selected from the object's contour. Then, in the target image, the object's contour is translated along the inner side of the outer contour indicated by the region indicator information. The closed trajectory formed by the translation reference point during the translation process is then used as the critical polygon for interior alignment of the layout object relative to the outer contour. Figure 8 When determining the critical polygon for external contact, the object contour can be translated along the outer side of the inner contour indicated by the region indication information in the target image. Then, the closed movement trajectory formed by the same translation reference point during the translation process can be used as the critical polygon for external contact of the layout object relative to the inner contour.
[0114] It is understandable that the material holes on the material to be processed can be one or more (the layout objects already laid out on the target image can be used as material holes), therefore, the determined outer critical polygons can also be one or more. When multiple outer critical polygons exist, they can be merged first (e.g., by finding the union of the contour points on the polygons) to determine the final outer critical polygon. Then, a Boolean difference operation is performed between the inner critical polygon and the outer critical polygon to obtain the layout area. Alternatively, before determining the outer and inner critical polygons corresponding to the layout object, the layout object can be rotated at one or more preset rotation angles to obtain a set of related outer and inner critical polygons based on each rotation angle (e.g., ...). Figure 9 The set of polygons is used to obtain the layout area at the rotation angle. The rotation angle can be 0°, meaning the layout object is not rotated.
[0115] In this context, it is understood that, in calculating fitness in this embodiment, it is necessary to calculate the fitness of the un-laid-out objects at each rotation angle, determine the maximum fitness, and then use the lay-out object at the rotation angle corresponding to the maximum fitness (such as the lay-out object after rotating 90°) for the construction of the outer and inner critical polygons. That is, the outer critical polygon corresponding to the next object to be laid out includes: the outer critical polygon of the lay-out object after rotating 90° relative to the already laid-out object (or material hole).
[0116] To facilitate a clear understanding of the implementation principles of the above two scenarios, the following explanation is provided with specific examples: For instance, suppose that the material to be processed in the target image has A and B already arranged, and C and D not arranged, and the preset rotation angles include 0°, 90° and 180°. The terminal device can calculate the fitness of C after rotation of 0°, C after rotation of 90°, C after rotation of 180°, D after rotation of 0°, D after rotation of 90°, and D after rotation of 180°, respectively, thus obtaining 6 fitness values. If the maximum fitness value is the fitness value of C after rotation of 90°, then the next object to be arranged is C. At this time, the critical polygons of the unarranged object C after rotation of 90° relative to the arranged object A and the critical polygons of the unarranged object C after rotation of 90° relative to the arranged object B are obtained, and the union of these two critical polygons is calculated. Then, the difference between the inner critical polygon deformation corresponding to the unarranged object C after rotation of 90° and the union is calculated to obtain the area to be arranged. Then, the minimum ordinate point in the area to be arranged is taken as the arrangement position, and the next object to be arranged is rotated according to the preset rotation angle of 90° corresponding to the maximum fitness value, and finally placed at the minimum ordinate point in the area to be arranged. During placement, the lower left corner of the next object to be arranged after rotation can be used as a reference point to align with the minimum vertical coordinate point in the area to be arranged until the object is completely within the area to be arranged. The current position of the object can then be used as the layout position.
[0117] In other words, during the nesting process, if the terminal device determines the outer and inner critical polygons of the nesting object based on a certain rotation angle, and detects that the current nesting object can be placed entirely within the processable area, then a planar coordinate system can be constructed using the target image as the coordinate plane. The minimum ordinate of the nestable area at that rotation angle is then obtained in the planar coordinate system, and the minimum abscissa of the nestable area is determined on the horizontal line formed by the minimum ordinate. This yields the endpoint coordinates formed by the minimum ordinate and minimum abscissa. The current nesting object is then translated on the target image until the translation reference point is at the position indicated by the endpoint coordinates on the target image. This gives the nesting position of the current nesting object in the target image, ensuring that the nesting object is completely within the processable area of the material to be processed. By placing the nesting object on the material to be processed using the minimum ordinate as a reference, the nesting height can be minimized, thereby reducing material waste.
[0118] When there are multiple objects to be arranged, after arranging the current object, it is necessary to update the processable area of the material to be processed based on the arrangement position of the current object in the target image, so that the arrangement position of the arranged object is outside the updated processable area, thereby avoiding the arrangement position of the next object from being the same as the current object.
[0119] It should be further explained that, in one embodiment of this application, the layout constraints followed when determining the layout position of the layout objects may include: (1) the un-layout layout objects do not intersect with the already-layout layout objects (or material holes) and the spacing is minimal; (2) the un-layout layout objects are located outside the corresponding outer critical polygon, which can be an outer critical polygon determined based on the un-layout layout objects at any rotation angle. By setting the constraint condition of "located outside the corresponding outer critical polygon", the new layout position can be located on or outside the contour of the already-layout layout objects (or material holes), thereby ensuring that each layout object can be fully processed and avoiding overlap of the layout positions of each layout object.
[0120] S606. Display the nested objects after nesting in the target image shown in the editable interface.
[0121] In one implementation of this application, if the arrangement position of the arrangement object is determined, the arrangement object at the arrangement position can be displayed in the target image displayed in the editable interface; if the arrangement position of the arrangement object is not determined, a prompt message indicating arrangement failure can be generated based on the arrangement object, and the prompt message can be displayed on the editable interface to remind the user to take appropriate action.
[0122] exist Figure 6 In the illustrated embodiment, by acquiring target images in real time and identifying processable areas (such as avoiding material defects or unusable edges), and then combining this with precise contour analysis of the layout objects, the optimal position of each layout object in the material is dynamically calculated, ensuring that they are closely arranged within the processable area and occupy minimal space. This process replaces traditional manual trial and error with automated algorithms, not only avoiding material waste caused by insufficient human experience (such as excessive scrap), but also allowing users to intuitively confirm the rationality of the layout through real-time visualization of the layout results, reducing the time cost of repeated adjustments. In addition, the dynamic adaptation capability based on image recognition can flexibly cope with irregular material shapes or local unusable conditions, further enhancing the adaptability of layout in complex scenarios, ultimately achieving the dual goals of efficient resource utilization and optimized production processes.
[0123] Through application Figure 6 For specific effects that may be produced, please refer to the examples. Figure 10 , Figure 10 This is an exemplary embodiment of the present application illustrating the application before and after sorting. Figure 10 The image on the left shows the arrangement of the objects before layout, while the image on the right shows the arrangement of the objects after layout according to the method provided in this application. It is evident that by adopting... Figure 6 The illustrated layout method employs a targeted approach to extract the contours of graphics with different pattern positional relationships. This allows for more accurate identification of the layout objects the user actually intends to arrange, facilitating more precise layout of those objects. Furthermore, by maximizing material utilization, maximizing the overlap area of bounding boxes, and minimizing the layout height (such as...), the method achieves optimal results. Figure 10 The fitness of each un-laid-out object is calculated by using the height of the 1001 mark in the middle. Then, the un-laid-out object with the highest fitness is determined as the next object to be laid out. This can reduce the overlap and conflict between the laid-out objects and minimize space waste, so that subsequent graphics have more space for laying out, thereby improving the utilization rate of laying materials and saving consumables for users.
[0124] Based on the above Figure 2 and Figure 6 In addition to the method shown, this application also proposes an implementation for arranging at least one sampling object on multiple pieces of material to be processed, and based on this, proposes another method for sampling. This method specifically points out that the number of materials to be processed can be at least two pieces. In this case, when sampling each sampling object, the materials to be processed can be used for sampling sequentially according to a certain material processing order. Before sampling the next sampling object, the processing order of each material to be processed needs to be re-determined. The sampling method for each piece of material to be processed can be as follows: Figure 6 The implementations of S602 to S605 are shown.
[0125] For example, please see Figure 11 , Figure 11 A schematic flowchart of another method for sorting is shown above. This method can still be executed by the aforementioned computer equipment or processing equipment. For consistency and ease of understanding, the terminal device will still be used as an example here. Specifically, as... Figure 11 As shown, the method may include steps S1101-S1107:
[0126] S1101. Obtain the layout objects in the editable interface. The number of layout objects can be one or more.
[0127] In the embodiments of this application, one or more layout objects in the editable interface can be obtained by referring to the relevant implementation of the aforementioned steps S201 or S601, which will not be repeated here.
[0128] S1102. Obtain the target image and display it in the editable interface; wherein the target image is used to present the material to be processed placed in the processing area of the processing equipment, and the number of the material to be processed is at least two pieces.
[0129] In this embodiment, at least two pieces of material to be processed are placed in the processing area, and each piece of material to be processed can be displayed in the target image. The material to be processed can be a perforated material or a non-perforated material; no limitation is made here. It is understood that the specific method of obtaining the target image can follow the various implementation methods shown in step S202 above, and will not be repeated here.
[0130] S1103. In response to the layout confirmation operation for the layout object, obtain the outline information of the layout object.
[0131] In one implementation of this application, the method for obtaining the outline information of the layout object can be determined by referring to the relevant implementation of the aforementioned step S603, and will not be repeated here.
[0132] In another implementation, when there are multiple arrangement objects, the processing area occupied by each arrangement object and the processable area of each piece of material to be processed on the target image can be obtained. Then, the arrangement order of the materials to be processed is determined according to the order of the processable areas from largest to smallest. Based on the determined arrangement order and the processing area occupied by each arrangement object, an intelligent sorting algorithm is called to sort the multiple arrangement objects under the constraint of a preset sorting target to obtain the arrangement order of the arrangement objects. Based on this, the contour information of each arrangement object is obtained one by one, and after obtaining the contour information, steps S1104 to S1106 (or S1104 to S1107) are triggered. The intelligent sorting algorithm can be a particle swarm optimization algorithm, a genetic algorithm, a simulated annealing algorithm, etc.; the preset sorting target can be: after arranging multiple arrangement objects according to the sorting order, the proportion of space occupied by the arranged arrangement objects in the target image is less than a preset threshold.
[0133] In other words, in this embodiment of the application, the terminal device can acquire the outline information of a layout object at a time, and after acquiring the outline information of the layout object, execute the subsequent steps S1104 to S1106 (or S1104 to S1107).
[0134] S1104. Perform image recognition on the target image to obtain the area indication information of the processable area of the material to be processed in the target image.
[0135] In this embodiment, since the target image displays at least two pieces of material to be processed, after recognizing the target image, region indication information corresponding to each of the at least two pieces of material to be processed can be obtained. The definition of the region indication information of each piece of material to be processed and the method of recognizing the target image can be found in the relevant embodiments of the aforementioned step S604, and will not be described in detail here.
[0136] S1105. Obtain the processable area of each piece of material to be processed in the target image, and traverse the area indication information of each piece of material to be processed in ascending order of processable area.
[0137] In the embodiments of this application, it is understood that the processable area of each piece of material to be processed in the target image is not constant, and it can decrease as the number of corresponding arranged objects on the material increases. That is to say, in the target image, the more arranged objects are arranged on a piece of material to be processed, the smaller the processable area of that material.
[0138] S1106. Based on the currently acquired contour information and the currently traversed area indication information, determine the current layout position of the layout object in the target image.
[0139] In the embodiments of this application, the principle for determining the sorting position can be as follows: Figure 6 As described in the relevant embodiments, it will not be detailed here. It can be understood that if the layout position of the current layout object is determined based on the currently traversed area indication information, the layout position is usually located on the material to be processed corresponding to the area indication information.
[0140] It should be specifically noted that after determining the layout position of the current layout object based on the currently traversed area indication information, step S1103 can be triggered to specifically obtain the outline information of the next layout object to determine its layout position. If the layout position of the current layout object is not determined based on the currently traversed area indication information, the area indication information of the next piece of material to be processed can be traversed until a preset material traversal stop condition is met. The material traversal stop condition includes: determining the layout position corresponding to the current layout object, or the currently traversed area indication information being the area indication information of the last piece of material to be processed.
[0141] S1107. Display the nested objects after nesting in the target image shown in the editable interface.
[0142] In this embodiment of the application, the implementation of step S1107 is the same as that of the aforementioned steps S204 and S606, and will not be repeated here.
[0143] Figure 11 The illustrated method embodiment can be used to arrange one or more arrangement objects based on multiple pieces of materials to be processed. Specifically, for each arrangement object, the arrangement is attempted in ascending order of the processable area of the materials to be processed to obtain the arrangement position of the arrangement object. The appearance of each material to be processed is presented in the same target image, which can be obtained by photographing the processing area. By acquiring the target image and using image recognition technology for region identification, the boundaries of the processable area can be accurately located, avoiding errors from manual measurement. Moreover, based on the arrangement strategy of prioritizing smaller processable areas, the order in which each material to be processed is used for arrangement can be determined, allowing smaller area materials to be used first, thereby effectively reducing the probability of scrap material generation. Combined with the dynamic space ratio optimization algorithm in steps S1103-S1106, it can be ensured that each determined arrangement position achieves local optimization of overall material utilization. Simultaneously, by simulating and displaying the arrangement results of the corresponding arrangement objects within an editable interface, a visual interactive display of the arrangement objects and the target image can be achieved, which can help users accurately control the arrangement process and reduce the professional technical requirements for users. Furthermore, the material to be processed can be either porous or non-porous, making... Figure 11 The illustrated method embodiment can provide a solution for mixed layout of materials of different specifications while ensuring layout accuracy. It can not only significantly improve material utilization efficiency, but also shorten the layout design cycle.
[0144] Based on the above-described method embodiments, this application also exemplarily proposes a processing method applicable to the processing system in the foregoing embodiments. The terminal device can perform the relevant technical processing involved in the foregoing method embodiments to determine the placement position of the sampled object on the corresponding processing material, and to maximize or achieve the expected utilization rate of the processing material after processing the sampled object at that placement position. After determining the sampled object, the terminal device can generate a processing instruction based on the sampled object and its corresponding placement position, and send the processing instruction to the processing equipment communicating with the terminal device. Upon receiving the processing instruction, the processing equipment controls the processing head to move within the processing area of the processing equipment, performing processing on the material to be processed placed within the processing area.
[0145] In some embodiments, the processing method can be implemented by a processing device, which includes an editable interface. Through interactive processing within the editable interface and the related technical processing involved in the aforementioned method embodiments, the processing device performs a layout process on the layout objects within the editable interface, determines the layout position of the layout objects on the corresponding processing material, and maximizes or achieves the expected utilization rate of the processing material after processing the layout objects at that layout position. After determining the layout objects, the processing device can generate processing instructions based on the layout objects and their corresponding layout positions, and control the processing head to move within the processing area of the processing device based on the processing instructions to perform processing on the material to be processed placed within the processing area.
[0146] It should be noted that when the processing method is executed through any of the above embodiments, the editable interface can display processing data for reference during the processing process. This processing data can include one or both of image data and text data. For example, text data can be various processing parameters, such as the number of processing operations, processing time, emission power, emission area, moving speed, etc.; image data can be processing reference diagrams (containing one or more patterns), photographed images of the processing area, material images of the material to be processed, simulated layout diagrams of each layout object within the processing area, descriptive diagrams of the layout objects (such as outline diagrams, scaled diagrams, rotated diagrams, mirrored diagrams, etc.), etc. For example, a schematic diagram of the editable interface can be found here. Figure 12 .like Figure 12 The editable interface can include a parameter configuration area (such as...) Figure 12 (as shown in 1201) and the processing visible area (such as...) Figure 12 (As shown in Figure 1202). The parameter configuration area is used to input or select processing parameters to convey processing requirements. The processing visibility area can be used to display a real-world image of the processing area, and can further simulate the placement of various sample objects on the real-world image.
[0147] Based on the above processing method, this application embodiment further provides a layout process in a specific processing scenario, so that those skilled in the art can more clearly understand and more conveniently apply the technology provided by this application embodiment. In the illustrative scenario of this application embodiment, assuming that N pieces of materials to be processed are placed in the processing area, if it is necessary to use these materials to perform layout before processing (such as cutting) the various patterns in the reference processing drawing, it can be exemplarily followed as follows: Figure 13 The arrangement process shown is used to achieve this.
[0148] Specifically, such as Figure 13 As shown, you can first import the reference machining drawing (i.e., ...) into the editable interface. Figure 13The image data to be processed is displayed in the processing view area of the editable interface, and the captured image of the current processing area is displayed (for example, as shown in the image data to be processed). Figure 14 The captured image can be understood as the aforementioned Figure 2 , 6 Alternatively, the target image mentioned in 11 can be used to present the various pieces of material to be processed. Optionally, a parameter configuration area can also be displayed in the editable interface, allowing relevant personnel to configure parameters based on processing requirements.
[0149] Optionally, configurable parameters include pattern recognition parameters and size parameters. Pattern recognition parameters include: whether pattern rotation is allowed, minimum gap between patterns, whether pattern combination attributes are automatically canceled, and whether included patterns are treated as a whole, etc. Size parameters include: the ratio of the number of image pixels to the movement length (e.g., 3 pixels: 1 mm), the scaling ratio of the processing area to the captured image (e.g., 50:1), etc. Here, "3 pixels: 1 mm" means that every 3 pixels in the captured image corresponds to 1 mm of head movement in the processing area; the scaling ratio "50:1" means that 50 units of length in the processing area correspond to 1 unit of length in the captured image; for example, the unit length can be 1 mm.
[0150] Then, the captured images can be preprocessed (e.g., angle correction, image enhancement) to improve image quality, and then the outer and inner contours (if any) of each processed material can be identified based on the preprocessed images. As an example, the captured images can first be angle corrected, and then binarized using the Otsu thresholding method to obtain a binarized image. Figure 14 The binarized image can be like Figure 15 As shown in the image, this highlights the machinable area and the material void area of the material to be processed within the processing area. The area enclosed by the outer and inner contours of each piece of material (i.e., the area inside the outer contour and outside the inner contour) is the machinable area of that material, while the area enclosed by the inner contour is the material void area. Optionally, to make the visual layout process presented to the user more aesthetically pleasing, the extracted outer and inner contours can be visualized on a canvas of the same size as the binarized image (the resulting image can be shown in the image). Figure 16 (As shown).
[0151] It is worth mentioning that both the outer and inner contours of the processed material can be represented by contour point sets. The outer contour of a piece of processed material can be represented by an outer contour point set, and the inner contour can be represented by an inner contour point set. A contour point set refers to a collection of multiple contour points (such as points on the outer contour or points on the inner contour), where each contour point indicates the coordinate position of a pixel on the corresponding contour relative to the processing area. In this way, image data can be converted into ordinary numerical data for storage, reducing the complexity of data access and improving processing efficiency to some extent.
[0152] Furthermore, a certain proportion of contour erosion (i.e., shrinking the area enclosed by the outer contour) can be performed on the identified outer contour to obtain a new outer contour, and a certain proportion of contour expansion (i.e., expanding the area enclosed by the hole contour) can be performed on the identified hole contour to obtain a new hole contour. Then, a contour map of the processed material can be generated based on the new outer contour and the new hole contour.
[0153] Furthermore, after detecting the reference processing image, it can be used as image data to be processed for image recognition. Specifically, parameter configuration information can be obtained first, and then each layout object in the image data can be extracted based on the parameter configuration information. Assuming that the parameter configuration information includes the parameter "cancel pattern combination attribute", then when extracting layout objects based on the parameter configuration information, the combination attribute of each combined pattern in the reference processing image can be canceled first, so that there is no correlation between the patterns in the reference processing image, and then the pattern outline of each pattern can be extracted independently as the layout object, or each pattern can be directly used as the layout object.
[0154] It is worth mentioning that, in one implementation, each parameter in the parameter configuration information can be associated with a corresponding application priority. The principle for configuring this application priority is to avoid logical inconsistencies in the image processing process due to configuration errors by technicians. For example, suppose the parameter configuration information includes parameter 1 "automatically cancel pattern combination attributes" and parameter 2 "treat combined patterns as a whole", and parameter 1 has a higher application priority than parameter 2. Then, the illustrative process for extracting layout objects based on the parameter configuration information can be as follows: Under the constraint of parameter 1, cancel the combination attributes of each combined pattern in the reference processing image, and then extract layout objects based on each pattern separately. In this case, since parameter 1 has already restricted the independent processing of each pattern, and the independent processing of each pattern has been completed, there are no longer combined patterns in the reference processing image, and the constraint effect of parameter 2 cannot take effect here.
[0155] Furthermore, the processing area occupied by each layout object can be calculated (see the relevant embodiments of step S603 above for details), and then the layout objects can be sorted based on the processing area occupied by each layout object (i.e. Figure 13 The process involves determining the arrangement order of the arrangement objects ("determine the arrangement order of the arrangement objects") to obtain the arrangement order of the arrangement objects. Each arrangement object is then processed sequentially according to this order to ensure the orderly processing. After determining the arrangement position of the arrangement objects, the arrangement objects at the corresponding positions can be displayed in the editable interface. They can also be further imported into the processing process to drive the processing equipment to process based on the arrangement positions. Optionally, the arrangement of each arrangement object can be arranged in ascending order of processing area, or it can be achieved through an intelligent sorting algorithm that combines the processable area of each material to be processed.
[0156] As an exemplary implementation, suppose there are m layout objects, which are sorted from largest to smallest processing area and denoted as e1 to em. There are also n materials to be processed, which are arranged from smallest to largest processing area and denoted as a1 to an. Where m and n are both positive integers, the terminal device can implement the layout according to the principle shown in steps (1)-(4) below:
[0157] (1) Prioritize material a1 with a small area and object e1 with a large area to be arranged, and rotate and translate them. Try to put the large object e1 into material a1 by rotating and / or translating, while avoiding holes and already arranged objects. (2) When the large object e1 can be put into material a1, after placing e1, deduct the area of e1 and update the area information of material a1. (3) If the large object e1 cannot be put into material a1, continue to try materials with even larger areas a2...an. If the subsequent materials can be put into object e1, update the corresponding area information according to step (2). (4) If all materials cannot be put into object e1, it means that object e1 cannot be arranged, and the user can be informed by outputting a prompt message that it cannot be arranged.
[0158] In this embodiment, by acquiring and displaying real images of the processed materials in real time, users can directly observe the actual form of the materials (such as shape, size, defect areas, etc.) in an editable interface. Combined with the dynamic adjustment of the nesting objects, a "what you see is what you get" visual nesting operation is achieved. After the user confirms the nesting, the program automatically calculates the optimal position of the nesting objects in the target image and displays the nesting results visually. This avoids the errors caused by relying on abstract data in traditional manual nesting and optimizes material utilization through intelligent algorithms, reducing waste of scrap materials. Furthermore, this embodiment simplifies the user operation process and shortens the nesting planning time through the combination of interface interaction and automated processing. It is particularly suitable for complex materials or high-precision processing scenarios, ultimately achieving the dual goals of resource conservation and improved production efficiency.
[0159] Based on the aforementioned method embodiments, this application also provides corresponding apparatus, please refer to [link to relevant documentation]. Figure 17 . Figure 17 This is a schematic diagram of a sorting device for processing provided in this application. The device can be mounted on computer equipment or processing equipment and is used to achieve the above-mentioned... Figure 3 , Figure 6 and Figure 10 Some or all of the functions described in the method embodiments. For example... Figure 17 The device may include an acquisition unit 1701, a display unit 1702, and a sorting unit 1703, wherein:
[0160] Acquisition unit 1701 is used to acquire the layout object in the editable interface;
[0161] Display unit 1702 is used to acquire a target image and display the target image within the editable interface; wherein the target image is used to present the material to be processed placed in the processing area of the processing equipment;
[0162] The sorting unit 1703 is configured to perform sorting processing on the sorting object in response to a sorting confirmation operation for the sorting object;
[0163] The display unit 1702 is also used to display the arranged objects in the target image displayed in the editable interface after the arrangement.
[0164] In one implementation, the number of the sorting objects is one or more; when the sorting unit 1703 performs sorting processing on the sorting objects in response to a sorting confirmation operation for the sorting objects, it may specifically be used to perform:
[0165] In response to the layout confirmation operation for the layout object, the outline information of the layout object is obtained;
[0166] Image recognition is performed on the target image to obtain region indication information of the processable area of the material to be processed in the target image;
[0167] Based on the currently acquired contour information and the area indication information corresponding to the material to be processed, the current layout position of the layout object in the target image is determined so that the layout position is within the processable area.
[0168] In another embodiment, when there are multiple arrangement objects, after the arrangement unit 1703 determines the current arrangement position of the arrangement object in the target image, the arrangement unit 1703 can also be used to perform:
[0169] The processable area of the material to be processed is updated based on the layout position, so that the layout position of the already laid-out object is outside the updated processable area.
[0170] In another embodiment, when the sorting unit 1703 performs image recognition on the target image to obtain region indication information of the processable area of the material to be processed in the target image, it may specifically perform the following:
[0171] Identify the material outline of the material to be processed in the target image;
[0172] When the material contour only includes the outer contour, region indication information is generated to describe the outer contour, so that the image region enclosed by the outer contour is used as the processable region indicated by the region indication information.
[0173] or,
[0174] When the material contour includes an inner contour and an outer contour, region indication information is generated to describe the outer contour and the inner contour, so that the image region inside the outer contour and outside the inner contour is used as the processable region indicated by the region indication information; wherein, the inner contour is used to indicate the contour of the material hole contained in the material to be processed.
[0175] In another embodiment, the sorting unit 1703, when identifying the material outline of the material to be processed in the target image, may specifically perform the following:
[0176] Edge line recognition processing is performed on the target image to determine each closed edge line in the target image;
[0177] If there exists a first closed edge line that coincides with the material boundary line of the material to be processed, then the first closed edge line is taken as the outer contour of the material to be processed.
[0178] If there exists a second closed edge line within the material boundary line of the material to be processed, then the second closed edge line is taken as the inner contour of the material to be processed.
[0179] In another embodiment, when the nesting unit 1703 determines the nesting position of the current nesting object in the target image based on the currently acquired contour information and the area indication information corresponding to the material to be processed, it can specifically perform the following:
[0180] The object contour of the current layout object is determined based on the contour information;
[0181] Based on the area indication information and the object outline, it is detected whether the current layout object can be placed entirely into the processable area indicated by the area indication information;
[0182] If the entire object can be placed into the processable area, the current layout position of the object in the target image is determined based on the object outline and the area indication information.
[0183] In another embodiment, when the area indication information is used only to describe the outer contour, the nesting unit 1703, when used to detect whether the current nesting object can be placed entirely into the processable area indicated by the area indication information based on the area indication information and the object contour, can perform the following:
[0184] Move the object outline within the target image;
[0185] If the object outline can be moved to be completely within the outer outline, then it is determined that the current layout object can be placed entirely into the processable area.
[0186] If the object outline cannot be moved to be completely within the outer contour, then the current layout object cannot be placed entirely into the processable area.
[0187] In another embodiment, when the area indication information is used to describe the outer and inner contours, the nesting unit 1703, based on the area indication information and the object contour, may further perform the following specific actions when detecting whether the current nesting object can be placed entirely into the processable area indicated by the area indication information:
[0188] Select a translation reference point from the object's outline;
[0189] Based on the object outline, the translation reference point, and the outer outline described by the region indication information, the in-line critical polygon of the current layout object relative to the outer outline is determined;
[0190] Based on the object outline, the translation reference point, and the inner outline described by the region indication information, the current layout object is determined to be the outer critical polygon relative to the inner outline.
[0191] Based on the inner critical polygon and the outer critical polygon, it is detected whether the current layout object can be placed entirely into the processable area indicated by the area indication information.
[0192] In another embodiment, when the layout unit 1703 determines the layout position of the current layout object in the target image based on the object outline and the region indication information, it may specifically perform the following:
[0193] A planar coordinate system is constructed using the target image as the coordinate plane;
[0194] Based on the inner critical polygon and the outer critical polygon, the area that can be laid out within the processable area is determined.
[0195] Obtain the minimum ordinate of the sortable area in the plane coordinate system, and determine the minimum abscissa of the sortable area in the horizontal line formed by the minimum ordinate, so as to obtain the endpoint coordinates formed by the minimum ordinate and the minimum abscissa.
[0196] The current layout object is positioned in the target image by translating it onto the target image until the translation reference point is at the position indicated by the endpoint coordinates on the target image.
[0197] In another embodiment, the number of materials to be processed is at least two pieces, and each piece of material to be processed corresponds to a region indication information; when the layout unit 1703 determines the layout position of the current layout object in the target image based on the currently acquired contour information and the region indication information corresponding to the materials to be processed, it can be specifically used to perform:
[0198] Obtain the processable area of each piece of material to be processed in the target image;
[0199] Traverse the area indication information of each piece of material to be processed in ascending order of processable area;
[0200] Based on the currently acquired contour information and the currently traversed region indication information, the current layout position of the layout object in the target image is determined.
[0201] In another embodiment, when there are multiple layout objects, the outline information of the layout objects is obtained in traversal order; the layout unit 1703 can also be used to perform:
[0202] Obtain the processing area occupied by each layout object, and sort the layout objects in descending order of processing area to obtain the traversal order;
[0203] or,
[0204] Obtain the processing area occupied by each layout object, and the processable area of each piece of material to be processed on the target image;
[0205] Based on the obtained arrangement order of each processable area and the processing area occupied by each layout object, an intelligent sorting algorithm is invoked to sort the multiple layout objects under the constraint of a preset sorting target, thereby obtaining the traversal order.
[0206] In another embodiment, when the layout unit 1703 determines the layout position of the current layout object in the target image based on the currently acquired contour information and the currently traversed area indication information, it may specifically perform the following:
[0207] If the arrangement position of the current arrangement object is not determined based on the currently traversed area indication information, the area indication information of the next piece of material to be processed is traversed until the preset material traversal stop condition is reached; wherein, the material traversal stop condition includes: determining the arrangement position corresponding to the current arrangement object, or, the currently traversed area indication information is the area indication information of the last piece of material to be processed.
[0208] In another embodiment, when the layout unit 1703 determines the layout position of the current layout object in the target image based on the currently acquired contour information and the currently traversed area indication information, it may specifically perform the following:
[0209] If the current arrangement position of the arrangement object is not determined, a prompt message indicating arrangement failure is generated based on the current arrangement object.
[0210] The prompt message is displayed on the editable interface.
[0211] In another embodiment, when the acquisition unit 1701 acquires the layout object in the editable interface, it may specifically perform the following:
[0212] Obtain a processing reference image from the editable interface, wherein the processing reference image contains at least one pattern;
[0213] Image recognition is performed on the processing reference image to obtain the pattern positional relationship between each pattern in the processing reference image;
[0214] Based on the positional relationship of the patterns, the pattern contour is extracted from the processing reference image to obtain at least one layout object.
[0215] In another embodiment, the pattern positional relationship includes an intersection relationship; when the acquisition unit 1701 extracts the pattern contour from the processing reference image according to the pattern positional relationship to obtain at least one layout object, it may specifically perform the following:
[0216] Identify a combined pattern from patterns that have an intersection relationship, wherein the combined pattern consists of at least two patterns that have a combination attribute, and each pattern in the combined pattern intersects or is tangent to at least one other pattern in the combined pattern;
[0217] Obtain the pattern layout strategy associated with the processing reference image, and extract the pattern outline of the combined pattern based on the pattern layout strategy to obtain the pattern outline of the corresponding layout object; wherein, the pattern layout strategy is used to indicate independent layout after canceling the combination attribute, or overall layout with the combination attribute.
[0218] In another embodiment, the above-described apparatus may further include a control unit 1704, which is configured to perform the following after displaying the arranged objects in the arrangement:
[0219] In response to the processing confirmation operation for the sorting object, a processing instruction is generated based on the sorting position of the sorting object and the sorted sorting object after sorting;
[0220] The processing instruction is sent to the processing equipment to process the material to be processed in the processing area of the processing equipment to obtain the processed sample object.
[0221] It is worth mentioning that, Figure 17 The various units in the illustrated device can be individually or entirely combined into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. In other words, the above units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the aforementioned device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.
[0222] According to another embodiment of this application, the following can be executed by running on a computing device including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). Figure 3 , Figure 6 as well as Figure 10 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 17 The apparatus shown herein, and the method for implementing the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable storage medium, loaded onto the aforementioned apparatus via the computer-readable storage medium, and executed therein.
[0223] Embodiments of this application also provide a processing system, including:
[0224] A processing device includes a slide rail, a processing head, a processing platform, communication components, and a controller; wherein the processing head is slidably mounted on the slide rail; the processing platform includes a processing area for placing the material to be processed, and the processing head is movable on the processing area; and...
[0225] A terminal device that communicates with the processing equipment, the terminal device implementing the sorting method for processing provided in the above embodiments.
[0226] Another aspect of this application provides a storage medium, which is a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the aforementioned nesting method for processing. This computer-readable medium may be included in the processing equipment described in the above embodiments, or it may exist independently and not assembled into the processing equipment.
[0227] Embodiments of this application also provide a processing device, in one feasible implementation of which the processing device may include a slide rail;
[0228] A processing head, which is slidably disposed on the slide rail, is used to perform at least one of laser processing, cutting processing or printing processing on the material to be processed;
[0229] A processing platform, the processing platform including a processing area for placing the material to be processed, and the processing head being movable on the processing area;
[0230] Communication component, the communication component being used to receive the aforementioned Figure 2 or Figure 6 or Figure 10 The steps of the nesting method for processing shown in the figure are used to obtain the nesting position of the nesting object and generate the processing instructions.
[0231] A controller, based on the processing instructions, controls the processing head to move on the slide rail to process the material to be processed placed in the processing area.
[0232] In another feasible implementation, the processing equipment may include a processing equipment base plate and a processing head. The processing equipment base plate includes a processing area for placing materials, and the processing head is used to move within the processing area to perform processing. The processing equipment can communicate with a processing control device (such as the aforementioned computer device), which is used to execute the aforementioned nesting method for processing. Exemplarily, the hardware structure of the processing equipment can be found in [reference needed]. Figure 18 .
[0233] like Figure 18 As shown, the processing equipment includes a housing, a processing equipment base plate 40, a processing head 50, a laser tube 30, a slide rail 80, a communication component 20, and a controller 60. The processing equipment base plate 40 includes a processing area 41 for placing the material to be processed. The housing includes an upper shell 90 and a lower shell 70. The processing head 50 is slidably mounted on the slide rail 80. The communication component 20 is used to receive the layout object or layout position obtained after the steps of the method provided in the above embodiments. The controller 60 controls the movement of the processing head 50 on the slide rail 80 based on the layout position and layout object to process the surface of the material to be processed. The communication component 20 and the controller 60 are installed inside the backplate of the laser tube 30. Figure 18 It is not visible from a mid-range perspective, so it is shown by connecting the boxes with dashed lines.
[0234] In one embodiment, a reflector 11 is provided between the processing head 50 and the laser tube 30. The light beam generated by the laser tube 30 is reflected by the reflector 11 to the processing head 50 and then emitted after reflection, focusing and other processes to process the workpiece.
[0235] In one embodiment, the processing head 50 can generate a light spot. In another embodiment, the light spot can be generated by other components, such as the laser tube 30 of a carbon dioxide laser tube, and enter the beam emitting device through the reflector 11, etc., and finally exit through the processing head 50 to process the workpiece. The processing head can emit laser light, but it can do more than just emit laser light.
[0236] In one embodiment, the housing of the computer numerical control machine, i.e., Figure 18 The upper shell 90 and the bottom shell 70, as shown, together enclose an internal space for accommodating processed materials. The upper shell 90 and the bottom shell 70 can be detachably or fixedly connected, or they can be a single integral structure. In one embodiment, the upper shell 90 is also provided with a rotatable cover plate, which the operator can open or close to access the internal space for inserting or removing processed materials. Through the blocking and / or filtering effect of the upper shell 90 and the bottom shell 70, laser leakage from the processing head 50 during operation can be prevented from causing personal injury to the operator.
[0237] In addition, such as Figure 18 It can also be seen that the slide rail 80 is disposed in the aforementioned internal space, and the processing head 50 is mounted on the slide rail 80. The slide rail 80 can be an X-axis or Y-axis guide rail, which can be a linear guide rail or a guide rail in which an optical axis and a roller slide together, etc., as long as it can drive the processing head 50 to move and process on the X-axis. The processing head 50 can also be provided with a Z-axis moving track for focusing by moving in the Z-axis direction before and / or during processing.
[0238] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0239] Another aspect of this application provides a program product including computer instructions, wherein when a processor reads and executes the computer instructions, the sorting method for processing provided in the above method embodiments is implemented.
[0240] It should be noted that the principles by which the devices, systems, related equipment, and computer-readable media provided in the embodiments of this application solve the problem all belong to the same inventive concept as the aforementioned corresponding methods. Therefore, the relevant implementation methods can continue to be referred to the corresponding method embodiments, and for the sake of brevity, they will not be repeated here. Furthermore, it should be understood that the above content is only a preferred exemplary embodiment of this application and is not intended to limit the implementation scheme of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.
Claims
1. A sorting method for processing, characterized in that, include: Retrieve the layout object from the editable interface; Acquire a target image and display the target image within the editable interface; wherein the target image is used to present the material to be processed placed in the processing area of the processing equipment; In response to the sorting confirmation operation for the sorting object, sorting processing is performed on the sorting object; The target image displayed within the editable interface shows the arranged objects after the arrangement.
2. The method according to claim 1, characterized in that, The number of the sorting objects is one or more; the step of performing sorting processing on the sorting objects in response to the sorting confirmation operation includes: In response to the layout confirmation operation for the layout object, the outline information of the layout object is obtained; Image recognition is performed on the target image to obtain region indication information of the processable area of the material to be processed in the target image; Based on the currently acquired contour information and the area indication information corresponding to the material to be processed, the current layout position of the layout object in the target image is determined so that the layout position is within the processable area.
3. The method according to claim 2, characterized in that, When there are multiple layout objects, after determining the layout position of the current layout object in the target image, the method further includes: The processable area of the material to be processed is updated based on the layout position, so that the layout position of the already laid-out object is outside the updated processable area.
4. The method according to claim 2, characterized in that, The step of performing image recognition on the target image to obtain region indication information of the processable area of the material to be processed in the target image includes: Identify the material outline of the material to be processed in the target image; When the material contour only includes the outer contour, region indication information is generated to describe the outer contour, so that the image region enclosed by the outer contour is used as the processable region indicated by the region indication information. or, When the material contour includes an inner contour and an outer contour, region indication information is generated to describe the outer contour and the inner contour, so that the image region inside the outer contour and outside the inner contour is used as the processable region indicated by the region indication information; wherein, the inner contour is used to indicate the contour of the material hole contained in the material to be processed.
5. The method according to claim 4, characterized in that, The process of identifying the material contour of the material to be processed in the target image includes: Edge line recognition processing is performed on the target image to determine each closed edge line in the target image; If there exists a first closed edge line that coincides with the material boundary line of the material to be processed, then the first closed edge line is taken as the outer contour of the material to be processed. If there exists a second closed edge line within the material boundary line of the material to be processed, then the second closed edge line is taken as the inner contour of the material to be processed.
6. The method according to claim 4, characterized in that, The step of determining the current layout position of the layout object in the target image based on the currently acquired contour information and the area indication information corresponding to the material to be processed includes: The object contour of the current layout object is determined based on the contour information; Based on the area indication information and the object outline, it is detected whether the current layout object can be placed entirely into the processable area indicated by the area indication information; If the entire object can be placed into the processable area, the current layout position of the object in the target image is determined based on the object outline and the area indication information.
7. The method according to claim 6, characterized in that, When the area indication information is only used to describe the outer contour, the step of detecting whether the current layout object can be placed entirely into the processable area indicated by the area indication information, based on the area indication information and the object contour, includes: Move the object outline within the target image; If the object outline can be moved to be completely within the outer outline, then it is determined that the current layout object can be placed entirely into the processable area. If the object outline cannot be moved to be completely within the outer contour, then the current layout object cannot be placed entirely into the processable area.
8. The method according to claim 6, characterized in that, When the region indication information is used to describe the outer and inner contours, the step of detecting whether the current layout object can be placed entirely into the processable area indicated by the region indication information, based on the region indication information and the object contour, includes: Select a translation reference point from the object's outline; Based on the object outline, the translation reference point, and the outer outline described by the region indication information, the in-line critical polygon of the current layout object relative to the outer outline is determined; Based on the object outline, the translation reference point, and the inner outline described by the region indication information, the current layout object is determined to be the outer critical polygon relative to the inner outline. Based on the inner critical polygon and the outer critical polygon, it is detected whether the current layout object can be placed entirely into the processable area indicated by the area indication information.
9. The method according to claim 8, characterized in that, Determining the layout position of the current layout object in the target image based on the object contour and the region indication information includes: A planar coordinate system is constructed using the target image as the coordinate plane; Based on the inner critical polygon and the outer critical polygon, the area that can be laid out within the processable area is determined. Obtain the minimum ordinate of the sortable area in the plane coordinate system, and determine the minimum abscissa of the sortable area in the horizontal line formed by the minimum ordinate, so as to obtain the endpoint coordinates formed by the minimum ordinate and the minimum abscissa. The current layout object is positioned in the target image by translating it onto the target image until the translation reference point is at the position indicated by the endpoint coordinates on the target image.
10. The method according to claim 2, characterized in that, The quantity of materials to be processed is at least two pieces, and each piece of material to be processed corresponds to a region indication information; the step of determining the current layout position of the layout object in the target image based on the currently acquired contour information and the region indication information corresponding to the materials to be processed includes: Obtain the processable area of each piece of material to be processed in the target image; Traverse the area indication information of each piece of material to be processed in ascending order of processable area; Based on the currently acquired contour information and the currently traversed region indication information, the current layout position of the layout object in the target image is determined.
11. The method according to claim 2 or 10, characterized in that, When there are multiple layout objects, the outline information of the layout objects is obtained in traversal order; the method for obtaining the traversal order includes: Obtain the processing area occupied by each layout object, and sort the layout objects in descending order of processing area to obtain the traversal order; or, Obtain the processing area occupied by each layout object, and the processable area of each piece of material to be processed on the target image; Based on the obtained arrangement order of each processable area and the processing area occupied by each layout object, an intelligent sorting algorithm is invoked to sort the multiple layout objects under the constraint of a preset sorting target, thereby obtaining the traversal order.
12. The method according to claim 10, characterized in that, Determining the layout position of the current layout object in the target image includes: If the arrangement position of the current arrangement object is not determined based on the currently traversed area indication information, the area indication information of the next piece of material to be processed is traversed until the preset material traversal stop condition is reached; wherein, the material traversal stop condition includes: determining the arrangement position corresponding to the current arrangement object, or, the currently traversed area indication information is the area indication information of the last piece of material to be processed.
13. The method according to claim 1, characterized in that, The process of obtaining the layout object in the editable interface includes: Obtain a processing reference image from the editable interface, wherein the processing reference image contains at least one pattern; Image recognition is performed on the processing reference image to obtain the pattern positional relationship between each pattern in the processing reference image; Based on the positional relationship of the patterns, the pattern contour is extracted from the processing reference image to obtain at least one layout object.
14. The method according to claim 1, characterized in that, After displaying the nested objects in their nested state, the method further includes: In response to the processing confirmation operation for the sorting object, a processing instruction is generated based on the sorting position of the sorting object and the sorted sorting object after sorting; The processing instruction is sent to the processing equipment to process the material to be processed in the processing area of the processing equipment to obtain the processed sample object.
15. A processing equipment, characterized in that, include: Slide rail; A processing head, which is slidably disposed on the slide rail, is used to perform at least one of laser processing, cutting processing or printing processing on the material to be processed; A processing platform, the processing platform including a processing area for placing the material to be processed, and the processing head being movable on the processing area; A communication component, the communication component being configured to receive processing instructions generated from a nested object obtained based on the steps of the nesting method for processing according to any one of claims 1 to 14; A controller, based on the processing instructions, controls the processing head to move on the slide rail to process the material to be processed placed in the processing area.
16. A processing system, characterized in that, include: A processing device, comprising a slide rail, a processing head, a processing platform, communication components, and a controller; wherein the processing head is slidably mounted on the slide rail; the processing platform includes a processing area for placing the material to be processed, and the processing head is movable on the processing area; and A terminal device that communicates with the processing equipment, the terminal device being used to execute the nesting method for processing according to any one of claims 1 to 14.
17. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the sorting method for processing as described in any one of claims 1 to 14.