A method, apparatus, equipment, and medium for generating residual material from the layout results during the cutting process.
By inserting the outline of the scrap sheet into the sheet shape list, calculating and marking polylines, generating cut lines, removing inner holes, and merging the remaining parts, the problem of low scrap utilization rate is solved, achieving efficient utilization and accurate calculation, and improving the overall utilization rate of the sheet.
Patent Information
- Application Number
- CN202411410026.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-10-10
AI Technical Summary
Existing technologies cannot effectively utilize scrap sheet material, resulting in material waste and low scrap utilization rate, making it difficult to accurately calculate and match the corresponding workpiece.
By inserting the outline of the scrap sheet into the sheet shape list, calculating the size information of the part occupying the scrap sheet, marking polylines, determining boundary points, generating cut lines, removing inner holes, merging the remaining parts, and generating a new scrap sheet list.
It improves the overall utilization rate of the board material, reduces the consumption of new board material, achieves a compact and efficient layout, and reduces manual intervention through automated processing, thereby improving calculation accuracy.
Smart Images

Figure CN119077431B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of laser cutting technology, and in particular relates to a method, apparatus, equipment and medium for generating residual material from the layout results during the cutting process. Background Technology
[0002] In the field of laser cutting technology, sheet metal needs to be cut into the required shapes. Before actual CNC cutting, the operator imports the drawings into the system and then lays out the parts. If the number of parts is small and they don't occupy a large portion of the sheet metal, there will be a significant amount of unused material. Sometimes, even if a part occupies most of the sheet metal, some material remains unused. Some of this leftover material is treated as scrap, which easily leads to material waste. Currently, the leftover material is being reused. The main goal is to generate as much leftover sheet metal as possible for initial layout, thereby reducing costs for the user.
[0003] Traditional layout methods cannot effectively utilize the dimensions of surplus material for further layout. Even when layout is necessary, it requires matching the surplus material with the workpiece's condition each time. If multiple pieces of surplus material exist, they must be retrieved, their dimensions determined, and then matched with the workpiece. Because the surplus material is not effectively managed, calculations and matching with the workpiece are repeated each time. Furthermore, it's difficult to ensure accurate calculation of the remaining space on the surplus material, making it impossible to accurately determine the boundaries of the surplus material. This results in low utilization of the surplus material and an inability to match it with the appropriate workpiece. Summary of the Invention
[0004] This invention provides a method for generating leftover material from the layout results during the cutting process. It calculates the remaining area of the current board material, generates new leftover board material, and then re-lays the material, which can meet the requirement of fully utilizing the board material.
[0005] The methods include:
[0006] S1: Insert the outline of the scrap sheet into the sheet shape list and insert the scrap line into the nesting result set of the current operation;
[0007] S2: Obtain the sheet metal graphics of multiple parts, store the sheet metal graphics in the sheet metal shape list, and sort them by area;
[0008] S3: Obtain the maximum and minimum points of all component bounding boxes and the maximum and minimum points of the leftover material bounding box;
[0009] S4: Calculate the dimensions of the part occupying the excess material, as well as the width and height of the excess material.
[0010] S5: Based on the size information, width information, and height information, mark the polylines of the excess material in the X direction and the polylines of the excess material in the Y direction;
[0011] S6: Determine the boundary point of the remaining material by calculating the intersection of the cutting path and the boundary of the material;
[0012] If there are multiple intersections in the X or Y direction, the multiple intersections are added to the preset intersection list according to their order on the path; based on the preset intersection list, the polyline of the scrap material is drawn and stored.
[0013] S7: Take out two adjacent polylines in a loop, get the end point of the first polyline and the start point of the adjacent polyline, and determine whether the two polylines intersect at the same position. If they intersect, generate a cut line. The cut line includes: the start point of the first polyline, the start point of the adjacent polyline, and the midpoint of the adjacent polyline.
[0014] Based on the current list of sheet shapes and the generated cutting lines, remove the nested parts and intersecting inner holes, merge the remaining parts, and generate a new list of surplus sheet materials.
[0015] S8: Set an ID for the new list of surplus sheet materials and insert it into the current nesting result set.
[0016] It should be further noted that step S1 also includes: obtaining the current drawing area graphic based on the current layout result set; if there is sufficient remaining material, then deleting the original remaining material.
[0017] It should be further noted that step S2 also includes:
[0018] Check the graphics in the current drawing area. If the remaining material of the board meets the new layout requirements, delete the previously retained remaining board material.
[0019] Retrieve and store the board material graphics within the current layout results;
[0020] Separate the graphic of the scrap sheet from the graphic of the part sheet;
[0021] Sort the leftover sheet materials according to their area.
[0022] It should be further noted that step S3 also includes:
[0023] Get the maximum point partsMaxP and minimum point partsMinP of the bounding box of the parts;
[0024] Obtain the maximum point plateMaxP and minimum point plateMinP of the leftover material sheet surrounding the box.
[0025] It should be further noted that step S4 also includes:
[0026] The length occupied by all parts in the X direction is equal to the maximum point X of the part – the minimum point X of the sheet metal + the edge distance of the excess sheet metal.
[0027] The length occupied by all parts in the Y direction is equal to the maximum point Y of the part – the minimum point Y of the sheet metal + the edge distance of the excess sheet metal.
[0028] The width of the remaining material sheet is equal to the maximum point X of the sheet material – the minimum point X of the sheet material.
[0029] Height of the remaining material = Maximum Y of the material – Minimum Y of the material.
[0030] It should be further explained that in the method, if Height is greater than occupiedYLength + minimum graphic length + minimum value greater than zero, then the topRecFull rectangle is drawn according to the width of the remaining material and the height of the remaining material Height – occupiedYLength.
[0031] If the width of the surplus material is greater than occupiedXLength + minimum graphic length + minimum value greater than zero, then draw a rightRecFull rectangle based on the surplus material width - occupiedXLength and surplus material height.
[0032] Based on the obtained topRecFull and rightRecFull rectangles, calculate:
[0033] The surplus material line has multiple lines in the X direction and Y direction.
[0034] It should be further explained that in the method, the intersection points interXPs and interYPs are calculated based on the boundary shape of the scrap material, and the cutting line segment is generated.
[0035] If the number of intersection points (interXPs) is greater than 1, then insert the intersection points into the remnantXList in sequence.
[0036] Conversely, a remnantXList is generated;
[0037] If the number of intersection points interYPs is greater than 1, then insert the intersection points into remnantYList in sequence;
[0038] Conversely, a remnantYList is generated.
[0039] Generate the corresponding polylines based on the intersection points remnantXList in the X direction and remnantYList in the Y direction.
[0040] This application also provides a device for generating residual material from the layout results during the cutting process, the device comprising:
[0041] The information insertion module is used to insert the outline of the scrap sheet into the sheet shape list and to insert the scrap line into the layout result set of the current operation;
[0042] The acquisition and sorting module is used to acquire sheet metal graphics of multiple parts, store the sheet metal graphics in a sheet metal shape list, and sort them by area.
[0043] The point acquisition module is used to acquire the maximum and minimum points of all part enclosures and the maximum and minimum points of the leftover material enclosure.
[0044] The dimension calculation module is used to calculate the dimension information of the part occupying the scrap material, as well as the width and height information of the scrap material.
[0045] The polyline marking module is used to mark polylines of the sheet material in the X direction and polylines of the sheet material in the Y direction based on the size information, width information and height information;
[0046] The intersection point determination module is used to determine the boundary points of the leftover material by calculating the intersection points between the cutting path and the material boundary. If there are multiple intersection points in the X or Y direction, the multiple intersection points are added to the preset intersection point list according to their order on the path. Based on the preset intersection point list, the polyline of the leftover material is drawn and stored.
[0047] The cutting line configuration module is used to sequentially extract two adjacent polylines in a loop, obtain the end point of the first polyline and the starting point of the adjacent polyline, and determine whether the two polylines intersect at the same position. If they intersect, a cutting line is generated. The cutting line includes: the starting point of the first polyline, the starting point of the adjacent polyline, and the midpoint of the adjacent polyline. Based on the current sheet material shape list and the generated cutting line, the layout parts and intersecting inner holes are removed, and the remaining parts are merged to generate a new list of surplus sheet material.
[0048] The nesting insertion module is used to set an ID for a new list of surplus sheet materials and insert it into the current nesting result set.
[0049] According to another embodiment of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for generating residual material from the nesting results during the cutting process.
[0050] According to another embodiment of this application, a storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method for generating residual material from the nesting results during the cutting process.
[0051] As can be seen from the above technical solutions, the present invention has the following advantages:
[0052] The method for generating leftover material during the cutting process provided by this invention stores the sheet metal graphic in a sheet metal shape list and sorts it; obtains the maximum and minimum points of the part's bounding box and the maximum and minimum points of the leftover sheet metal bounding box; calculates the size information of the part occupying the leftover sheet metal, as well as the width and height information of the leftover sheet metal; marks the polylines of the leftover sheet metal in the X direction and the Y direction; determines the boundary points of the leftover sheet metal by calculating the intersection of the cutting path and the sheet metal boundary; and, based on the current sheet metal shape list and the generated cutting lines, removes the nested parts and intersecting inner holes, merges the remaining parts, and generates a new list of leftover sheet metal. By inserting the outline of the leftover sheet metal into the sheet metal shape list and prioritizing the use of these leftover materials in subsequent nesting processes, the consumption of new sheet metal is reduced, and the overall utilization rate of the sheet metal is improved. In this embodiment, during the nesting process, the parts are sorted according to their area, and the optimal layout of the parts in the leftover sheet metal is considered, achieving a more compact and efficient nesting layout, further improving the utilization rate of the sheet metal.
[0053] This application allows for automated execution of the method, reducing manual intervention and improving the accuracy of nesting and calculation processes. Furthermore, it enables the dynamic generation of new surplus material during nesting and allows for adjustments to the nesting strategy as needed, meeting the requirements of various cutting conditions. A unique ID is assigned to each new surplus material, which is then inserted into the current nesting result set for easy subsequent management and tracking. Attached Figure Description
[0054] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a flowchart illustrating the method for generating leftover material from the layout results during the cutting process.
[0056] Figure 2 This is a flowchart illustrating an embodiment of a method for generating residual material from the layout results during the cutting process.
[0057] Figure 3 This is a schematic diagram of the layout results before the generation of surplus material;
[0058] Figure 4 This is a schematic diagram of the layout results after the residual material is generated;
[0059] Figure 5 This is a schematic diagram of the device for generating residual material from the layout results during the cutting process;
[0060] Figure 6 This is a schematic diagram of an electronic device. Detailed Implementation
[0061] The following details the specific steps of the method for generating residual material from the layout during the cutting process. For illustrative purposes, and not limiting, specific details such as particular system structures and technologies are presented to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details.
[0062] The method for generating leftover material from the layout results during the cutting process involved in this application collects basic information such as the length, width, thickness, and material of the sheet metal. Then, the dimensions, shape, and quantity of the parts to be cut are obtained. The part dimensions are standardized. The parts are then laid out on a two-dimensional plane, enabling the reuse of leftover material and allowing for the arrangement of other small parts within a single part, thus improving the utilization rate of the leftover sheet metal.
[0063] After each layout, calculate the area of any remaining unused material. If the remaining area is large enough, it can be considered as new surplus material, and its size and location information should be recorded. By establishing a surplus material library, record the size, material, quantity, and other information of all surplus materials so that they can be used preferentially in subsequent layouts.
[0064] After the layout and configuration are completed, detailed cutting paths and instructions are generated based on the layout results. The cutting instructions are then output to a CNC cutting machine or other automated equipment to achieve automated cutting, thereby improving the utilization rate of the material.
[0065] To fully illustrate the implementation of this application, specific examples will be used below to explain the process. Some English abbreviations and related information are explained below:
[0066] occupyXLine and occupyYLine: These represent two polylines that occupy space or boundaries in the X or Y direction on a two-dimensional plane.
[0067] The polyline here is composed of a series of line segments, which can be straight lines or curves, used to describe complex shapes.
[0068] plateShapeList: This is a list of plate shapes. It contains the boundary shapes of the plate, which define the areas that can be cut.
[0069] Intersections interXPs and interYPs refer to the sets of intersections between the cutting path (occupyXLine, occupyYLine) and the sheet boundary (the shape in plateShapeList) in the X and Y directions, respectively. These intersections are used to determine the shape of the remaining material after cutting.
[0070] `remnantXList` and `remnantYList` refer to the lists of remaining material boundary points generated based on the intersection points in the X and Y directions. If there are multiple intersection points in a direction (such as the X direction), the intersection points are added to the corresponding list (`remnantXList`) in sequence. Similarly, intersection points in the Y direction are added to `remnantYList`.
[0071] `remnantTempCutPLs` is a list storing polylines of remaining material. Based on the lists of intersections in the X and Y directions (`remnantXList` and `remnantYList`), polylines describing the shape of the remaining material can be generated and added to the `remnantTempCutPLs` list.
[0072] firstPL: Indicates the first polyline, the line segment currently being processed.
[0073] nextPL: indicates the polyline that follows the first polyline.
[0074] firstTailVertex: The end point of the first polyline, i.e., the point where the polyline ends.
[0075] nextHeadVertex: The starting point of the next polyline, i.e., the starting point of the polyline.
[0076] remnantCutPLs: Represents a list of cut lines for leftover material, storing cut line segments generated based on intersecting straight lines.
[0077] plateShapeList: Represents a list of plate shapes, containing the original plate's boundary shape.
[0078] newPlates: Represents a newly generated list of scrap plates, containing the shapes of the plates remaining after removing the cut portions.
[0079] It should be understood that, when used in this specification, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0080] It should be understood that "one or more" as mentioned in this application refers to one, two, or more, and "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0081] To facilitate a clear description of the technical solutions of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.
[0082] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0083] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0084] Please see Figure 1 The diagram shows a flowchart of a method for generating leftover material from the layout results during the cutting process in a specific embodiment. The method includes:
[0085] S1: Insert the outline of the surplus sheet into the sheet shape list and insert the surplus line into the nesting result set of the current operation.
[0086] In some embodiments, after the layout is completed, the profile of the leftover material is calculated based on the cutting path and the boundary of the material. The profile of the leftover material may include points and line segments of the leftover material.
[0087] Optionally, the outline of the surplus sheet material can be inserted as a new sheet material shape into the sheet material shape list. It can also be converted into a polyline and added to the nesting result set of the current operation for later use.
[0088] For example, AutoCAD or the GDAL graphics processing library is used to handle the insertion and storage of drawings. This enables effective management and reuse of surplus sheet material, improving sheet utilization. Subsequent nesting operations can be performed based on the current surplus sheet material, further enhancing sheet utilization.
[0089] S2: Obtain the sheet metal graphics of multiple parts, store the sheet metal graphics in the sheet metal shape list, and sort them by area.
[0090] In some embodiments, all part drawings to be nested are acquired and converted into uniform graphic information. This graphic information is then added to a list as sheet metal shapes. The list is then sorted according to the area of each graphic.
[0091] Optionally, the area can be calculated using a graphics processing library, and the parts can be sorted using a merge sort algorithm. This facilitates subsequent nesting algorithms to prioritize parts based on their size, optimizing space utilization.
[0092] S3: Get the maximum and minimum points of the bounding boxes of all parts and the maximum and minimum points of the bounding boxes of the leftover material.
[0093] In this embodiment, a bounding box is calculated for each part and scrap sheet. The maximum and minimum points of the bounding box on the X and Y axes are found respectively. Here, the bounding box can be the smallest rectangle that contains the shape.
[0094] Optionally, the vertices of the graphic can be traversed to find the maximum and minimum values of the X and Y coordinates. This provides the basic data for subsequent calculations of the part's position within the remaining sheet material.
[0095] S4: Calculate the dimensions of the part occupying the excess material, as well as the width and height of the excess material.
[0096] In this embodiment, when placing the part on the scrap material sheet, the dimensions of the part's bounding box are calculated. The remaining width and height of the scrap material sheet are then updated.
[0097] This embodiment can calculate the dimensional information of parts and surplus sheet metal using a graphics processing library and perform corresponding calculations. This facilitates optimized layout and ensures accurate calculation of remaining space for surplus sheet metal, providing a foundation for subsequent reuse.
[0098] S5: Based on the size information, width information and height information, mark the polyline of the excess material in the X direction and the polyline of the excess material in the Y direction.
[0099] This embodiment uses the dimensional information of the remaining space in the scrap material to draw polylines in both the X and Y directions to mark the boundaries of the scrap material. These polylines represent multiple small areas of scrap material. This clearly identifies the boundaries of the scrap material, improving the efficiency and accuracy of scrap material management.
[0100] S6: Determine the boundary point of the remaining material by calculating the intersection of the cutting path and the boundary of the material.
[0101] If there are multiple intersections in the X or Y direction, the multiple intersections are added to the preset intersection list according to their order on the path; based on the preset intersection list, the polyline of the scrap material is drawn and stored.
[0102] For each cutting path, calculate its intersection points with the sheet metal boundary. If multiple intersection points exist, add them to a pre-defined intersection point list in the order they appear on the path. Then, draw polylines of the remaining sheet metal based on these intersection points and store them.
[0103] Optionally, the intersection calculation function in the graphics processing library can be used in conjunction with a sorting algorithm to process multiple intersections. This can accurately determine the boundary points of the scrap material, providing accurate data for subsequent processing. This improves the efficiency and accuracy of drawing the boundaries of the scrap material.
[0104] S7: Take out two adjacent polylines in a loop, get the end point of the first polyline and the start point of the adjacent polyline, and determine whether the two polylines intersect at the same position. If they intersect, generate a cut line. The cut line includes: the start point of the first polyline, the start point of the adjacent polyline, and the midpoint of the adjacent polyline.
[0105] Based on the current list of sheet shapes and the generated cutting lines, the nested parts and intersecting inner holes are removed, and the remaining parts are merged to generate a new list of surplus sheet materials.
[0106] In some embodiments, all adjacent polyline pairs are traversed, and it is checked whether the endpoints of the polylines intersect at the same location. If they intersect, a cut line is generated. The cut line may include the start point of the polyline, the start point of the adjacent polyline, and the midpoint of the adjacent polyline.
[0107] This embodiment also removes nested parts and intersecting inner holes based on the cutting lines, merging the remaining portions into new scrap material sheets and adding them to the new scrap material sheet list. This can be achieved using the line segment intersection detection function in a graphics processing library, combined with loops and conditional statements. This effectively removes unwanted parts and generates new scrap material sheets, improving the reuse efficiency of scrap material sheets and the overall utilization rate of the material sheets.
[0108] S8: Set an ID for the new list of surplus sheet materials and insert it into the current nesting result set.
[0109] In this embodiment, a unique ID is assigned to each new surplus material sheet. Specifically, this ID can be generated using an incrementing counter or a UUID, and these surplus material sheets and their IDs are inserted into the current layout result set. This facilitates subsequent querying, management, and reuse of the surplus material sheets.
[0110] Optionally, in this embodiment, the generated leftover material cutting line can be set with layer identifier, layer, and color, and then inserted into the graphic set of the current layout result.
[0111] The method for generating leftover material during the cutting process provided in this embodiment inserts the outline of the leftover sheet material into the sheet material shape list and prioritizes the use of these leftover materials in subsequent nesting processes, thereby reducing the consumption of new sheet material and improving the overall utilization rate of the sheet material. In this embodiment, during the nesting process, the parts are sorted according to their area, and the optimal layout of the parts in the leftover sheet material is considered, achieving a more compact and efficient nesting layout, further improving the utilization rate of the sheet material.
[0112] This embodiment allows for automated execution of the method, reducing manual intervention and improving the accuracy of the nesting and calculation processes. Furthermore, it enables the dynamic generation of new surplus material sheets during the nesting process and allows for adjustments to the nesting strategy as needed, meeting the requirements of various cutting conditions. A unique ID is assigned to each new surplus material sheet, which is then inserted into the current nesting result set for easy subsequent management and tracking.
[0113] Based on the above embodiments, in order to further improve the reliability of the method for generating residual material in the cutting process provided by the above embodiments, the following is a more specific implementation method, such as... Figures 2 to 4 As shown, the specific implementation process includes the following steps.
[0114] S201: Execute the waste material generation process.
[0115] Specifically, the nesting results are processed; leftover material is handled according to different types and parameters; and corresponding leftover material sheet outlines are generated. The leftover material sheet outlines are then inserted into the sheet list. Finally, the leftover material lines are inserted into the nesting result set of the current operation.
[0116] This embodiment may include the following steps when processing the parts and leftover sheet material from the layout results:
[0117] S2011: Based on the layout results of the operation, obtain the current drawing area graphic, and delete the original leftover material if there is sufficient remaining material.
[0118] S2012: Retrieve the plate graphic within the current layout result and store it in plateShapeList;
[0119] S2013: Remove the current drawing set newPart from the board;
[0120] S2014: Sort plateShapeList by area.
[0121] S202: Obtain the maximum and minimum points of all component bounding boxes and the maximum and minimum points of the leftover material bounding box.
[0122] Specifically, it can retrieve the maximum and minimum points of all part bounding boxes, and the maximum and minimum points of the plate bounding box. Specifically, it retrieves the maximum point `partsMaxP` and minimum point `partsMinP` of the `newPart` bounding box. It also retrieves the maximum point `plateMaxP` and minimum point `plateMinP` of the `plateOutPLine` bounding box.
[0123] It should be noted that the maximum point `partsMaxP` and minimum point `partsMinP` of the bounding box are parameters used to define the boundaries of the bounding box. Here, the bounding box is a simple geometric shape used to approximate the size and shape of a complex geometric object. It can be a rectangle or cuboid, and its size and position are designed to completely contain the target object.
[0124] For the maximum point `partsMaxP`, it represents the maximum value in the X and Y axes of the bounding box. Specifically, if we refer to the two dimensions of the bounding box as width (W) and height (H), then...
[0125] The minimum point `partsMinP` contains the minimum value of the bounding box along the coordinate axes. For the same bounding box, it is the nearest endpoint of the bounding box in both directions.
[0126] S203: Calculate the size information of the part occupying the scrap material, as well as the width and height information of the scrap material.
[0127] In this embodiment, the part occupancy and plate size information can be calculated based on partsMaxP, partsMinP, plateMaxP, and plateMinP.
[0128] Specifically, the length occupied by all parts in the X direction is equal to the maximum point X of the part – the minimum point X of the sheet metal + the edge distance of the remaining sheet metal.
[0129] The length occupied by all parts in the Y direction is equal to the maximum point Y of the part, the minimum point Y of the sheet metal, and the edge distance of the remaining sheet metal.
[0130] The width of the remaining material sheet is equal to the maximum point X of the sheet – the minimum point X of the sheet.
[0131] Height of the remaining material = Maximum Y of the material – Minimum Y of the material.
[0132] In this embodiment, the method for calculating the scrap cutting line includes:
[0133] If the height of the surplus material is greater than occupiedYLength + minimum graphic length + minimum Double value greater than zero, then draw a rectangle topRecFull based on the width of the surplus material and the height of the surplus material – occupiedYLength.
[0134] If the width of the leftover material is greater than occupyXLength + minimum graphic length + minimum Double value greater than zero, then draw a rectangle rightRecFull based on the leftover material width - occupyXLength, Height.
[0135] S204: Calculate the polylines of the remaining material in the X direction and the Y direction;
[0136] This embodiment, based on the calculation process in step S203, can obtain topRecFull and rightRecFull. If the generation is successful, the remaining material is generated, and the following is calculated:
[0137] a) Generate an occupyXLine polyline in the X direction of the excess material line.
[0138] i. The first point is (-(Width of sheet material - remnantLineOvercutDis), the part occupies the length in the Y direction (occupyYLength), and the convexity is 0).
[0139] ii. The second point is (-(Width of sheet metal - length occupied by part in the X direction, occupied by part in the Y direction, convexity 0).
[0140] b) Generate a polynomial Y-direction occupyYLine for the excess material line:
[0141] i. The first point is (-(Width of sheet metal - length occupied by part in the X direction, occupied length in the Y direction, convexity 0).
[0142] ii. The second point is (-(Width of sheet metal - length occupied in the X direction of part), 0, convexity 0).
[0143] S205: Determine the boundary points of the surplus sheet material.
[0144] Specifically, based on the plateShapeList, the intersection points interXPs and interYPs are calculated to generate a remnantXList.
[0145] If the number of intersection points (interXPs) is greater than 1, the intersection points will be inserted into remnantXList sequentially; otherwise, they will be directly inserted into remnantYList.
[0146] If the number of intersection points (interYPs) is greater than 1, the intersection points will be inserted into the remnantYList sequentially; otherwise, they will be inserted directly.
[0147] In this embodiment, corresponding polylines can be generated based on the intersection points in the X direction (remnantXList) and the intersection points in the Y direction (remnantYList) and inserted into remnantTempCutPLs.
[0148] S206: Configure a new list of surplus sheet materials.
[0149] In some specific embodiments, this is based on two intersecting straight lines: remnantTempCutPLs
[0150] Loop through the first polyline (firstPL) and the next polyline (nextPL).
[0151] Based on the tail point of the first polyline firstPL, determine the starting point nextHeadVertex of the next polyline nextPL.
[0152] If the absolute value of the distance between the end point X of the first polyline (firstPL) and the start point Y of the next polyline (nextPL) is less than the currently defined precision, and the absolute value of the distance between the end point Y of the first polyline (firstPL) and the start point Y of the next polyline (nextPL) is also less than the currently defined precision, then residual cutPLs can be generated. The first point is designated as the start point of the first PL, the second as the start point of the next PL, and the third as the midpoint of the next PL.
[0153] In this embodiment, based on the current plateShapeList and the generated cut lines remnantCutPLs, the nested parts and intersecting inner holes are removed, and the remaining parts are merged to generate the scrap plate newPlates.
[0154] In some specific embodiments, the first polyline (firstPL) and the next polyline (nextPL) are obtained cyclically. Adjacent polylines can be retrieved and processed sequentially in a loop. firstPL represents the polyline currently being processed, while nextPL represents the polyline immediately following firstPL.
[0155] In this step, the end point (tail point) of firstPL and the start point (start point) of nextPL are obtained. The intersection conditions are then determined and a cutoff line is generated.
[0156] The condition for determining whether two straight lines intersect at the same point within the software-defined precision range is determined by comparing the absolute values of the differences between the X-coordinate of the tail point of the firstPL and the Y-coordinate of the starting point of the nextPL, as well as the absolute values of the differences between the Y-coordinates of the tail point of the firstPL and the starting point of the nextPL. If the condition is met, a new cut line (remnantCutPLs) is generated.
[0157] The new cut lines remnantCutPLs consist of three points: the starting point of firstPL, the starting point of nextPL, and the midpoint of nextPL. Then, based on the current plateShapeList and the generated cut lines remnantCutPLs, nested parts and intersecting inner holes are removed, and the remaining parts are merged to generate surplus plate material newPlates.
[0158] This embodiment uses the generated cut lines `remnantCutPLs` and the original plate shape list `plateShapeList` to identify the parts that have been cut off, namely the nested parts and intersecting inner holes. These parts are removed, and the remaining material is merged to generate a new list of surplus plate material `newPlates`.
[0159] In some specific embodiments, an ID is set for the new list of surplus sheet material, and it is inserted into the current layout result set. Alternatively, based on the generated surplus material cutting lines, a layer identifier, layer, and color can be set before inserting it into the graphic set of the current layout result.
[0160] In one embodiment of the present invention, the waste material generation process is executed based on step S201. The following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0161] In this implementation, based on the layout results of the operation, the current drawing area graphic is obtained, and the original leftover material is deleted if there is sufficient remaining material.
[0162] It should be noted that before performing a new layout, the graphics in the current drawing area are checked. If the system detects that there is enough leftover material to meet the new layout requirements, it will choose to delete or ignore the previously retained leftover material information, because this leftover material may have been covered by the new layout scheme or is no longer needed.
[0163] This ensures that the system uses the latest and most accurate information on leftover materials. Deleting unnecessary leftover materials avoids wasting computational resources and ensures that subsequent layout and cutting operations are based on the latest sheet material condition.
[0164] In this embodiment, the sheet metal graphics within the current layout result are obtained and stored in `plateShapeList`. After a new layout result is determined, the system extracts the sheet metal graphics involved in these results. The sheet metal graphics include complete sheets, partially cut sheets, and any remaining scraps. These graphics are stored as sheet metal shapes in the `plateShapeList`.
[0165] The plateShapeList can provide data for subsequent processing. By storing the graphic information of the plates, it is also easier to analyze and manipulate these plates to generate more efficient cutting plans.
[0166] In this embodiment, removing the sheet metal from the current drawing set `newPart` means removing the sheet metal graphic from a drawing set that contains parts, sheet metal, and other graphics. This allows the sheet metal graphic to be processed separately from the specific part graphics, making it clearer which parts are parts that need to be cut and which parts are remaining sheet metal or scrap.
[0167] In this embodiment, the plateShapeList is sorted by area. After collecting the plate shapes and storing them in the plateShapeList, these shapes are sorted according to their area. The sorting can be either ascending or descending. This area-based sorting of the plates facilitates subsequent layout optimization.
[0168] The following are embodiments of the device for generating residual material from the layout results during the cutting process provided in this disclosure. This device and the method for generating residual material from the layout results during the cutting process in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the device for generating residual material from the layout results during the cutting process, please refer to the embodiments of the method for generating residual material from the layout results during the cutting process described above.
[0169] like Figure 5 As shown, the device includes:
[0170] The information insertion module is used to insert the outline of the scrap material into the list of material shapes and to insert the scrap material line into the set of layout results of the current operation.
[0171] The acquisition and sorting module is used to acquire sheet metal graphics of multiple parts, store the sheet metal graphics in a sheet metal shape list, and sort them by area.
[0172] The point acquisition module is used to obtain the maximum and minimum points of all part bounding boxes and the maximum and minimum points of the leftover material bounding boxes.
[0173] The dimension calculation module is used to calculate the dimensions of the part occupying the excess material, as well as the width and height of the excess material.
[0174] The polyline marking module is used to mark polylines of the leftover material in the X direction and the leftover material in the Y direction based on the size information, width information and height information.
[0175] The intersection point determination module is used to determine the boundary points of the remaining material by calculating the intersection points between the cutting path and the material boundary.
[0176] If there are multiple intersections in the X or Y direction, the multiple intersections are added to the preset intersection list according to their order on the path; based on the preset intersection list, the polyline of the scrap material is drawn and stored.
[0177] The cut line configuration module is used to sequentially extract two adjacent polylines in a loop, obtain the end point of the first polyline and the starting point of the adjacent polyline, and determine whether the two polylines intersect at the same position. If they intersect, a cut line is generated. The cut line includes: the starting point of the first polyline, the starting point of the adjacent polyline, and the midpoint of the adjacent polyline.
[0178] Based on the current list of sheet shapes and the generated cutting lines, the nested parts and intersecting inner holes are removed, and the remaining parts are merged to generate a new list of surplus sheet materials.
[0179] The nesting insertion module is used to set an ID for a new list of surplus sheet materials and insert it into the current nesting result set.
[0180] In this embodiment, the device may further include: a CAM module for generating the G-code files required for the system to run; and a laser plate cutting system module for automatically generating the G-code files before laser processing.
[0181] Figure 6 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0182] Electronic device 500 includes, but is not limited to, components such as: processor 501, network module 502, audio output unit 503, input unit 504, display unit 506, user input unit 507, interface unit 508, and memory 509. Those skilled in the art will understand that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0183] In this embodiment, processor 501 can be implemented using at least one of an Application-Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, or an electronic unit designed to perform the functions described herein. In some cases, such implementations can be implemented within a controller. For software implementations, implementations such as processes or functions can be implemented with separate software modules that allow the performance of at least one function or operation. The software code can be implemented by a software application (or program) written in any suitable programming language, and the software code can be stored in memory and executed by the controller.
[0184] The processor 501 provides wireless internet access to the user through the network module 502, enabling the transmission and communication of data information in this application. The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0185] User input unit 507 may include, but is not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., which will not be described in detail here. Memory 509 can be used to store software programs and various data.
[0186] In addition, the electronic device 500 includes some functional modules not shown, which will not be described in detail here.
[0187] This application also provides a storage medium storing a program product capable of implementing the method for generating residual material from the layout results during the cutting process described in this application.
[0188] The specific program includes steps such as: generating surplus material from one or more nesting results; setting surplus material types and parameters; and generating surplus material from nesting results. The process can be automated, reducing manual intervention and improving the accuracy of nesting and calculation. Furthermore, it allows for the dynamic generation of new surplus material sheets during nesting and the adjustment of nesting strategies as needed to meet the requirements of various cutting conditions.
[0189] In some possible implementations, various aspects of this disclosure may also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the “Exemplary Methods” section of this specification according to various exemplary embodiments of this disclosure.
[0190] The storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0191] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating scrap from a layout result in a cutting process, characterized by, The method comprises: S1: inserting the excess material plate profile into the plate shape list and inserting the excess material line into the current operation layout result set; S2: obtaining the plate graphics of multiple parts, storing the plate graphics in the plate shape list, and sorting according to the area; S3: obtaining the maximum and minimum points of the bounding box of all parts and the maximum and minimum points of the bounding box of the excess material plate; S4: calculating the size information of the parts occupying the excess material plate and the width information and height information of the excess material plate; S5: marking the ambiguous lines of the excess material in the X direction and the ambiguous lines of the excess material in the Y direction based on the size information, width information and height information; S6: determining the boundary points of the excess material plate by calculating the intersection points of the cutting path and the plate boundary; If there are multiple intersection points in the X direction or the Y direction, the multiple intersection points are added to the preset intersection point list in the order of the path; according to the preset intersection point list, the ambiguous lines of the excess material plate are drawn, and the ambiguous lines are stored; S7: taking out two adjacent ambiguous lines in turn through a loop, obtaining the tail point of the first ambiguous line and the starting point of the adjacent ambiguous line, and judging whether the two ambiguous lines intersect at the same position, if they intersect, a cutting line is generated; The cutting line comprises: the starting point of the first ambiguous line, the starting point of the adjacent ambiguous line and the midpoint of the adjacent ambiguous line; According to the current plate shape list and the generated cutting line, the layout parts intersecting with the inner hole are removed, the remaining part is combined, and a new excess material plate list is generated; S8: setting an ID for the new excess material plate list and inserting it into the current layout result set.
2. The method of claim 1, wherein, Step S1 further comprises: obtaining the current drawing area graphics according to the current operation layout result set, and if the plate excess material is sufficient, deleting the original excess material.
3. The method of claim 1, wherein the method further comprises: Step S2 further comprises: checking the graphics in the current drawing area, and if the plate excess material meets the new layout demand, deleting the previously retained excess material plate; obtaining the plate graphics in the current layout result and storing them; separating the graphics of the excess material plate from the plate graphics of the parts; sorting according to the area size of the excess material plate.
4. The method of claim 1, wherein the method further comprises: Step S3 further comprises: obtaining the maximum point partsMaxP and the minimum point partsMinP of the part bounding box; obtaining the maximum point plateMaxP and the minimum point plateMinP of the excess material plate bounding box.
5. The method of claim 4, wherein, Step S4 further comprises: the length occupied by all parts in the X direction occupyXLength = part maximum point X - plate minimum point X + excess material plate edge distance; the length occupied by all parts in the Y direction occupyYLength = part maximum point Y - plate minimum point Y + excess material plate edge distance; excess material plate width Width = plate maximum point X - plate minimum point X; excess material plate height Height = plate maximum point Y - plate minimum point Y.
6. The method of claim 5, wherein the step of generating the excess material is performed by a computer program. In the method, if Height is greater than occupyYLength + minimum length + a minimum value greater than zero, then according to the excess material plate width Width, the excess material plate height Height - occupyYLength, a topRecFull rectangle is drawn; If the remnant board Width is greater than occupyXLength + the minimum length of the figure + the minimum value greater than zero, then according to remnant board Width - occupyXLength, remnant board Height draws out the rightRecFull rectangle; According to the obtained topRecFull rectangle and rightRecFull rectangle, the following is calculated: The remnant line X direction ambiguous line and the remnant line Y direction ambiguous line.
7. The method of claim 6, wherein the step of generating the excess material is performed by a computer program. In the method, the intersection points interXPs and the intersection points interYPs are calculated according to the remnant board boundary shape, and the cutting line segments are generated; If the number of intersection points interXPs is greater than 1, then the intersection points are sequentially inserted into remnantXList; Conversely, remnantXList is generated; If the number of intersection points interYPs is greater than 1, then the intersection points are sequentially inserted into remnantYList; Conversely, remnantYList is generated; According to the X direction intersection points remnantXList and the Y direction intersection points remnantYList, the corresponding ambiguous lines are generated.
8. A device for generating a scrap from a layout result in a cutting process, characterized by The device is used to implement the remnant generation method in the cutting process of the layout result as claimed in any one of claims 1 to 7; The device comprises: An information insertion module is used to insert the remnant board contour into the board shape list and insert the remnant line into the current operation layout result set; An acquisition and sorting module is used to acquire the board figures of a plurality of parts, store the board figures in the board shape list, and sort according to the area; A point acquisition module is used to acquire the maximum and minimum points of all part bounding boxes and the maximum and minimum points of the remnant board bounding box; A size calculation module is used to calculate the size information of the parts occupying the remnant board and the width information and height information of the remnant board; An ambiguous line marking module is used to mark the ambiguous line of the remnant board in the X direction and the ambiguous line of the remnant board in the Y direction based on the size information, width information and height information; An intersection point determination module is used to determine the boundary points of the remnant board by calculating the intersection points of the cutting path and the board boundary; if there are a plurality of intersection points in the X direction or the Y direction, then the plurality of intersection points are sequentially added to a preset intersection point list according to their order on the path; according to the preset intersection point list, the ambiguous line of the remnant board is drawn, and the ambiguous line is stored; A cutting line configuration module is used to sequentially take out two adjacent ambiguous lines in a loop manner, acquire the tail point of the first ambiguous line and the start point of the adjacent ambiguous line, judge whether the two ambiguous lines intersect at the same position, and if so, generate a cutting line; the cutting line comprises: the start point of the first ambiguous line, the start point of the adjacent ambiguous line and the midpoint of the adjacent ambiguous line; according to the current board shape list and the generated cutting line, the intersecting inner hole of the layout part is removed, the remaining part is merged, and a new remnant board list is generated; A layout insertion module is used to set ID for the new remnant board list and insert it into the current layout result set.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the waste generation method for the layout result in the cutting process as claimed in any one of claims 1 to 7 when executing the program.
10. A storage medium having stored thereon a computer program, characterized in that The computer program implements the steps of the waste generation method for the layout result in the cutting process as claimed in any one of claims 1 to 7 when executed by the processor.
Citation Information
Patent Citations
Cutting path optimization method and device and computer readable storage medium
CN112935575A
A stock layout scheme determination method and device and electronic equipment
CN114091128A