Array determination method for laser cutting and electronic equipment
By calculating the minimum distance between the target element and the element in the laser cutting system, a tight cutting array is constructed, which solves the problem of material waste and accuracy when cutting special-shaped parts, and improves cutting efficiency and accuracy.
Patent Information
- Application Number
- CN202411247868.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Existing laser cutting systems can lead to waste of materials and inaccurate cutting when dealing with shaped, tilted or combined parts.
By determining the external rectangle of the target element and copying the element in the first direction to form the initial array, the minimum distance between the element is calculated to build a cutting array, ensuring that the distance between the element is closer, avoiding material waste and Improve cutting accuracy.
It improves the material utilization rate and manual cutting efficiency in laser cutting, ensuring the accuracy of cutting parts and the full utilization of materials.
Smart Images

Figure CN119131046A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of laser cutting, and in particular to an array determination method and electronic equipment for laser cutting. Background Art
[0002] In existing laser cutting systems, when multiple parts need to be cut from a material, the graphics elements used for cutting multiple parts are generally arranged in an array. The array function is to calculate the circumscribed rectangle of the graphic and then calculate the placement position of the graphics element in the array according to the width and height of the circumscribed rectangle. This technology is accurate for graphics similar to rectangular frames according to the spacing array position. However, when the parts are special-shaped parts, inclined parts, assemblies, etc., the calculation of the array placement position based on the circumscribed rectangle may result in an unreasonable distance between two part graphics elements, resulting in material waste. Summary of the invention
[0003] The purpose of the present application is to provide an array determination method and electronic equipment for laser cutting, which can improve the material utilization rate in laser cutting and the efficiency of manual cutting diagram making.
[0004] In a first aspect, the present invention provides an array determination method for laser cutting, comprising: determining a circumscribed rectangle of a target element, wherein the target element is a cutting shape required for laser cutting; in a first direction, copying the target element to obtain a first element, wherein a distance between a circumscribed rectangle of the target element and a circumscribed rectangle of the first element is a set value; calculating a target minimum distance between the first element and the target element in the first direction; and constructing a cutting array based on the target minimum distance and the target element.
[0005] In the above implementation, the placement position of the graphic element can be calculated based on the circumscribed rectangle to form an initial array, and the minimum distance between two adjacent graphic elements is used as the offset between the two graphic elements, so as to construct a cutting array based on the minimum distance, so that the distance between each graphic element in the cutting array is closer, and the cutting based on the cutting array can save more materials used for the cut parts. In addition, since the array is obtained based on the above minimum distance, the graphic elements in each cutting array will not overlap, and the accuracy of the cut parts can be better achieved.
[0006] In an optional embodiment, the calculation of the target minimum distance between the first primitive and the target primitive in the first direction includes: determining a first minimum distance between a key point in the first primitive and the target primitive in the first direction; determining a second minimum distance between a key point in the target primitive and the first primitive in the first direction, wherein the smaller value between the first minimum distance and the second minimum distance is determined as the target minimum distance.
[0007] In the above implementation, the minimum distance may be calculated from two dimensions to ensure the reliability of the target minimum distance.
[0008] In an optional embodiment, determining the first minimum distance between the key point in the first primitive and the target primitive includes: for a first sub-primitive in the first primitive, determining the distance between the key point in the first sub-primitive and the target primitive to filter out the minimum distance between the first sub-primitive and the target primitive, the first sub-primitive being any one of all sub-primitives contained in the first primitive; based on the minimum distance between all sub-primitives of the first primitive and the target primitive, determining the first minimum distance between the key point in the first primitive and the target primitive.
[0009] In an optional embodiment, determining the second minimum distance between the key point in the first primitive and the target primitive includes: for a second sub-primitive in the target primitive, determining the distance between the key point in the second sub-primitive and the first primitive to filter out the minimum distance between the second sub-primitive and the first primitive, the second sub-primitive being any one of all sub-primitives contained in the target primitive; and determining the first minimum distance between the key point in the target primitive and the first primitive based on the minimum distance between all sub-primitives of the target primitive and the first primitive.
[0010] In the above implementation, the minimum distance from the key point of each sub-element to another element may be calculated first with the sub-element as a unit, so that the amount of calculation may be relatively smaller and the calculation efficiency may be improved.
[0011] In an optional embodiment, determining the circumscribed rectangle of the target primitive includes: decomposing the target primitive into multiple sub-primitives, wherein the sub-primitives include one or more of line segments and circular arcs; based on key points of the multiple sub-primitives, determining the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate and the target maximum vertical coordinate, wherein the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate and the target maximum vertical coordinate are used to determine the vertex coordinates of the circumscribed rectangle.
[0012] In the above embodiment, the target primitive can be decomposed into multiple small sub-primitives, and the circumscribed rectangle can be determined based on the small primitives. Since there is no need to screen each point in the target primitive one by one to determine the vertex coordinates of the circumscribed rectangle, the relative amount of calculation can be made relatively smaller, thereby improving the efficiency of cutting array determination.
[0013] In an optional embodiment, the key points of the line segment include the endpoints of the line segment; the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate and the target maximum vertical coordinate are determined based on the key points of the multiple sub-elements, including: comparing the coordinates of the endpoints of each line segment in the multiple sub-elements to determine the first minimum horizontal coordinate, the first maximum horizontal coordinate, the first minimum vertical coordinate and the first maximum vertical coordinate; comparing the key points of each arc of the multiple sub-elements to determine the second minimum horizontal coordinate, the second maximum horizontal coordinate, the second minimum vertical coordinate and the second maximum vertical coordinate; taking the smaller value of the first minimum horizontal coordinate and the second minimum horizontal coordinate as the target minimum horizontal coordinate; taking the larger value of the first maximum horizontal coordinate and the second maximum horizontal coordinate as the target maximum horizontal coordinate; taking the smaller value of the first minimum vertical coordinate and the second minimum vertical coordinate as the target minimum vertical coordinate; taking the larger value of the first maximum vertical coordinate and the second maximum vertical coordinate as the target maximum vertical coordinate.
[0014] In the above implementation, the maximum value and the minimum value of the target primitive on each coordinate axis may be determined based on the key points of each sub-primitive, so as to determine each end point of the circumscribed rectangle.
[0015] In an optional embodiment, the key points of each arc of the multiple sub-elements are compared to determine the second minimum horizontal coordinate, the second maximum horizontal coordinate, the second minimum vertical coordinate and the second maximum vertical coordinate, including: for the target arc, constructing an arc coordinate system based on the center of the target arc, and determining the intersection of the target arc with the coordinate axis of the arc coordinate system, wherein the target arc is any one of the multiple arcs obtained by decomposition; comparing the starting point, the end point and the intersection of the arc with the coordinate axis of the arc coordinate system of each arc to determine the second minimum horizontal coordinate, the second maximum horizontal coordinate, the second minimum vertical coordinate and the second maximum vertical coordinate.
[0016] In an optional embodiment, the cutting array includes multiple array elements; constructing the cutting array based on the target minimum distance and the target element includes: in the first direction, copying the i-th array element to obtain the i+1-th spare element, wherein the distance between the circumscribed rectangle of the i-th array element and the circumscribed rectangle of the i+1-th spare element is the set value, i is a positive integer, and when i is 1, the i-th array element represents the target element; moving the i+1-th spare element in the first direction close to the i-th array element by the target minimum distance to obtain the i+1-th array element.
[0017] In the above implementation, the deviation between two adjacent graphic elements in the cutting array can be eliminated by translation.
[0018] In a second aspect, the present invention provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method described in any one of the aforementioned implementations.
[0019] In a third aspect, the present invention provides a laser cutting device, comprising: a processor, a memory, and a laser cutting head, wherein the memory stores machine-readable instructions executable by the processor, and when the laser cutting device is running, the machine-readable instructions are executed by the processor to perform the steps of the method described in any one of the aforementioned embodiments.
[0020] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in any one of the aforementioned embodiments are executed.
[0021] In a fifth aspect, the present invention provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the method described in any one of the aforementioned embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A block diagram of an electronic device provided in an embodiment of the present application;
[0024] Figure 2A flow chart of an array determination method for laser cutting provided in an embodiment of the present application;
[0025] Figure 3 A schematic diagram of a parts array provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of another cutting array provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application.
[0028] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0029] Laser cutting technology is a manufacturing technology that uses high-energy-density laser beams to process materials. It has the advantages of high precision, high efficiency, and no contact. In laser cutting, a laser beam is used to cut materials along a predetermined trajectory, which can achieve precise processing of various materials and rapid manufacturing of parts.
[0030] Before laser cutting, it is necessary to determine the primitives based on the shape of the required parts, and determine the array required for cutting based on the primitives. The array function of parts in laser cutting refers to the simultaneous cutting of multiple identical or different parts in a single laser processing process through reasonable arrangement and design, thereby improving production efficiency and reducing costs. However, the current array method of parts still has shortcomings, which may result in a lot of material waste, or require a lot of manual calculations and then use the manually calculated values to layout the cutting array, but this method will greatly reduce the efficiency of cutting the array and the cutting efficiency, and waste human resources.
[0031] Based on the above research, the embodiments of the present application can provide an array determination method, electronic device, computer-readable storage medium and computer program product for laser cutting, which can improve the utilization rate of materials used for laser cutting parts and reduce material waste.
[0032] To facilitate understanding of this embodiment, first, an electronic device that executes the array determination method for laser cutting disclosed in the embodiment of the present application is introduced in detail.
[0033] like Figure 1 , which is a block diagram of an electronic device. The electronic device 100 may include a memory 111 and a processor 113. A person skilled in the art may understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the electronic device 100. For example, the electronic device 100 may further include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0034] The memory 111 and the processor 113 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The processor 113 is used to execute the executable module stored in the memory.
[0035] The memory 111 may be, but not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 111 is used to store programs, and the processor 113 executes the program after receiving the execution instruction. The method executed by the electronic device 100 defined by the process disclosed in any embodiment of the present application can be applied to the processor 113, or implemented by the processor 113.
[0036] The processor 113 may be an integrated circuit chip with signal processing capability. The processor 113 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), a dedicated integrated circuit.
[0037] (Application Specific Integrated Circuit, referred to as ASIC), Field Programmable Gate Array (Field Programmable Gate Array, referred to as FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0038] The electronic device 100 in this embodiment can be used to execute each step in each method provided in the embodiments of the present application.
[0039] An embodiment of the present application also provides a laser cutting device, which may include: a processor, a memory, and a laser cutting head.
[0040] The memory stores machine-readable instructions executable by the processor. When the laser cutting device is running, the machine-readable instructions are executed by the processor to perform the steps in the array determination method for laser cutting provided in the embodiment of the present application.
[0041] The processor and memory included in the laser cutting device may be similar to the memory and processor of the electronic device 100 provided in the aforementioned embodiment. For details, please refer to the relevant description in the aforementioned electronic device 100, which will not be repeated here.
[0042] The laser cutting device in this embodiment can be used to execute various steps in various methods provided in the embodiments of the present application. The implementation process of the array determination method for laser cutting is described in detail below through several embodiments.
[0043] See also Figure 2 , is a flow chart of the array determination method for laser cutting provided in the embodiment of the present application. The array determination method for laser cutting provided in the embodiment of the present application can be applied to an electronic device or a laser cutting device, and the steps in the array determination method for laser cutting are performed by the device. Figure 2 The specific process shown is described in detail.
[0044] Step 210, determining the bounding rectangle of the target primitive.
[0045] The target graphic element is the cutting shape required for laser cutting.
[0046] The circumscribed rectangle of the target primitive is the smallest rectangle that can enclose all the points of the target primitive.
[0047] Exemplarily, the outermost points can be determined in the horizontal and vertical directions of the two coordinate axes, and the two outermost points of the target primitive on the horizontal coordinate can be used as the positions of the two widths of the circumscribed rectangle, and the two outermost points of the target primitive on the vertical coordinate can be used as the positions of the two lengths of the circumscribed rectangle. In one example, the horizontal coordinates of the two outermost points of the target primitive on the horizontal coordinate can be Xmin and Xmax, respectively, and the vertical coordinates of the two outermost points of the target primitive on the vertical coordinate can be Ymin and Ymax, respectively, and the four vertices of the circumscribed rectangle can be determined to be: (Xmin, Ymin), (Xmin, Ymax), (Xmax, Ymin), (Xmax, Ymax).
[0048] Step 220 , copy the target primitive in a first direction to obtain a first primitive.
[0049] The distance between the bounding rectangle of the target primitive and the bounding rectangle of the first primitive is a set value, which may be zero.
[0050] The distance between the bounding rectangle of the target primitive and the bounding rectangle of the first primitive can be represented by the distance between the closest sides of the two bounding rectangles.
[0051] Figure 3 A schematic diagram of a parts array is shown in FIG. 1 , wherein a target primitive Gt and a first primitive G1 are shown in the figure, and the distance between the circumscribed rectangles of the target primitive Gt and the first primitive G1 is zero.
[0052] The first direction mentioned above may be the direction of the horizontal coordinate in a preset coordinate system, or the direction of the vertical coordinate in the coordinate system. The preset coordinate system may be a coordinate system determined based on the target primitive. For example, the coordinate system may be a coordinate system constructed with any position on the target primitive as the origin, or a coordinate system constructed with one of the vertices in the circumscribed rectangle of the target primitive as the origin. It is to be understood that the embodiments of the present application are not limited to the position of constructing the coordinate system. Figure 3 In the example shown, the coordinate system is constructed with a point outside the target primitive as the origin, and the width of the bounding rectangle of each primitive is parallel to the abscissa of the coordinate system, and the length of the bounding rectangle of the primitive is parallel to the ordinate of the coordinate system.
[0053] Step 230 , calculating the target minimum distance between the first primitive and the target primitive in the first direction.
[0054] Exemplarily, for the first point on the first primitive, the closest distance between the first point and the target primitive in the first direction can be represented, and the distance between the first point on the first primitive and the target primitive can be represented. For example, a line parallel to the first direction and passing through the first point can be drawn, and the distance between the point closest to the first point and the first point among all the intersections of the line and the target primitive can be understood as the distance between the first point on the first primitive and the target primitive.
[0055] As for the second point on the target primitive, it can represent the shortest distance between the second point and the first primitive in the first direction, and represent the distance between the second point on the first primitive and the target primitive.
[0056] exist Figure 3 In the example shown, the first direction is a direction parallel to the horizontal axis. The distance between the first primitive and the target primitive may represent the distance between the points therein in the direction parallel to the horizontal axis.
[0057] The above-mentioned target minimum distance may be the minimum distance between the distances between all points on the first primitive and the target primitive, and the distances between all points on the target primitive and the first primitive.
[0058] Step 240 , constructing a cutting array based on the target minimum distance and the target primitives.
[0059] Exemplarily, the initial array may be obtained by first adopting the method of step 220, and then the copied primitives may be translated according to the calculated target minimum distance to eliminate the gap between the two primitives.
[0060] This target minimum distance can be used as a primitive offset.
[0061] In the first direction, copy the i-th array element to obtain the i+1-th spare element, where i is a positive integer and the i-th array element represents the target element when i is 1; move the i+1-th spare element close to the i-th array element by the target minimum distance in the first direction to obtain the i+1-th array element.
[0062] The distance between the bounding rectangle of the i-th array element and the bounding rectangle of the i+1-th spare element is a set value.
[0063] Figure 4 A schematic diagram of a cutting array is shown. Figure 4 In the example shown, the arrangement of the array elements in the obtained cutting array can be more compact, and more parts can be carved out of the material of the same size.
[0064] In actual use, when the size of the material is large and the required cutting array is not just one-dimensional, the minimum distance between the first primitive and the target primitive can be calculated from multiple directions.
[0065] For example, the cutting array may be a two-dimensional matrix. The minimum distance between the first primitive and the target primitive may be determined from two directions, the direction of the horizontal coordinate and the direction of the vertical coordinate, and used as an offset in the corresponding direction to construct the cutting matrix.
[0066] Through the above method, the graphics elements can be arranged more densely, so that the cutting materials can be used more fully, reducing the waste of materials.
[0067] Considering that a graphic element is usually a shape constructed by continuous lines, it is relatively inefficient to determine the circumscribed rectangle by identifying all points in the continuous lines one by one. Based on this, the above step 210 may include: step 211 and step 212.
[0068] Step 211, decompose the target primitive into multiple sub-primitives.
[0069] The sub-element includes one or more of line segments and arcs.
[0070] If the target primitive is formed by connecting some line segments, it can be decomposed into multiple line segments. If the target primitive is an anisotropic shape, it can be decomposed into a collection of line segments and arcs.
[0071] exist Figure 3 In the example shown, the outer contour of the target primitive Gt can be decomposed to determine multiple line segments and multiple arcs.
[0072] Step 212, based on the key points of the plurality of sub-element, determine the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate and the target maximum vertical coordinate.
[0073] The above key points may be the endpoints of the decomposed line segments, or the starting point and the end point on the arc, and the intersection of the arc with the diameter parallel to the horizontal coordinate and the vertical coordinate.
[0074] Exemplarily, the coordinates of the key points of the plurality of sub-elements may be compared to screen out the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate, and the target maximum vertical coordinate.
[0075] The target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate, and the target maximum vertical coordinate are used to determine the vertex coordinates of the circumscribed rectangle.
[0076] The target minimum horizontal coordinate, target maximum horizontal coordinate, target minimum vertical coordinate and target maximum vertical coordinate can be expressed as: Xmin, Xmax, Ymin and Ymax respectively, then the four vertices of the circumscribed rectangle can be determined as: (Xmin, Ymin), (Xmin, Ymax), (Xmax, Ymin), (Xmax, Ymax).
[0077] The above-mentioned step 212 may include: step 2121 to step 2126.
[0078] Step 2121 , compare the coordinates of the endpoints of each line segment in the plurality of sub-primitives to determine a first minimum horizontal coordinate, a first maximum horizontal coordinate, a first minimum vertical coordinate, and a first maximum vertical coordinate.
[0079] Exemplarily, the minimum horizontal coordinate can be filtered out from the coordinates of the endpoints of each line segment and used as the first minimum horizontal coordinate; the maximum horizontal coordinate can be filtered out from the coordinates of the endpoints of each line segment and used as the first maximum horizontal coordinate; the minimum vertical coordinate can be filtered out from the coordinates of the endpoints of each line segment and used as the first minimum vertical coordinate, and the maximum vertical coordinate can be filtered out from the coordinates of the endpoints of each line segment and used as the first maximum vertical coordinate.
[0080] Step 2122, compare the key points of the arcs of the multiple sub-elements to determine the second minimum horizontal coordinate, the second maximum horizontal coordinate, the second minimum vertical coordinate and the second maximum vertical coordinate.
[0081] Exemplarily, the minimum horizontal coordinate can be screened out from the coordinates of the key points of each arc and used as the first minimum horizontal coordinate; the maximum horizontal coordinate can be screened out from the coordinates of the key points of each arc segment and used as the first maximum horizontal coordinate; the minimum vertical coordinate can be screened out from the coordinates of the key points of each arc segment and used as the first minimum vertical coordinate, and the maximum vertical coordinate can be screened out from the coordinates of the key points of each arc segment and used as the first maximum vertical coordinate.
[0082] Step 2123: Use the smaller value between the first minimum horizontal coordinate and the second minimum horizontal coordinate as the target minimum horizontal coordinate.
[0083] Step 2124: Use the larger value of the first maximum horizontal coordinate and the second maximum horizontal coordinate as the target maximum horizontal coordinate.
[0084] Step 2125: Use the smaller value between the first minimum vertical coordinate and the second minimum vertical coordinate as the target minimum vertical coordinate.
[0085] Step 2126: Use the larger value of the first maximum vertical coordinate and the second maximum vertical coordinate as the target maximum vertical coordinate.
[0086] In one implementation, the above step 2122 may include: for the target arc, constructing an arc coordinate system based on the center of the target arc, and determining the intersection of the target arc and the coordinate axis of the arc coordinate system.
[0087] The target arc is any one of the multiple arcs; for each arc, the intersection point of the arcs can be determined in the same manner as that used for the target arc.
[0088] Then, the starting point, the end point, and the intersection point of each arc with the coordinate axis of the arc coordinate system can be compared to determine the second minimum abscissa, the second maximum abscissa, the second minimum ordinate, and the second maximum ordinate.
[0089] Considering that a primitive may contain many points, if the minimum distance between two primitives is calculated for each point, the amount of calculation may be relatively large. In order to reduce the amount of calculation and the burden of computing resources, the minimum distance can be calculated based on the key points by screening out key points. Based on this, the above step 230 may include step 231 and step 232.
[0090] Step 231 : determining a first minimum distance between a key point in a first primitive and a target primitive in a first direction.
[0091] The first minimum distance between the key point in the first primitive and the target primitive may represent the minimum value of the distances between all the key points in the first primitive and the target primitive.
[0092] Step 232: Determine the second minimum distance between the key point in the target primitive and the first primitive in the first direction.
[0093] The smaller value between the first minimum distance and the second minimum distance is determined as the target minimum distance.
[0094] The second minimum distance between the key point in the target primitive and the first primitive may be expressed as the minimum value of the distances between all the key points in the target primitive and the first primitive.
[0095] Exemplarily, the first primitive may be divided into a plurality of sub-primitives.
[0096] Optionally, for the first sub-element in the first element, the distance between the key point in the first sub-element and the target element is determined to filter out the minimum distance between the first sub-element and the target element; based on the minimum distance between all sub-element of the first element and the target element, the first minimum distance between the key point in the first element and the target element is determined.
[0097] The first sub-element mentioned above can be any one of all the sub-element included in the first element. The first sub-element can be a line segment. For some heterogeneous graphics, for example, graphics with some curves, the curves can be decomposed into multiple shorter line segments.
[0098] Among the minimum distances between all sub-element of the first element and the target element, a minimum value is determined as the first minimum distance between the key point in the first element and the target element.
[0099] Exemplarily, for the first sub-element, the value range of the second direction of the first sub-element can be determined. The second direction is a direction perpendicular to the first direction. For example, if the first direction is a direction parallel to the horizontal coordinate, the second direction is a direction parallel to the vertical coordinate.
[0100] Taking specific coordinates as an example, the first sub-element is a line segment, and the coordinates of the endpoints of the line segment are (x1, y1) and (x2, y2), respectively, and the value range of the second direction of the line segment is [y1, y2]. Then determine the graphics whose ordinate value range of the target element is within the range of [y1, y2].
[0101] Then, the distances between the two end points of the first sub-element and the graphics whose ordinate values of the target element are in the range of [y1, y2] are calculated to determine the minimum distance therebetween.
[0102] For example, a straight line can be drawn through the first endpoint of the first sub-element, and the straight line is parallel to the first direction, and the distance between the straight line and the intersection of the figure whose ordinate value range is [y1, y2] of the target element is determined, and the minimum distance is selected as the minimum distance between the first endpoint of the first sub-element and the target element. A straight line can be drawn through the second endpoint of the first sub-element, and the straight line is parallel to the first direction, and the distance between the straight line and the intersection of the figure whose ordinate value range is [y1, y2] of the target element is determined, and the minimum distance is selected as the minimum distance between the second endpoint of the first sub-element and the target element. If the minimum distance between the first endpoint and the target element is smaller, it is used as the minimum distance between the first sub-element and the target element. If the minimum distance between the second endpoint and the target element is smaller, it is used as the minimum distance between the first sub-element and the target element.
[0103] For all other sub-picture elements in the first picture element, the minimum distance between each sub-picture element and the target picture element can be determined in a manner similar to that of the first sub-picture element.
[0104] Optionally, for the second sub-element in the target element, the distance between the key point in the second sub-element and the first element is determined to filter out the minimum distance between the second sub-element and the first element, and the second sub-element is any one of all the sub-element contained in the target element; based on the minimum distance between all the sub-element of the target element and the first element, the first minimum distance between the key point in the target element and the first element is determined.
[0105] Taking specific coordinates as an example, the second sub-element is a line segment, and the coordinates of the endpoints of the line segment are (x1, y1) and (x2, y2), respectively, and the value range of the second direction of the line segment is [y1, y2]. Then determine the graphics whose vertical coordinate value range of the first element is within the range of [y1, y2].
[0106] Then, the distances between the two end points of the second sub-element and the figure whose ordinate value range is [y1, y2] of the first element are calculated to determine the minimum distance therebetween.
[0107] For example, a straight line can be drawn through the first endpoint of the second sub-element, and the straight line is parallel to the first direction, and the distance between the straight line and the intersection of the figure whose ordinate value range is [y1, y2] of the first element is determined, and the minimum distance is selected as the minimum distance between the first endpoint of the second sub-element and the first element. A straight line can be drawn through the second endpoint of the second sub-element, and the straight line is parallel to the first direction, and the distance between the straight line and the intersection of the figure whose ordinate value range is [y1, y2] of the first element is determined, and the minimum distance is selected as the minimum distance between the second endpoint of the second sub-element and the first element. If the minimum distance between the first endpoint and the first element is smaller, it is used as the minimum distance between the second sub-element and the first element. If the minimum distance between the second endpoint and the first element is smaller, it is used as the minimum distance between the second sub-element and the first element.
[0108] For all other sub-picture elements in the target picture element, the minimum distance between each sub-picture element and the first picture element can be determined in a manner similar to that of the second sub-picture element.
[0109] In the embodiment of the present application, even if the parts to be engraved are non-rectangular shapes such as special-shaped parts, inclined parts, and assembly parts, it is possible to make fuller use of materials and use a more efficient calculation method to determine the cutting array. Furthermore, while improving the utilization rate of materials, the actual spacing between parts can be better guaranteed, and the accuracy will not be affected by the shape of the parts.
[0110] In addition, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the array determination method for laser cutting described in the above method embodiment are executed.
[0111] The computer program product of the array determination method for laser cutting provided in the embodiment of the present application includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the array determination method for laser cutting described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0112] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0113] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0114] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk. It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variation thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus. In the absence of more restrictions, the elements defined by the sentence "includes..." do not exclude the presence of other identical elements in the process, method, article or apparatus that includes the elements.
[0115] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0116] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for determining an array for laser cutting, characterized in that: include: Determine a circumscribed rectangle of a target graphic element, wherein the target graphic element is a cutting shape required for laser cutting; In a first direction, copy the target primitive to obtain a first primitive, wherein the distance between the bounding rectangle of the target primitive and the bounding rectangle of the first primitive is a set value; Calculating a target minimum distance between the first graphic element and the target graphic element in the first direction; A cutting array is constructed based on the target minimum distance and the target primitive.
2. The method according to claim 1, characterized in that The calculating the target minimum distance between the first primitive and the target primitive in the first direction includes: Determining a first minimum distance between a key point in the first graphic element and the target graphic element in the first direction; In the first direction, a second minimum distance between a key point in the target primitive and the first primitive is determined, wherein a smaller value between the first minimum distance and the second minimum distance is determined as the target minimum distance.
3. The method according to claim 2, characterized in that The determining of a first minimum distance between a key point in the first primitive and the target primitive includes: For a first sub-element in the first element, determining a distance between a key point in the first sub-element and the target element, so as to screen out a minimum distance between the first sub-element and the target element, wherein the first sub-element is any one of all sub-element included in the first element; Based on the minimum distances between all sub-element of the first element and the target element, a first minimum distance between a key point in the first element and the target element is determined.
4. The method according to claim 2, characterized in that: The determining of the second minimum distance between the key point in the first primitive and the target primitive includes: For a second sub-element in the target element, determining the distance between a key point in the second sub-element and the first element, so as to screen out the minimum distance between the second sub-element and the first element, wherein the second sub-element is any one of all the sub-element included in the target element; Based on the minimum distances between all sub-element of the target element and the first element, a first minimum distance between a key point in the target element and the first element is determined.
5. The method according to claim 1, characterized in that The step of determining the bounding rectangle of the target primitive includes: Decomposing the target primitive into a plurality of sub-primitives, wherein the sub-primitives include one or more of line segments and arcs; Based on the key points of the multiple sub-elements, the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate and the target maximum vertical coordinate are determined, wherein the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate and the target maximum vertical coordinate are used to determine the vertex coordinates of the circumscribed rectangle.
6. The method according to claim 5, characterized in that The key points of the line segment include the endpoints of the line segment; The determining of the target minimum horizontal coordinate, the target maximum horizontal coordinate, the target minimum vertical coordinate and the target maximum vertical coordinate based on the key points of the plurality of sub-element comprises: Comparing the coordinates of the endpoints of each line segment in the plurality of sub-element segments, and determining a first minimum abscissa, a first maximum abscissa, a first minimum ordinate, and a first maximum ordinate; Comparing the key points of the arcs of the plurality of sub-element, determining the second minimum horizontal coordinate, the second maximum horizontal coordinate, the second minimum vertical coordinate and the second maximum vertical coordinate; taking the smaller value between the first minimum horizontal coordinate and the second minimum horizontal coordinate as the target minimum horizontal coordinate; taking the larger value between the first maximum horizontal coordinate and the second maximum horizontal coordinate as the target maximum horizontal coordinate; The smaller value between the first minimum ordinate and the second minimum ordinate is used as the target minimum ordinate; The larger value between the first maximum vertical coordinate and the second maximum vertical coordinate is used as the target maximum vertical coordinate.
7. The method according to claim 6, characterized in that The step of comparing the key points of the arcs of the plurality of sub-element graphs to determine the second minimum horizontal coordinate, the second maximum horizontal coordinate, the second minimum vertical coordinate, and the second maximum vertical coordinate includes: For a target arc, construct an arc coordinate system based on the center of the target arc, and determine the intersection of the target arc and the coordinate axis of the arc coordinate system, wherein the target arc is any one of the arcs obtained by decomposition; The starting point, the end point, and the intersection point of each arc with the coordinate axis of the arc coordinate system are compared to determine the second minimum abscissa, the second maximum abscissa, the second minimum ordinate, and the second maximum ordinate.
8. The method according to claim 1, characterized in that The cutting array includes a plurality of array elements; The step of constructing a cutting array based on the target minimum distance and the target primitives includes: In the first direction, copy the i-th array element to obtain the i+1-th spare element, wherein the distance between the circumscribed rectangle of the i-th array element and the circumscribed rectangle of the i+1-th spare element is the set value, i is a positive integer, and when i is 1, the i-th array element represents the target element; The i+1th spare picture element is moved in the first direction close to the i-th array picture element by the target minimum distance to obtain the i+1th array picture element.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method according to any one of claims 1 to 8.
10. A laser cutting device, characterized in that: include: A processor, a memory, and a laser cutting head, wherein the memory stores machine-readable instructions executable by the processor, and when the laser cutting equipment is running, the machine-readable instructions are executed by the processor to perform the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the steps of the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Layout cutting method for two-dimensional irregular glass parts
CN104150759A
Method, device, storage medium and computer device for planning laser cutting path
CN108857092A
Laser cutting light spot control system and method
CN113695767A
Laser cutting path planning method and device and laser cutting machine
CN117697185A
Process for preparing rectangular pieces at high cutting efficiency
US20100206146A1
