A method, system, device and medium for calculating automatic placement of manual nesting
By calculating the placeable non-collision area and shortest distance algorithm of parts, the automatic placement recommendation of manual sleeve is realized, which solves the problems of low utilization rate of the plate and difficulty in automatic placement of multiple parts in the existing technology, and improves the manual sleeve material efficiency and board utilization.
Patent Information
- Application Number
- CN202410409482.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-04-07
AI Technical Summary
Existing nesting software cannot recommend the optimal position in manual nesting, especially when complex shape parts and multiple parts are dragged, resulting in low utilization of the board and automatic landing recommendations.
By calculating the placeable non-collision area (CFR) of the part on the plate, the rationality of the part's position is judged, and automatic adsorption or recommendation of reasonable landing points are performed based on the shortest distance to achieve automatic landing of the part.
It improves the efficiency of manual nesting and board utilization, can recommend reasonable locations in real time, supports the automatic placement of multiple parts, and enhances the convenience of user operation.
Smart Images

Figure CN118378740B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of nesting, and in particular relates to a method, system, equipment and medium for calculating automatic placement of manual nesting. Background Art
[0002] Nesting is a method of using as much material as possible on a limited material area to increase material utilization and reduce waste. Nesting is a common method in the mechanical processing industry, shipbuilding and other industries to maximize material utilization, reduce costs and save resources.
[0003] Currently, most automatic nesting designs are implemented through computers. However, for parts with complex shapes, automatic nesting may result in low sheet utilization. In this case, users can manually adjust the positions of arranged parts to make the arrangement more compact and improve sheet utilization.
[0004] However, to determine whether the position of the selected and dragged parts in manual nesting is reasonable, most nesting software currently uses the method of: real-time detection of whether the dragged part has any intersection with the current plate and the arranged parts on the plate, and calculation of the distance between the current part and the arranged parts, to determine whether the current position of the dragged part is legal. The main defect of this method is that when the user manually drags the part outside the plate or onto the arranged parts on the plate, most software cannot automatically recommend the current optimal and reasonable position as the mouse moves. The recommended position can only be given after the dragged part's position is changed to the plate and has no intersection with the arranged parts.
[0005] In addition, for manual nesting, when adjacent parts need to be in a co-edge position, manual alignment is usually the only option. For the situation of dragging multiple parts at the same time, existing nesting software is also unable to implement automatic placement recommendations for multiple parts. Summary of the invention
[0006] In view of the above problems in the prior art, an object of the present invention is to provide a method for calculating the automatic placement of manual nesting, which can recommend a reasonable placement of the material in real time as the position of the part is changed by dragging the mouse of the user.
[0007] A method for calculating automatic placement of manual nesting includes the following steps:
[0008] The steps include:
[0009] Calculate the non-collision area CFR where the dragged part can be placed on the plate;
[0010] Determine whether the reference point of the dragged part is within the non-collision region CFR, so as to determine whether the current position of the part is reasonable;
[0011] If the reference point of the dragged part is within the non-collision area CFR, the current position of the dragged part is reasonable. Then the shortest distance between the reference point of the dragged part and the nearest edge of the non-collision area CFR is calculated and it is determined whether the distance meets the adsorption distance.
[0012] If the adsorption distance is met, the reference point of the dragged part is automatically adsorbed to the position of the edge of the non-collision area CFR that is closest to the reference point of the dragged part and has the shortest distance to the reference point of the dragged part;
[0013] If the adsorption distance is not met, the reference point of the dragged part will be placed directly at the dragging position;
[0014] If the reference point of the dragged part is not within the CFR where the part can be placed, the current position of the dragged part is unreasonable. The shortest distance between the reference point of the dragged part and the edges of all CFRs where the part can be placed is calculated, and a reasonable placement point is recommended.
[0015] Preferably, the calculation of the non-collision region CFR where the dragged part can be placed on the plate comprises the following steps:
[0016] Calculate the critical polygon NFP between the imported parts and save it;
[0017] Calculate the inner critical polygon IFP of the dragged part on the plate and save it;
[0018] Calculate the union of the critical polygons NFP of the dragged part around other arranged parts on the plate;
[0019] Calculate the non-collision area CFR of the dragged part. The range of the non-collision area CFR is the range of the inner critical polygon IFP minus the union of the critical polygons NFP of all parts. To place the non-collision area CFR, is the inner critical polygon IFP, is the union of the critical polygons NFP of all parts, then the range of the non-collision area CFR can be placed is = - .
[0020] Preferably, when the shortest distance between the reference point of the dragged part and the edge of the non-collision area CFR where it can be placed meets the adsorption distance,
[0021] Then calculate the shortest distance between the reference point of the dragged part and the nearest vertex of the non-collision area CFR that can be placed and determine whether the distance meets the adsorption distance. If so, the reference point of the dragged part is automatically adsorbed to the nearest vertex of the non-collision area CFR that can be placed. If not, the dragged part is adsorbed to the nearest edge of the non-collision area CFR that can be placed.
[0022] Preferably, the reference point of the dragged part is the starting point from which the part is dragged.
[0023] Preferably, the dragged parts are one or more. When dragging multiple parts, the placeable non-collision area CFR of each dragged part is calculated and placed in a map for storage, and it is determined whether the reference point of the dragged part is within the corresponding placeable non-collision area CFR, thereby determining whether the position of the dragged part is reasonable.
[0024] Preferably, when multiple parts are dragged, the relative positions between the multiple parts are kept unchanged, and the multiple parts are moved and placed at the same time with the starting point where the multiple parts are dragged as a reference point.
[0025] Preferably, when dragging multiple parts, if the position of the dragged part is not within the placeable non-collision area CFR, calculate the shortest distance between the reference point of the dragged part and the edges of all placeable non-collision areas CFR, and ensure that all dragged parts are located within the placeable non-collision area CFR.
[0026] The second object of the present invention is to provide a system for calculating the automatic placement of manual nesting, comprising: a calculation module for calculating the non-collision region CFR where the dragged part can be placed on the plate;
[0027] The judgment module is used to judge whether the reference point of the dragged part is within the placeable non-collision region CFR, so as to judge whether the current position of the part is reasonable.
[0028] The third object of the present invention is to provide an electronic device, comprising: a memory and at least one processor, wherein the memory stores a computer program; the at least one processor calls the computer program in the memory so that the electronic device executes the method for calculating the automatic placement of manual nesting as described above.
[0029] A fourth object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for calculating automatic placement of manual nesting as described above.
[0030] The beneficial effects of the present invention are: the method and system, equipment, and medium for calculating the automatic placement of manual nesting calculate the CFR of the part's placeable non-collision area on the plate through the NFP algorithm, and dynamically calculate the shortest and most suitable vector of the part reference point moving to all the CFRs of the part's placeable non-collision area based on the CFR of the part's placeable non-collision area, thereby achieving real-time recommendation of a reasonable placement position as the user drags the part with the mouse, so that when the dragged part is moved outside the plate or intersects with the placed part, a reasonable placement position can still be provided for the user.
[0031] In addition, based on the calculated CFR of the placeable non-collision area, the distance from the reference point of the dragged part to the nearest vertex of the edge of the CFR of the placeable non-collision area is calculated, and it is determined whether the distance meets the adsorption distance. When the adsorption distance is met, the dragged part can be adsorbed to the vertex of the corresponding CFR of the placeable non-collision area, thereby realizing vertex alignment, and automatic adsorption of common edge alignment is achieved through vertex alignment.
[0032] When the user drags multiple parts at a time, by placing the CFR of each part's placeable non-collision area into the map and saving it, the algorithm can determine whether the placement of the currently dragged part is reasonable while considering whether other parts meet the conditions. This can achieve automatic placement of multiple parts and improve the efficiency of manual nesting. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0034] Figure 1 It is the algorithm flow chart of the present invention;
[0035] Figure 2 is a schematic diagram of the NFP algorithm involved in the present invention;
[0036] Figure 3 It is a schematic diagram of the IFP algorithm involved in the present invention;
[0037] Figure 4 This is a recommended schematic diagram of the parts placement of the first embodiment of the present invention. Figure 1 ;
[0038] Figure 5 This is a recommended schematic diagram of the parts placement of the first embodiment of the present invention. Figure 2 . DETAILED DESCRIPTION
[0039] Embodiment 1
[0040] like Figures 1 to 5 As shown, a method for calculating the automatic placement of manual nesting includes the following steps:
[0041] First, calculate the non-collision area CFR where the dragged part can be placed on the plate. The specific steps include:
[0042] Calculate the critical polygon NFP between the imported parts and save it;
[0043] Calculate the inner critical polygon IFP of the dragged part on the plate and save it;
[0044] Calculate the union of the critical polygons NFP of the dragged part around other arranged parts on the plate;
[0045] Calculate the non-collision area CFR of the dragged part. The range of the non-collision area CFR is the range of the inner critical polygon IFP minus the union of the critical polygons NFP of all parts. To place the non-collision area CFR, is the inner critical polygon IFP, is the union of the critical polygons NFP of all parts, then the range of the non-collision area CFR can be placed is = - .
[0046] In addition, if Figure 2 As shown in the figure, the critical polygon NFP means: given two irregular parts A and B, fix A and let B slide around A without rotation. During the sliding process, keep B and A just in contact without overlapping. At this time, a fixed reference point on B will generate several closed polygons, which are the critical polygons of part B relative to part A, denoted as .
[0047] like Figure 3 As shown, the inner critical polygon IFP means: given an irregular part D and a rectangular material C, let D do a non-rotating translational motion inside C. During the motion, keep the boundaries of D and C just touching and not overlapping. At this time, a fixed reference point on D will generate a smaller polygon, which is the inner critical polygon of part D relative to material C, recorded as .
[0048] Secondly, it is determined whether the reference point of the dragged part is within the non-collision region CFR, thereby determining whether the current position of the part is reasonable. The reference point of the dragged part is the starting point of the dragging of the part.
[0049] If the reference point of the dragged part is within the non-collision area CFR where it can be placed, the current position of the dragged part is reasonable. Then the shortest distance between the reference point of the dragged part and the nearest edge of the non-collision area CFR where it can be placed is calculated and it is determined whether the distance meets the adsorption distance. The adsorption distance can be manually set according to actual needs.
[0050] If the adsorption distance is met, the reference point of the dragged part is automatically adsorbed to the position of the edge of the non-collision area CFR that is closest to the reference point of the dragged part and has the shortest distance to the reference point of the dragged part;
[0051] If the adsorption distance is not met, the reference point of the dragged part will be placed directly at the dragging position;
[0052] If the reference point of the dragged part is not within the CFR where the part can be placed, the current position of the dragged part is unreasonable. The shortest distance between the reference point of the dragged part and the edges of all CFRs where the part can be placed is calculated, and a reasonable placement point is recommended.
[0053] Furthermore, since the shortest distance from a reference point to the edge of a polygon is generally the distance from the reference point to a side of the polygon, if the distance from the reference point to a vertex of the polygon also satisfies the adsorption distance, the reference point is preferentially adsorbed to the vertex. Vertex alignment facilitates part alignment and can effectively improve the utilization rate of the sheet metal.
[0054] Therefore, when the shortest distance between the reference point of the dragged part and the edge of the non-collision area CFR that can be placed meets the adsorption distance, the shortest distance between the reference point of the dragged part and the nearest vertex of the non-collision area CFR that can be placed is calculated and a determination is made as to whether the distance meets the adsorption distance. If so, the reference point of the dragged part is automatically adsorbed to the nearest vertex of the non-collision area CFR that can be placed; if not, the dragged part is adsorbed to the nearest edge of the non-collision area CFR that can be placed.
[0055] like Figure 4 As shown, in a specific embodiment, the intersection of the cross cursor is the current mouse position. When the user drags the dragged part (i.e., the part to be arranged) to Figure 4 When the mouse is in the position shown, the dragged part can be automatically adsorbed to the recommended position area according to the vertex adsorption algorithm, so that the vertex of the dragged part and other arranged parts can be aligned.
[0056] like Figure 5 As shown in a specific embodiment, the non-collision region CFR of the currently dragged hexagonal part includes the arranged parts, and the intersection of the cross cursor is the current mouse position. When the user drags the dragged part (i.e., the part to be arranged) to Figure 5When the position shown in the figure is reached, the position of the currently dragged part is unreasonable, such as Figure 5 The recommended location area shown is the part area of the current optimal and reasonable placement location recommended to the user using this algorithm. When the user clicks the mouse to place the part, the dragged part will be automatically adsorbed to the recommended location.
[0057] Embodiment 2
[0058] The structure of this embodiment is basically the same as that of the first embodiment, with the difference being that: when there are multiple dragged parts, the placeable non-collision area CFR of each dragged part is calculated and placed in a map for storage, and it is determined whether the reference point of the dragged part is within the corresponding placeable non-collision area CFR, thereby determining whether the position of the dragged part is reasonable.
[0059] It should be noted that when dragging multiple parts, the relative positions between the multiple parts should be kept unchanged, and the starting point where the multiple parts are dragged should be used as the reference point, and the multiple parts should be moved and placed at the same time.
[0060] In addition, when dragging multiple parts, if the position of the dragged part is not within the placeable non-collision area CFR, calculate the shortest distance between the reference point of the dragged part and the edges of all placeable non-collision areas CFR, and ensure that all dragged parts are located within the placeable non-collision area CFR.
[0061] Embodiment 3
[0062] The second aspect of the present invention proposes a system for calculating the automatic placement of manual nesting, including: a calculation module for calculating the CFR of a placeable non-collision area on a plate where the dragged part can be placed, and a judgment module for judging whether the reference point of the dragged part is within the CFR of the placeable non-collision area, thereby judging whether the current position of the part is reasonable.
[0063] Embodiment 4
[0064] According to a third aspect of the present invention, an electronic device is provided, comprising: a memory and at least one processor, wherein a computer program is stored in the memory; and the at least one processor calls the computer program in the memory so that the electronic device executes the method for calculating automatic positioning of manual nesting as described in Embodiment 1 or 2.
[0065] Embodiment 5
[0066] A fourth aspect of the present invention is a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for calculating automatic placement of manual nesting as described in Embodiment 1 or 2.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for calculating the automatic placement of manual nesting, characterized in that: The steps include: Calculate the non-collision area CFR where the dragged part can be placed on the plate; Determine whether the reference point of the dragged part is within the non-collision region CFR, so as to determine whether the current position of the part is reasonable; If the reference point of the dragged part is within the non-collision area CFR, the current position of the dragged part is reasonable. Then the shortest distance between the reference point of the dragged part and the nearest edge of the non-collision area CFR is calculated and it is determined whether the distance meets the adsorption distance. If the adsorption distance is met, the reference point of the dragged part is automatically adsorbed to the position of the edge of the non-collision area CFR that is closest to the reference point of the dragged part and has the shortest distance to the reference point of the dragged part; If the adsorption distance is not met, the reference point of the dragged part will be placed directly at the dragging position; If the reference point of the dragged part is not within the CFR where the part can be placed, the current position of the dragged part is unreasonable. The shortest distance between the reference point of the dragged part and the edges of all CFRs where the part can be placed is calculated, and a reasonable placement point is recommended.
2. The method for calculating the automatic placement of manual nesting according to claim 1 is characterized in that: The calculation of the non-collision region CFR of the dragged part on the plate includes the following steps: Calculate the critical polygon NFP between the imported parts and save it; Calculate the inner critical polygon IFP of the dragged part on the plate and save it; Calculate the union of the critical polygons NFP of the dragged part around other arranged parts on the plate; Calculate the non-collision area CFR of the dragged part. The range of the non-collision area CFR is the range of the inner critical polygon IFP minus the union of the critical polygons NFP of all parts. To place the non-collision area CFR, is the inner critical polygon IFP, is the union of the critical polygons NFP of all parts, then the range of the non-collision area CFR can be placed is = - .
3. The method for calculating automatic placement of manual nesting according to claim 1 or 2, characterized in that: When the shortest distance between the reference point of the dragged part and the edge of the non-collision area CFR that can be placed meets the adsorption distance, the shortest distance between the reference point of the dragged part and the nearest vertex of the non-collision area CFR that can be placed is calculated and it is determined whether the distance meets the adsorption distance. If so, the reference point of the dragged part is automatically adsorbed to the nearest vertex of the non-collision area CFR that can be placed. If not, the dragged part is adsorbed to the nearest edge of the non-collision area CFR that can be placed.
4. The method for calculating the automatic placement of manual nesting according to claim 1, characterized in that: The reference point of the dragged part is the starting point of the dragging of the part.
5. The method for calculating automatic placement of manual nesting according to claim 1, characterized in that: The dragged parts are one or more. When dragging multiple parts, the placeable non-collision area CFR of each dragged part is calculated and placed in a map for storage, and it is determined whether the reference point of the dragged part is within the corresponding placeable non-collision area CFR, thereby determining whether the position of the dragged part is reasonable.
6. The method for calculating automatic placement of manual nesting according to claim 5, characterized in that: When dragging multiple parts, the relative positions of the multiple parts are kept unchanged, and the starting point where the multiple parts are dragged is used as the reference point. The multiple parts move and fall into place at the same time.
7. The method for calculating automatic placement of manual nesting according to claim 5, characterized in that: When dragging multiple parts, if the position of the dragged part is not within the placeable non-collision area CFR, calculate the shortest distance between the reference point of the dragged part and the edges of all placeable non-collision areas CFR, and ensure that all dragged parts are located within the placeable non-collision area CFR.
8. A system for calculating the automatic placement of manual nesting, characterized in that: The method for realizing automatic placement of calculated manual nesting according to any one of claims 1 to 7 comprises: Calculation module, used to calculate the non-collision area CFR where the dragged part can be placed on the plate; The judgment module is used to judge whether the reference point of the dragged part is within the placeable non-collision region CFR, so as to judge whether the current position of the part is reasonable.
9. An electronic device, characterized in that: The electronic device comprises: a memory and at least one processor, wherein the memory stores a computer program; the at least one processor calls the computer program in the memory so that the electronic device executes the method for calculating automatic placement of manual nesting as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for calculating automatic placement of manual nesting according to any one of claims 1 to 7 is implemented.
