Processing path determination method, device and system, program product and storage medium
By obtaining the minimum external rectangular coordinate parameters of the image to be processed, the candidate processing path is determined based on different selections, and the path with the shortest time is selected as the target path, which solves the problem of low efficiency when laser engraving multiple pictures and achieves more efficient processing.
Patent Information
- Application Number
- CN202411893952.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-03-01
- Filing Date
- 2024-12-20
- Publication Date
- 2025-09-02
AI Technical Summary
When laser engraving multiple pictures, the prior art usually selects the picture closest to the origin for processing, resulting in long processing time and low working efficiency.
By obtaining the coordinate parameters of the smallest external rectangle of the image to be processed, sorting the smallest external rectangle based on different selection criteria, determining the candidate processing path, and selecting the path with the shortest processing time as the target processing path, controlling the laser head for processing.
The moving path of the laser head is reduced, the processing time is shortened, and the processing efficiency of laser engraving equipment is improved.
Smart Images

Figure CN120572162A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser processing control technology, and in particular to a processing path determination method, equipment, system, program product and storage medium. Background Art
[0002] In the process of laser engraving pictures, it is necessary to convert the image to be engraved into a format that can be understood by laser processing equipment such as laser engraving machines, and then generate an engraving movement path so that the laser head of the laser processing equipment can process according to the engraving movement path; when there are multiple pictures to be processed, the picture closer to the origin is generally selected by default for processing, which takes a long time to process all the pictures and has low work efficiency. Summary of the Invention
[0003] The main purpose of the present invention is to provide a processing path determination method, device, system, program product and storage medium, aiming to reduce the processing time of laser equipment and thereby improve processing efficiency.
[0004] To achieve the above object, the present invention proposes a method for determining a machining path, the method comprising:
[0005] Obtaining processing position information corresponding to each of the plurality of target images to be processed;
[0006] Determining at least one candidate processing path corresponding to the plurality of target images to be processed according to the plurality of processing position information;
[0007] The processing time corresponding to each candidate processing path in the at least one candidate processing path is determined, and the candidate processing path with the shortest processing time is determined as the target processing path.
[0008] In one embodiment, the step of obtaining processing position information corresponding to the plurality of target images to be processed specifically includes:
[0009] Obtain the minimum enclosing rectangle corresponding to each target image to be processed;
[0010] The multiple coordinate parameters of the minimum circumscribed rectangle are used as the multiple coordinate parameters of the corresponding target image to obtain processing position information corresponding to each target image to be processed.
[0011] In one embodiment, the step of determining at least one candidate processing path corresponding to the plurality of target images to be processed specifically includes:
[0012] The plurality of minimum enclosing rectangles are sorted based on first minimum distances between the plurality of minimum enclosing rectangles and the processing origin in the X-axis direction, and first candidate processing paths corresponding to the plurality of target images are determined based on the first sorting order of the plurality of minimum enclosing rectangles.
[0013] In one embodiment, the step of determining at least one candidate processing path corresponding to the plurality of target images to be processed specifically includes:
[0014] Based on the second minimum distances between the multiple minimum enclosing rectangles and the processing origin in the Y-axis direction, the multiple minimum enclosing rectangles are sorted, and based on the second sorting order of the multiple minimum enclosing rectangles, second candidate processing paths corresponding to the corresponding multiple target images are determined.
[0015] In one embodiment, the step of determining at least one candidate processing path corresponding to the plurality of target images to be processed specifically includes:
[0016] The plurality of minimum bounding rectangles are sorted based on third minimum distances between the plurality of minimum bounding rectangles and the processing origin, and third candidate processing paths corresponding to the plurality of target images are determined based on a third sorting order of the plurality of minimum bounding rectangles.
[0017] In one embodiment, the step of sorting the plurality of minimum bounding rectangles and determining first candidate processing paths corresponding to the plurality of target images based on a first sorting order of the plurality of minimum bounding rectangles specifically includes:
[0018] sorting the plurality of minimum bounding rectangles by the plurality of first minimum distances in ascending order to obtain a first sorting order of the plurality of minimum bounding rectangles;
[0019] Based on the first sorting order of the plurality of minimum bounding rectangles, a first candidate processing path is determined, which starts from the target image corresponding to the minimum bounding rectangle with the smallest first minimum distance and ends at the target image corresponding to the minimum bounding rectangle with the largest first minimum distance.
[0020] In one embodiment, the step of sorting the plurality of minimum bounding rectangles and determining the second candidate processing paths corresponding to the plurality of target images based on a second sorting order of the plurality of minimum bounding rectangles specifically includes:
[0021] sorting the plurality of minimum bounding rectangles according to the second minimum distances in ascending order to obtain a second sorting order of the plurality of minimum bounding rectangles;
[0022] Based on the second sorting order of the plurality of minimum bounding rectangles, a second candidate processing path is determined, starting from the target image corresponding to the minimum bounding rectangle with the smallest second minimum distance and ending at the target image corresponding to the minimum bounding rectangle with the largest second minimum distance.
[0023] In one embodiment, the step of sorting the plurality of minimum bounding rectangles and determining third candidate processing paths corresponding to the plurality of target images based on a third sorting order of the plurality of minimum bounding rectangles specifically includes:
[0024] sorting the plurality of minimum bounding rectangles by the plurality of third minimum distances in ascending order to obtain a third sorting order of the plurality of minimum bounding rectangles;
[0025] Based on the third sorting order of the plurality of minimum bounding rectangles, a third candidate processing path is determined, which starts from the target image corresponding to the minimum bounding rectangle with the smallest third minimum distance and ends at the target image corresponding to the minimum bounding rectangle with the largest third minimum distance.
[0026] In one embodiment, the sorting of the plurality of minimum bounding rectangles based on the third minimum distances between the plurality of minimum bounding rectangles and the processing origin specifically includes:
[0027] Determine the minimum bounding rectangle closest to the processing origin based on the third minimum distances between the plurality of minimum bounding rectangles and the processing origin, and record it as the starting point minimum bounding rectangle;
[0028] Determine the next minimum enclosing rectangle closest to the minimum enclosing rectangle of the starting point according to the distance formula between two points, and use it as the minimum enclosing rectangle of the next starting point. Repeat the above steps until the last minimum enclosing rectangle is determined as the minimum enclosing rectangle of the next starting point.
[0029] The plurality of minimum enclosing rectangles are sorted according to the order in which the plurality of minimum enclosing rectangles are recorded as the minimum enclosing rectangles of the starting points.
[0030] In one embodiment, the distance formula between the two points includes:
[0031] sqrt((Xa-Xb) 2 +(Ya-Yb) 2 );
[0032] Where Xa is the first distance between the next minimum enclosing rectangle and the processing origin in the X-axis direction, and Ya is the first distance between the next minimum enclosing rectangle and the processing origin in the Y-axis direction; Xb is the second distance between the current minimum enclosing rectangle and the processing origin in the X-axis direction; and Yb is the second distance between the current minimum enclosing rectangle and the processing origin in the Y-axis direction.
[0033] Among them, the first distance between the same minimum circumscribed rectangle and the processing origin in the X-axis direction is smaller than the second distance between the same minimum circumscribed rectangle and the processing origin in the X-axis direction, and the first distance between the same minimum circumscribed rectangle and the processing origin in the Y-axis direction is smaller than the second distance between the same minimum circumscribed rectangle and the processing origin in the Y-axis direction.
[0034] In one embodiment, the step of obtaining processing position information corresponding to the plurality of target images to be processed specifically includes:
[0035] receiving a plurality of to-be-processed images of an object to be processed;
[0036] Converting the received multiple images to be processed into corresponding multiple grayscale images;
[0037] The plurality of grayscale images are amplified according to the processing area and the laser density, and the amplified plurality of grayscale images are determined as a plurality of target images to obtain processing position information of the plurality of target images to be processed.
[0038] In one embodiment, the processing time corresponding to the candidate processing path is obtained by using the following steps:
[0039] The processing time corresponding to each candidate processing path is determined based on the processing speed of the processing head and the total distance length of each candidate processing path.
[0040] In one embodiment, after determining the candidate processing path with the shortest processing time as the target processing path, the processing path determination method further includes:
[0041] Generate numerical control instructions according to the target processing path, and control the processing equipment to perform processing along the target processing path according to the numerical control instructions.
[0042] The present invention provides a processing device, comprising:
[0043] Slide rails;
[0044] a processing head, the processing head being slidably disposed on the slide rail;
[0045] A communication component, configured to receive a target machining path obtained according to any one of the steps of the machining path determination method described above;
[0046] A controller is provided for controlling the machining head to move on the slide rail to perform machining based on the target machining path.
[0047] The present invention also provides a processing system, comprising:
[0048] A processing device, the processing device comprising a processing device base plate and a processing head, the processing device base plate comprising a processing area for placing a material, the processing head being adapted to move over the processing area; and
[0049] A terminal device that communicates with the processing device, wherein the terminal device is used to execute any of the above-mentioned processing path determination methods.
[0050] The present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any one of the above-mentioned methods for determining a machining path are implemented.
[0051] The present invention also proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned processing path determination methods are implemented.
[0052] In the processing path determination method of the present invention, the processing position information corresponding to each of the multiple target images to be processed is first obtained; then, based on the multiple processing position information, at least one candidate processing path corresponding to the multiple target images to be processed is determined; finally, the processing time corresponding to each candidate processing path in the at least one candidate processing path is determined, and the candidate processing path with the shortest processing time is determined as the target processing path. In actual applications, the processing path determination method of the present invention can provide different candidate processing paths based on different selection criteria, determine the processing time corresponding to each candidate processing path, and use the candidate processing path with the shortest processing time as the target processing path to control the processing head to process the material to be processed corresponding to the target image according to the target processing path. In this way, the movement path of the laser head in the laser equipment is reduced, the processing time is shortened, and the processing efficiency of the processing equipment is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0054] Figure 1 This is a flow chart of an embodiment of a method for determining a machining path according to the present invention;
[0055] Figure 2 This is a flow chart of another embodiment of the method for determining a machining path according to the present invention;
[0056] Figure 3A flowchart of another embodiment of the method for determining a machining path according to the present invention;
[0057] Figure 4 This is a flow chart of another embodiment of the method for determining a machining path according to the present invention;
[0058] Figure 5 This is a flow chart of another embodiment of the method for determining a machining path according to the present invention;
[0059] Figure 6 A flowchart of another embodiment of the method for determining a machining path according to the present invention;
[0060] Figure 7 A flowchart of another embodiment of the method for determining a machining path according to the present invention;
[0061] Figure 8 is an exemplary processing diagram in this field;
[0062] Figure 9 This is an optimized processing schematic diagram of an embodiment of a processing path determination method of the present invention;
[0063] Figure 10 This is an optimized processing schematic diagram of another embodiment of the processing path determination method of the present invention;
[0064] Figure 11 This is an optimized processing schematic diagram of another embodiment of the processing path determination method of the present invention;
[0065] Figure 12 is an exemplary processing diagram in this field;
[0066] Figure 13 It is a structural schematic diagram of an embodiment of the processing equipment of the present invention;
[0067] Figure 14 It is a structural schematic diagram of an embodiment of a processing system of the present invention;
[0068] Figure 15 It is a structural schematic diagram of another embodiment of the processing equipment of the present invention.
[0069] Description of Figure Numbers:
[0070] 10. Reflector; 20. Communication component; 30. Laser tube; 40. Processing equipment; 50. Processing head; 60. Controller; 70. Bottom shell; 80. Slide rail; 90. Upper shell; 200. Terminal equipment.
[0071] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0072] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0073] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0074] It should be noted that in this article, step codes such as S100 and S200 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the order. When implementing the step, those skilled in the art may execute S200 first and then S100, etc., but these should all be within the scope of protection of this application.
[0075] It should be noted that the gray areas in the drawings in this specification are only for easy identification and do not constitute technical features in this field.
[0076] It's understood that laser processing technology uses high-energy laser beams to perform processes such as cutting, drilling, engraving, and welding. Images are stored data for laser engravings, including but not limited to formats like SVG and PNG. In the field of laser cutting, the path of the laser head can be optimized, referred to as path optimization, which can reduce processing time, processing costs, and other resource losses. Furthermore, laser equipment processing images requires the use of Gcode, a widely used CNC programming language. Gcode instructions are used to tell the laser equipment how to move, rotate, and control other functions of the laser equipment, such as speed and other variables.
[0077] In the process of laser engraving pictures, it is necessary to convert the image to be engraved into a format that can be understood by laser engraving machines and other laser processing equipment, and then generate an engraving movement path so that the laser head of the laser processing equipment can process according to the engraving movement path; when there are multiple pictures to be processed, the picture closest to the origin is generally selected by default for processing, such as Figure 8 As shown in the figure, the white arrow indicates the movement path of the laser head from the origin to the return to the origin after all the images are processed. Therefore, it takes a long time to complete the processing of all the images, and the work efficiency is low.
[0078] To this end, the present invention proposes a method for determining a processing path, referring to Figure 1 , the processing path determination method includes:
[0079] Step S100: obtaining processing position information corresponding to a plurality of target images to be processed;
[0080] Step S200: determining at least one candidate processing path corresponding to the plurality of target images to be processed according to the plurality of processing position information;
[0081] Step S300: Determine the processing time corresponding to each candidate processing path in the at least one candidate processing path, and determine the candidate processing path with the shortest processing time as the target processing path.
[0082] It should be noted that the processing path is the sum of the actual processing path and the movement path. Taking target images A, B, and C as an example, the actual processing path is the path taken by the processing equipment to process the content required for each target image A, B, and C. The movement path is the path taken from target image A to target image B, and the path taken from target image B to target image C. Due to different selection criteria, the movement paths vary, that is, the processing head has different movement paths when moving between target images A, B, and C, and thus different candidate processing paths.
[0083] In this embodiment, the machining path determination method of the present invention can be applied to a control device of a machining device or a terminal device communicating with the machining device. For example, the control device includes a memory for storing a machining path determination control program of the present invention and a processor for executing the machining path determination control program of the present invention. The control device can be implemented as a main controller, such as an MCU, a DSP (Digital Signal Processor), an FPGA (Field Programmable Gate Array), a PLC, or a SOC (System on Chip).
[0084] Specifically, when multiple images need to be processed, it is necessary to first obtain the processing position information corresponding to the multiple target images to be processed. If the multiple target images to be processed are irregular images, in order to facilitate the acquisition of the specific location of the target images to be processed, the minimum bounding rectangle of the multiple target images can be obtained. Optionally, the multiple coordinate parameters of the four corners of the minimum bounding rectangle are used as the multiple coordinate parameters of the corresponding target image to obtain the processing position information of the multiple target images, so as to determine the distance between the target image and the origin of the processing head according to the multiple coordinate parameters. Optionally, the coordinate parameters of the center point of the minimum bounding rectangle can also be used as the coordinate parameters of the center point of the corresponding target image, so as to determine the distance between the corresponding target image and the processing origin according to the coordinate parameters of the center point. If the target image to be processed is a regular image, any point O of the target image can be directly selected, and the distance of the arbitrary point O from the processing starting point (origin) can be obtained. Calculating the distance between the target image and the origin can be based on a variety of selection criteria, such as calculating the distance between the target image and the origin in the X-axis direction, calculating the distance between the target image and the origin in the Y-axis direction, calculating the relative distance between the target image and the origin, etc. Due to the different selection criteria, the candidate processing paths vary. Thus, the above scheme can determine at least one candidate processing path corresponding to multiple target images to be processed based on multiple processing position information, then determine the processing time corresponding to each candidate processing path, and determine the candidate processing path with the shortest processing time as the target processing path, so as to control the processing head to process the object to be processed corresponding to the target image according to the target processing path.
[0085] It should be noted that for each candidate processing path, the control device calculates the processing time based on the movement speed of the laser head and the total length of the path. Assuming that the speed of all processing actions is constant and known, the processing time of each candidate processing path can be determined, and the processing head is controlled to process according to the candidate processing path with the shortest processing time. This improves processing efficiency. In addition, considering that when a processing head (such as a laser head) performs actual processing, such as cutting or engraving a material to be processed, in order to ensure the processing quality (such as fineness, smoothness, etc.), it is necessary to maintain a low speed so that the laser can accurately act on the surface of the material to be processed (the object to be processed). If the processing speed is too fast, it may lead to problems such as inadequate processing, thereby affecting the final processing quality. In addition, when moving between two objects to be processed, the laser is generally not required to operate (i.e., it is turned off). At this time, the laser head can be allowed to move to the next object to be processed at a higher speed, effectively reducing the time spent moving from one object to be processed to another, thereby improving the efficiency of the entire processing process. Therefore, in this embodiment, it is also possible to set the processing speed of the processing head in the actual processing path to be different from the movement speed of the moving path, for example, the processing speed is less than the movement speed. In this way, by distinguishing between processing speed and movement speed, non-processing stage actions can be completed quickly without affecting the processing quality, while avoiding safety hazards caused by excessively high processing speeds, such as material splashing and equipment loss of control.
[0086] In practical applications, different candidate processing paths can be provided based on different selection criteria, and the processing time corresponding to each candidate processing path can be determined. The candidate processing path with the shortest processing time is then selected as the target processing path. The processing head is then controlled to process the material to be processed corresponding to the target image according to the target processing path. This effectively reduces the laser travel distance, shortens the processing time, and thus improves the processing efficiency of the processing equipment.
[0087] In one embodiment, reference Figure 2 The step of obtaining processing position information corresponding to the plurality of target images to be processed specifically includes:
[0088] Step S110, obtaining the minimum bounding rectangle corresponding to each target image to be processed;
[0089] Step S120 : Using the multiple coordinate parameters of the minimum bounding rectangle as multiple coordinate parameters of the corresponding target image to obtain processing position information corresponding to each target image to be processed.
[0090] Specifically, first obtain the minimum enclosing rectangle Rect corresponding to each target image. It should be noted that if the target image is a circle, the minimum enclosing rectangle of the target image is a square with the diameter of the circle as the side length. Then obtain multiple coordinate parameters of the minimum enclosing rectangle on the XY orthogonal axis, namely (x1, y1), (x2, y1), (x1, y2) and (x2, y2). And use the multiple coordinate parameters corresponding to the minimum enclosing rectangle as multiple coordinate parameters of the target image. Among them, x1 is the first distance of the minimum enclosing rectangle from the origin in the X-axis direction, x2 is the second distance of the minimum enclosing rectangle from the origin in the X-axis direction, y1 is the third distance of the minimum enclosing rectangle from the origin in the Y-axis direction, and y2 is the fourth distance of the minimum enclosing rectangle from the origin in the Y-axis direction. In the same minimum enclosing rectangle, the first distance is smaller than the second distance. The third distance is smaller than the fourth distance. Taking target image a as an example, the multiple coordinate parameters of the minimum bounding rectangle corresponding to target image a include (xa1, ya1), (xa2, ya1), (xa1, ya2), and (xa2, ya2). In this way, after obtaining the processing position information corresponding to the multiple target images to be processed, at least one candidate processing path can be determined based on different selection criteria. The processing time corresponding to each candidate processing path is then determined, and the candidate processing path with the shortest processing time is determined as the target processing path. This allows the processing head to be controlled to process the object to be processed corresponding to the target image according to the target processing path.
[0091] In practical applications, when determining the processing path, only the relative positional relationship between the boundary points of the minimum enclosing rectangle corresponding to the target image needs to be considered, without the need to perform complex calculations on all the pixels or vector data of the target image. This not only speeds up the calculation speed, but also reduces the consumption of computer resources, improving the response speed and work efficiency of the processing system. In addition, even if the target image is circular or other non-rectangular shapes, the minimum enclosing rectangle constructed by its diameter (for a circle) can completely contain the image. This means that when the laser head moves along the path planned based on the minimum enclosing rectangle, it can ensure that no part that needs to be processed is missed, thereby ensuring the integrity of the processing.
[0092] Optionally, in one embodiment, the step of determining at least one candidate processing path corresponding to the plurality of target images to be processed specifically includes:
[0093] sorting the plurality of minimum enclosing rectangles based on first minimum distances between the plurality of minimum enclosing rectangles and the processing origin in the X-axis direction, and determining first candidate processing paths corresponding to the plurality of target images based on the first sorting order of the plurality of minimum enclosing rectangles;
[0094] In this embodiment, the selection basis can be set to calculate the first minimum distance between the minimum enclosing rectangle and the processing origin in the X-axis direction, so as to sort the multiple minimum enclosing rectangles according to the multiple first minimum distances to obtain a first sorting order, and then determine the first candidate processing path after sorting the multiple target images according to the first sorting order.
[0095] Optionally, refer to Figure 3 , the step S210 specifically includes:
[0096] Step S211: sorting the plurality of minimum bounding rectangles according to the plurality of first minimum distances in ascending order to obtain a first sorting order of the plurality of minimum bounding rectangles;
[0097] Step S212: Based on the first sorting order of the plurality of minimum bounding rectangles, determine a first candidate processing path starting from the target image corresponding to the minimum bounding rectangle with the smallest first minimum distance and ending at the target image corresponding to the minimum bounding rectangle with the largest first minimum distance.
[0098] In combination with the above embodiments, since the minimum bounding rectangle has two distances from the origin in the X-axis direction, namely the first distance x1 and the second distance x2. Among them, x1 is less than x2, that is, each minimum bounding rectangle x1 is the closest distance of the bounding rectangle to the processing origin in the X-axis direction. Since the initial position of the laser head is the processing origin, it is only necessary to determine the distance x1 of the minimum bounding rectangle corresponding to each target image to be processed from the processing origin in the X-axis direction based on the multiple coordinate parameters of the multiple minimum bounding rectangles, that is, the first minimum distance; then sort the x1 of all the minimum bounding rectangles in order from small to large, and then generate a first sorting order, so as to determine the first candidate processing path based on the first sorting order, with the target image corresponding to the minimum bounding rectangle with the smallest first minimum distance as the starting point and the target image corresponding to the minimum bounding rectangle with the largest first minimum distance as the end point.
[0099] Specifically, refer to Figure 9, the four target images to be processed are a, b, c, and d respectively; the control device can obtain the corresponding minimum bounding rectangles Rect1, Rect2, Rect3, and Rect4 respectively, among which the distance x1 between the minimum bounding rectangle Rect1 corresponding to the target image a and the origin in the X-axis direction is xa1, the distance x1 between the minimum bounding rectangle Rect2 corresponding to the target image b and the origin in the X-axis direction is xb1, the distance x1 between the minimum bounding rectangle Rect3 corresponding to the target image c and the origin in the X-axis direction is xc1, and the distance x1 between the minimum bounding rectangle Rect4 corresponding to the target image d and the origin in the X-axis direction is xd1. Sort the multiple first minimum distances in ascending order as: xa1<xc1<xb1<xd1, and then generate the first sorting order: a, c, b, d; the corresponding first candidate processing paths include Figure 9 The white arrows in the figure indicate the path, which is the actual processing path of the laser head on the object to be processed corresponding to each target image. That is, the movement path is o→a→c→b→d→o. Target image a is closest to the origin in the X-axis direction, and target image d is farthest from the origin in the Y-axis direction. Therefore, target image a is the starting point and target image d is the end point.
[0100] It should be noted that the control device can also sort all the minimum circumscribed rectangles x1 in descending order to generate a first sorting order. That is, the order from large to small is: xd>xb1>xc1>xa1, and then the first sorting order is generated: a, c, b, d; the corresponding candidate processing paths are generated or determined to include Figure 9 The white arrows in the figure indicate the path, i.e., the moving path o→a→c→b→d→o, and the actual processing path of the laser head on the object to be processed corresponding to each target image.
[0101] It is understandable that if the control device controls the machining head to process the object to be processed according to the first candidate machining path. Figure 8 The existing solution shown can also reduce the moving distance of the processing head to a certain extent and improve the processing efficiency of the processing equipment.
[0102] Optionally, the step of determining at least one candidate processing path corresponding to the multiple target images to be processed specifically includes:
[0103] sorting the plurality of minimum enclosing rectangles based on second minimum distances between the plurality of minimum enclosing rectangles and the processing origin in the Y-axis direction, and determining second candidate processing paths corresponding to the plurality of target images based on the second sorting order of the plurality of minimum enclosing rectangles;
[0104] In this embodiment, the selection basis can be set to calculate the second minimum distance between the minimum enclosing rectangle and the processing origin in the Y-axis direction, so that multiple minimum enclosing rectangles are sorted according to the multiple second minimum distances to obtain a second sorting order, and then the second candidate processing path is determined after sorting the multiple target images according to the second sorting order.
[0105] refer to Figure 4 , the step S220 specifically includes:
[0106] Step S221: sorting the plurality of minimum bounding rectangles according to the plurality of second minimum distances in ascending order to obtain a second sorting order of the plurality of minimum bounding rectangles;
[0107] Step S222: Based on the second sorting order of the plurality of minimum bounding rectangles, determine a second candidate processing path starting from the target image corresponding to the minimum bounding rectangle with the smallest second minimum distance and ending at the target image corresponding to the minimum bounding rectangle with the largest second minimum distance.
[0108] In conjunction with the above embodiments, after obtaining the minimum bounding rectangle Rect corresponding to each target image to be processed, since the minimum bounding rectangle has two distances from the origin in the Y-axis direction, namely the third distance y1 and the fourth distance y2. Among them, y1 is less than y2, that is, y1 of each minimum bounding rectangle is the closest distance of the bounding rectangle to the processing origin in the Y-axis direction. Since the initial position of the laser head is the processing origin, it is only necessary to determine the distance y1 of the minimum bounding rectangle corresponding to each target image to be processed from the origin in the Y-axis direction, that is, the second minimum distance, based on the multiple coordinate parameters of the multiple minimum bounding rectangles. Then, the y1 of all the minimum bounding rectangles are sorted in ascending order, thereby generating a second sorting order, so that based on the second sorting order, a second candidate processing path is determined with the target image corresponding to the minimum bounding rectangle with the smallest second minimum distance as the starting point and the target image corresponding to the minimum bounding rectangle with the largest second minimum distance as the end point.
[0109] Specifically, refer to Figure 10, the four target images to be processed are a, b, c, and d; the control device can obtain the corresponding minimum bounding rectangles, Rect1, Rect2, Rect3, and Rect4, respectively. Among them, the minimum bounding rectangle Rect1 corresponding to the target image a to be processed has a distance y1 from the origin in the Y-axis direction of ya1, the minimum bounding rectangle Rect2 corresponding to the target image b to be processed has a distance y1 from the origin in the Y-axis direction of yb1, the minimum bounding rectangle Rect3 corresponding to the target image c to be processed has a distance y1 from the origin in the Y-axis direction of yc1, and the minimum bounding rectangle Rect4 corresponding to the target image d to be processed has a distance y1 from the origin in the Y-axis direction of yd1. And sort them in ascending order as follows: yb1<ya1<yd1<yc1, and then generate the second sorting order as: b, a, d, c; the corresponding generated or determined processing path is Figure 10 The white arrow in the figure indicates the path, which is the actual processing path of the laser head on the object to be processed corresponding to each target image. That is, the movement path of the laser head is:
[0110] o→b→a→d→c→o. The target image b to be processed is closest to the origin in the Y-axis direction, and the target image c is farthest from the origin in the Y-axis direction. Therefore, the target image b is the starting point and the target image c is the end point.
[0111] It should be noted that the control device can also sort all the minimum circumscribed rectangles y1 in descending order to generate a second sorting order. That is, sorting in descending order is: yc1>yd1>ya1>yb1, and then generating a second sorting order: b, a, d, c; the corresponding generated or determined processing path includes Figure 10 The white arrow in indicates the path, i.e., the moving path o→b→a→d→c→o.
[0112] It is understandable that if the control device controls the machining head to process the object to be processed according to the second candidate machining path. Figure 8 The existing solution shown can also reduce the moving distance of the processing head to a certain extent and improve the processing efficiency of the processing equipment.
[0113] Optionally, the step of determining at least one candidate processing path corresponding to the multiple target images to be processed specifically includes:
[0114] The plurality of minimum bounding rectangles are sorted based on third minimum distances between the plurality of minimum bounding rectangles and the processing origin, and third candidate processing paths corresponding to the plurality of target images are determined based on a third sorting order of the plurality of minimum bounding rectangles.
[0115] In this embodiment, the selection basis can be set to calculate the third minimum distance between the minimum enclosing rectangle and the processing origin, so that multiple minimum enclosing rectangles are sorted according to the multiple third minimum distances to obtain a third sorting order, and then the third candidate processing path is determined after sorting the multiple target images according to the third sorting order.
[0116] refer to Figure 5 , the step S230 specifically includes:
[0117] Step S231: sorting the plurality of minimum bounding rectangles according to the plurality of third minimum distances in ascending order to obtain a third sorting order of the plurality of minimum bounding rectangles;
[0118] Step S232: Based on the third sorting order of the plurality of minimum bounding rectangles, determine a third candidate processing path starting from the target image corresponding to the minimum bounding rectangle with the smallest third minimum distance and ending at the target image corresponding to the minimum bounding rectangle with the largest third minimum distance.
[0119] In this embodiment, after obtaining the minimum enclosing rectangle Rect corresponding to each target image to be processed, any point in the minimum enclosing rectangle can be selected, and the relative distance between the arbitrary point and the processing origin can be obtained to obtain the third minimum distance. The arbitrary point includes one of the four coordinate points corresponding to the four corners of the minimum enclosing rectangle or the center point. For example, by selecting the coordinate point (x1, y1), the relative distance A between the coordinate point (xa1, ya1) of the target image a and the processing origin, the relative distance B between the coordinate point (xb1, yb1) of the target image b and the processing origin, the relative distance C between the coordinate point (xc1, yc1) of the target image c and the processing origin, and the relative distance D between the coordinate point (xd1, yd1) of the target image d and the processing origin can be determined. In this way, the third minimum distance corresponding to each target image can be obtained, and then the third minimum distances of all minimum enclosing rectangles are sorted in ascending order, and then a third sorting order is generated, so that based on the third sorting order, a third candidate processing path is determined with the target image corresponding to the minimum enclosing rectangle with the smallest third minimum distance as the starting point and the target image corresponding to the minimum enclosing rectangle with the largest third minimum distance as the end point.
[0120] It is understandable that in practical applications, there may be two or more minimum bounding rectangles of the target images to be processed with x1 and y1 being equal in the X-axis and / or Y-axis directions. Figure 12 As shown, the x1 of the minimum circumscribed rectangles c and e corresponding to the target image to be processed are equal, that is, xc1=xe1. At this time, various situations may occur in the processing sequence sorting process.
[0121] To this end, in one embodiment, reference Figure 6 The sorting of the plurality of minimum bounding rectangles based on the third minimum distances between the plurality of minimum bounding rectangles and the processing origin specifically includes:
[0122] Step S233: determining the minimum bounding rectangle closest to the processing origin based on the third minimum distances between the plurality of minimum bounding rectangles and the processing origin, and recording the minimum bounding rectangle as the starting point minimum bounding rectangle;
[0123] Step S234: Determine the next minimum enclosing rectangle closest to the minimum enclosing rectangle of the starting point according to the distance formula between two points, and use it as the minimum enclosing rectangle of the next starting point. Repeat the above steps until the last minimum enclosing rectangle is determined as the minimum enclosing rectangle of the next starting point.
[0124] Step S235 : Sort the multiple minimum bounding rectangles according to the order in which the multiple minimum bounding rectangles are recorded as the minimum bounding rectangles of the starting points.
[0125] The distance formula between the two points includes:
[0126] sqrt((Xa-Xb) 2 +(Ya-Yb) 2 );
[0127] Among them, the first distance between the same minimum circumscribed rectangle and the processing origin in the X-axis direction is smaller than the second distance between the same minimum circumscribed rectangle and the processing origin in the X-axis direction, and the first distance between the same minimum circumscribed rectangle and the processing origin in the Y-axis direction is smaller than the second distance between the same minimum circumscribed rectangle and the processing origin in the Y-axis direction.
[0128] In this embodiment, the distance between two points can be calculated based on the formula sqrt((Xa-Xb) 2 +(Ya-Yb) 2 ) calculating the third minimum distance between each minimum enclosing rectangle and the processing origin, and comparing the third minimum distances to determine the minimum enclosing rectangle closest to the processing origin, and then calculating the distances between the remaining minimum enclosing rectangles and the current starting point enclosing rectangle according to the distance formula between two points;
[0129] Where Xa is the first distance x1 between the next minimum enclosing rectangle and the processing origin in the X-axis direction, Ya is the first distance y1 between the next minimum enclosing rectangle and the processing origin in the Y-axis direction; Xb is the second distance x2 between the current minimum enclosing rectangle and the processing origin in the X-axis direction; Yb is the second distance y2 between the current minimum enclosing rectangle and the processing origin in the Y-axis direction.
[0130] In this embodiment, the control device first records the minimum enclosing rectangle corresponding to the target image to be processed that is closest to the origin as the starting minimum enclosing rectangle, and then determines the minimum enclosing rectangle closest to the starting minimum enclosing rectangle as the next starting minimum enclosing rectangle, and executes the process in a loop until the last minimum enclosing rectangle is determined as the next starting minimum enclosing rectangle, and then sorts the multiple minimum enclosing rectangles in the order in which the multiple minimum enclosing rectangles are recorded as the starting minimum enclosing rectangle to obtain a third sorting order, so as to determine the processing order of the corresponding multiple target images, and further determine the third candidate processing paths corresponding to the multiple target images.
[0131] Specifically, refer to Figure 11 , the four target images to be processed are a, b, c, and d; the control device can obtain the corresponding minimum bounding rectangles Rect1, Rect2, Rect3, and Rect4, respectively. Among them, the minimum bounding rectangle Rect1 corresponding to the target image to be processed a has a distance x1 from the origin in the X-axis direction of xa1 and x2 of xa2, and a distance y1 from the origin in the Y-axis direction of ya1 and y2 of ya2; the minimum bounding rectangle Rect2 corresponding to the target image to be processed b has a distance x1 from the origin in the X-axis direction of x1 of x2 of x3 of x4. b1, x2 is xb2, the distance y1 from the origin in the Y-axis direction is yb1, and y2 is yb2; the distance x1 from the origin in the X-axis direction is xc1, and x2 is xc2, and the distance y1 from the origin in the Y-axis direction is yc1, and y2 is yc2; the distance x1 from the origin in the X-axis direction is xd1, and x2 is xd2, and the distance y1 from the origin in the Y-axis direction is yd1, and y2 is yd2. First, according to the distance formula sqrt((Xa-Xb)) between two points 2 +(Ya-Yb) 2 ) Determine the minimum enclosing rectangle closest to the origin and use it as the minimum enclosing rectangle. At this time, Xa is the x1 of all target images to be processed, Ya is the y1 of all target images to be processed, Xb and Yb are the coordinate parameters of the origin o, Xb = 0, Yb = 0. Since a is the target image to be processed closest to the origin, the minimum enclosing rectangle corresponding to a is determined as the minimum enclosing rectangle of the starting point. Then continue to use the distance formula between two points sqrt((Xa-Xb) 2 +(Ya-Yb) 2) respectively calculate the distances between the multiple minimum enclosing rectangles corresponding to the multiple remaining target images to be processed and the minimum enclosing rectangle of the starting point, where Xa is the distance x1 between the remaining target images to be processed and the origin in the X-axis direction, Ya is the distance y1 between the remaining target images to be processed and the origin in the Y-axis direction; Xb is the distance x2 between the minimum enclosing rectangle of the starting point and the origin in the X-axis direction; and Yb is the distance y2 between the minimum enclosing rectangle of the starting point and the origin in the Y-axis direction.
[0132] For example, when a is the target image corresponding to the minimum bounding rectangle of the starting point, the distances between the minimum bounding rectangle corresponding to b and the minimum bounding rectangle corresponding to a are calculated as follows:
[0133] Lab=sqrt((Xb1-Xa1) 2 +(Yb1-Ya1) 2 );
[0134] Similarly, the distance between c and a is:
[0135] Lac=sqrt((Xc1-Xa1) 2 +(Yc1-Ya1) 2 );
[0136] The distance between d and a is:
[0137] Lad=sqrt((Xd1-Xa1) 2 +(Yd1-Ya1) 2 );
[0138] The above formula calculates that Lac is the minimum value, so the target image to be processed closest to a is c, and the minimum enclosing rectangle corresponding to c is the minimum enclosing rectangle of the starting point. Then calculate the distances Lcb and Lcd between the remaining b and d and c respectively. Since Lcd < Lcb, the minimum enclosing rectangle corresponding to d is set as the minimum enclosing rectangle of the next starting point. In this way, all minimum enclosing rectangles are recorded as the minimum enclosing rectangle of the next starting point, and then the third sorting order is generated: a, c, d, b; the corresponding third candidate processing path is generated or determined as Figure 11 The white arrows in the figure indicate the path (o→a→c→d→b→o), which is the actual processing path of the processing head when processing the material to be processed corresponding to a, b, c, and d.
[0139] Optionally, the minimum enclosing rectangle closest to the processing origin on the X-axis can be determined according to the above method first, and recorded as the starting minimum enclosing rectangle, and then the minimum enclosing rectangle closest to the starting minimum enclosing rectangle in the X-axis direction among the remaining minimum enclosing rectangles can be determined, and recorded as the next starting minimum enclosing rectangle, until all minimum enclosing rectangles are recorded as the next starting minimum enclosing rectangle, and then a third sorting order is generated, so that the control device can control the processing head to process the objects to be processed corresponding to multiple target images according to the third candidate processing path generated by the third sorting order.
[0140] Optionally, the minimum enclosing rectangle closest to the processing origin on the Y-axis can be determined according to the above method first, and recorded as the starting minimum enclosing rectangle, and then the minimum enclosing rectangle closest to the starting minimum enclosing rectangle in the Y-axis direction among the remaining minimum enclosing rectangles can be determined, and recorded as the next starting minimum enclosing rectangle, until all minimum enclosing rectangles are recorded as the next starting minimum enclosing rectangle, and then a third sorting order is generated, so that the control device can control the processing head to process the objects to be processed corresponding to multiple target images according to the third candidate processing path generated by the third sorting order.
[0141] Through the above method, the minimum enclosing rectangle of the starting point closest to the processing origin and the minimum enclosing rectangle of the next starting point are obtained according to the coordinate parameters of the minimum enclosing rectangle corresponding to all target images and the distance formula between the two points, and the third sorting order is determined according to the order in which all minimum enclosing rectangles are recorded as the minimum enclosing rectangles of the next starting point, thereby generating a third candidate processing path. Alternatively, the minimum enclosing rectangle of the starting point closest to the processing origin in the X-axis / Y-axis direction and the minimum enclosing rectangle of the next starting point are obtained according to the coordinate parameters of the minimum enclosing rectangle corresponding to all target images, and the third sorting order is determined according to the order in which all minimum enclosing rectangles are recorded as the minimum enclosing rectangles of the next starting point, thereby generating a third candidate processing path. If the control device controls the laser head to perform processing according to the third candidate processing path corresponding to the third sorting order. Compared to Figure 8 The existing solution shown reduces the moving distance of the laser head to a certain extent and improves the processing efficiency of the laser equipment.
[0142] In one embodiment of the present invention, the processing time corresponding to the candidate processing path is obtained by the following steps:
[0143] The processing time corresponding to each candidate processing path is determined based on the processing speed of the processing head and the total distance length of each candidate processing path.
[0144] Specifically, in combination with the content of the above embodiment, after determining the first sorting order, the second sorting order, and the third sorting order according to multiple selection criteria, and generating at least three candidate processing paths based on the three sorting orders, the preset time module in the control device can calculate the processing time t1 corresponding to the first candidate processing path Path1, the processing time t2 corresponding to the second candidate processing path Path2, and the processing time t3 corresponding to the third candidate processing path Path3 based on the processing speed of the processing head and the total distance length of each candidate processing path; then compare the sizes of t1, t2, and t3, set the candidate processing path with the shortest processing time as the target processing path, and control the processing head to process the material to be processed corresponding to the image to be processed according to the processing path with the shortest processing time. For example, if t2 < t1 < t3, it means that the second candidate processing path Path2 determined by the second sorting order generated by sorting the minimum circumscribed rectangle y1 corresponding to all the target images to be processed in order from small to large has the shortest processing time, so the second candidate processing path corresponding to the second sorting order is used as the target processing path, and the control device controls the laser head to process the material to be processed corresponding to the image to be processed according to the processing path with the shortest processing time. Figure 10 The white arrows in the figure indicate the path, i.e., o→b→a→d→c→o, to process all objects to be processed, so as to select a better processing method and thus improve the processing efficiency.
[0145] Optionally, after determining the candidate processing path with the shortest processing time as the target processing path, the processing path determination method further includes:
[0146] Generate numerical control instructions according to the target processing path, and control the processing equipment to perform processing along the target processing path according to the numerical control instructions.
[0147] In this embodiment, the processing device or terminal device includes but is not limited to an input module, an image processing module, an analysis module, and a NC code generation module. The control device in the terminal device is used as an example for explanation. A user can input a picture containing multiple images to be processed or other graphic data related to the images to be processed through an input module such as a keyboard or touch screen. The image processing module converts the images to be processed into corresponding grayscale images and outputs the target image obtained after amplifying the grayscale image to the analysis module, so that the analysis module obtains processing position information of the multiple target images and, based on the multiple processing position information, determines at least one candidate processing path corresponding to the multiple target images to be processed. The processing time corresponding to each candidate processing path in the at least one candidate processing path is then determined, and the candidate processing path with the shortest processing time is determined as the target processing path. The NC code generation module generates NC instructions based on the target processing path and directly sends them to a processing device such as a NC machine tool to control the processing device to process along the target processing path, so that the processing device controls the processing head to process the object to be processed according to the NC instructions. And / or, it can be used to generate a gcode file or other format of processing files containing processing control instructions according to the target processing path, and control the processing of the processing equipment and the progress of the processing process by sending the processing files to processing equipment such as CNC machine tools.
[0148] The above method calculates the processing time of candidate machining paths corresponding to three sorting orders: the first, second, and third, using a preset time model. The candidate machining path with the shortest processing time is then selected as the target machining path for machining the material to be machined. This further reduces the travel distance of the machining head and the number of GCodes generated, thereby reducing the memory space required by the control device. Selecting the optimal machining path from multiple candidate machining paths effectively reduces the machining time of the machining equipment and significantly improves machining efficiency.
[0149] In one embodiment, reference Figure 7 The step of obtaining processing position information corresponding to the plurality of target images to be processed specifically includes:
[0150] Step S010: receiving multiple target images of the object to be processed;
[0151] Step S020: converting the received multiple target images into corresponding multiple grayscale images;
[0152] Step S030: amplify the plurality of grayscale images according to the processing area and the laser density, and determine the plurality of grayscale images after amplification as a plurality of target images to obtain processing position information of the plurality of target images to be processed.
[0153] In this embodiment, a user can first import multiple images corresponding to the objects to be processed into a processing device or terminal device, so that the control device of the processing device or terminal device receives the multiple images to be processed and converts the received multiple images to corresponding grayscale images (including black and white binary images) to facilitate display of the specific locations to be processed and the locations not to be processed on the display screen of the processing device or terminal device. The control device can also enlarge the converted black and white binary images based on the processing format (processing area) and laser density, for example, enlarging a 10mm×10mm black and white binary image to a 100mm×100mm black and white binary image, and then setting the enlarged black and white binary image as the target image, so that the control device can obtain processing position information of the multiple target images. Then, based on the obtained multiple processing position information, at least one candidate processing path corresponding to the multiple target images to be processed is determined; the processing time corresponding to each candidate processing path in the at least one candidate processing path is then determined, and the candidate processing path with the shortest processing time is determined as the target processing path. Finally, the laser head is controlled to emit light and a Gcode instruction that can be understood by the processing device is generated based on the target processing path to perform image processing. Among them, the processing format and laser density are set in advance by R&D personnel.
[0154] Through this method, the processing equipment can convert all images to be processed, imported by the user, into grayscale images and perform magnification processing according to the user's needs. This allows the processing position information of multiple target images obtained after the magnification process to be obtained, and then determine candidate processing paths and the target processing path with the shortest processing time among the candidate processing paths. This reduces the movement path of the laser head and improves the processing efficiency of the processing equipment.
[0155] The present invention proposes a processing device, referring to Figure 13 , the processing equipment includes:
[0156] Slide rails;
[0157] a processing head, the processing head being slidably disposed on the slide rail;
[0158] A communication component 20, configured to receive a target machining path obtained according to any one of the steps of the machining path determination method described above;
[0159] The controller 60 controls the machining head to move on the slide rail to perform machining based on the target machining path.
[0160] Figure 13The structural diagram of the processing equipment provided by an embodiment of the present application is schematically shown. The processing equipment includes a housing, a processing head 50, a laser tube 30, a slide rail 80, a communication component 20 and a controller 60. The housing includes an upper shell 90 and a bottom shell 70. The processing head 50 is slidably arranged on the slide rail 80. The communication component 20 is used to receive the target processing path obtained by the steps of the method provided in the above embodiment. Based on the target processing path, the controller 60 controls the processing head 50 to move on the slide rail 80 to process the surface of the processing material. Among them, the communication component 20 and the controller 60 are installed inside the back plate of the laser tube 30, Figure 13 The middle viewing angle is not visible and is therefore shown by connecting the boxes with dotted lines.
[0161] In one embodiment, a reflector 10 is disposed between the processing head 50 and the laser tube 30 . The light beam generated by the laser tube 30 is reflected by the reflector 10 to the processing head 50 , and then is reflected, focused, etc. and emitted to process the workpiece.
[0162] In one embodiment, the processing head 50 can generate a light spot. In another embodiment, the light spot can be generated by other components, such as the laser tube 30 of a carbon dioxide laser tube, and enter the beam output device through the reflector 10, and finally pass through the processing head 50 and then be emitted to process the workpiece. The processing head can emit laser light, but it is not limited to emitting laser light.
[0163] In one embodiment, the housing of the processing equipment, such as Figure 13 The upper shell 90 and the bottom shell 70 shown together enclose an interior space for accommodating processing materials. The upper shell 90 and the bottom shell 70 can be detachably connected or fixedly connected, or the upper shell 90 and the bottom shell 70 can be integrally formed. In one embodiment, the upper shell 90 is also provided with a rotatable cover. The operator can open or close the cover to open the interior space for inserting or removing processing materials.
[0164] The blocking and / or filtering effects of the upper shell 90 and the bottom shell 70 can prevent the laser emitted by the processing head 50 from overflowing during operation and causing personal injury to the operator.
[0165] For example, Figure 13 As shown, the slide rail 80 is set in the above-mentioned internal space, and the processing head 50 is installed on the slide rail 80. The slide rail 80 can be an X-axis and Y-axis guide rail. The X-axis and Y-axis guide rails can be linear guide rails or guide rails in which the optical axis and rollers slide together. It only needs to be able to drive the processing head 50 to move and process on the X-axis and Y-axis. Figure 15 The moving axes include an X-axis and a Y-axis, and the X-axis and the Y-axis are orthogonal. Optionally, a Z-axis moving track can also be provided in the processing head 50 for moving in the Z-axis direction for focusing before and / or during processing.
[0166] It should be noted that in this embodiment, the processing head can be, but is not limited to, a laser head, a cutter, a cutting head, a pen head, or a drill head. The processing head is slidably mounted on a slide rail; the slide rail is used to drive the processing head in directions such as the X and Y directions. Optionally, the communication component 20 is used to receive a target processing path obtained according to the aforementioned processing path determination method. Based on the target processing path, the controller 60 controls the movement of the processing head on the slide rail to perform processing according to the target processing path.
[0167] Specifically, a picture containing multiple images to be processed or other graphic parameters related to the images to be processed can be input into a terminal device 200 such as a host computer or directly input into a processing device, and the terminal device 200 or the processing device converts the received multiple images to be processed into corresponding multiple grayscale images according to the input content; and the multiple grayscale images are amplified according to the area of the processing area and the laser density, and the multiple grayscale images after the amplification process are determined as multiple target images to obtain data such as the positions, graphic shapes, etc. of the multiple target images to be processed.
[0168] It is worth noting that since the processing equipment of the present invention is based on the above-mentioned processing path determination method, the embodiments of the processing equipment of the present invention include all technical solutions of all embodiments of the above-mentioned processing path determination method, and the technical effects achieved are also exactly the same, which will not be repeated here.
[0169] The present invention proposes a processing system, referring to Figure 14 , the processing system comprises:
[0170] a processing device 40, the processing device 40 comprising a processing device base plate and a processing head, the processing device base plate comprising a processing area for placing a material, the processing head being adapted to move over the processing area; and
[0171] The terminal device 200 communicates with the processing device 40, and the terminal device 200 is used to execute any of the above-mentioned processing path determination methods.
[0172] The terminal device 200 (such as the processing control device 1, the processing control device 2, etc.) includes but is not limited to an input module, an image processing module, an analysis module, and a numerical control code generation module. Among them, the user can input a picture containing multiple images to be processed or other graphic data related to the images to be processed through an input module such as a keyboard and a touch screen. The image processing module converts the image to be processed into a corresponding grayscale image, and outputs the target image obtained after amplifying the grayscale image to the analysis module, so that the analysis module obtains the processing position information of the multiple target images and determines at least one candidate processing path corresponding to the multiple target images to be processed based on the multiple processing position information; then determines the processing time corresponding to each candidate processing path in the at least one candidate processing path, and determines the candidate processing path with the shortest processing time as the target processing path. The numerical control code generation module generates a numerical control instruction based on the target processing path, and directly sends it to the processing equipment 40 such as a numerical control machine tool to control the processing equipment 40 to process along the target processing path, so that the processing equipment 40 controls the processing head to process on the object to be processed according to the numerical control instruction. And / or, it can be used to generate a gcode file or a processing file in other formats containing processing control instructions according to the target processing path, and control the processing of the processing equipment 40 and the progress of the processing process by sending the processing file to the processing equipment 40 such as a CNC machine tool.
[0173] Optionally, the terminal device 200 includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a processing control program that can be executed by the at least one processor, and the processing control program is executed by the at least one processor so that the at least one processor can execute the processing path determination method in the above embodiment. The terminal device 200 in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The computer device such as the terminal device 200 shown in this application is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present application.
[0174] Computer devices such as the terminal device 200 may include control components such as a processing device (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). Various programs and data required for the operation of the computer device are also stored in the RAM. The processing device, ROM, and RAM are connected to each other via a bus. The input / output (I / O) interface is also connected to the bus. Generally, the following systems can be connected to the I / O interface: input devices such as a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices such as a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices such as a magnetic tape, a hard disk, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices wirelessly or by wire to exchange data.
[0175] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0176] It is worth noting that since the processing system of the present invention is based on the above-mentioned processing path determination method, the embodiments of the processing system of the present invention include all technical solutions of all embodiments of the above-mentioned processing path determination method, and the technical effects achieved are also exactly the same, which will not be repeated here.
[0177] The present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any one of the above-mentioned methods for determining a machining path are implemented.
[0178] The computer program product provided in this application is used to address the problem that when multiple images need to be processed, the image closest to the origin is generally selected for processing by default, resulting in a long time and low work efficiency for processing all images. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as those of the processing control method provided in the above embodiments, and will not be elaborated here.
[0179] It is worth noting that since the computer program product of the present invention is based on the above-mentioned processing path determination method, the embodiments of the computer program product of the present invention include all technical solutions of all embodiments of the above-mentioned processing path determination method, and the technical effects achieved are also exactly the same, which will not be repeated here.
[0180] The present invention also proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned processing path determination methods are implemented.
[0181] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0182] The computer-readable storage medium may be included in a computer device, or may exist independently and not incorporated into the computer device. The computer-readable storage medium carries one or more programs that, when executed by the computer device, cause the computer device to: obtain processing position information corresponding to a plurality of target images to be processed; determine, based on the plurality of processing position information, at least one candidate processing path corresponding to the plurality of target images to be processed; determine the processing time corresponding to each of the at least one candidate processing path, and determine the candidate processing path with the shortest processing time as the target processing path.
[0183] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0184] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of 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 an order different from that marked in the accompanying drawings. For example, two boxes represented in succession 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, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0185] The modules involved in the embodiments of the present application can be implemented by software or hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0186] It is worth noting that since the storage medium of the present invention is based on the above-mentioned processing path determination method, the embodiments of the storage medium of the present invention include all technical solutions of all embodiments of the above-mentioned processing path determination method, and the technical effects achieved are also exactly the same, which will not be repeated here.
[0187] The above descriptions are merely optional embodiments of the present invention and do not limit the patent scope of the present invention. All equivalent structural transformations made using the contents of the present invention's description and drawings, or direct / indirect applications in other related technical fields within the scope of the present invention are included in the patent protection scope of the present invention.
Claims
1. A method for determining a machining path, characterized in that: The processing path determination method includes: Obtaining processing position information corresponding to each of the plurality of target images to be processed; Determining at least one candidate processing path corresponding to the plurality of target images to be processed according to the plurality of processing position information; The processing time corresponding to each candidate processing path in the at least one candidate processing path is determined, and the candidate processing path with the shortest processing time is determined as the target processing path.
2. The method for determining a machining path according to claim 1, wherein: The step of obtaining processing position information corresponding to the plurality of target images to be processed specifically includes: Obtain the minimum enclosing rectangle corresponding to each target image to be processed; The multiple coordinate parameters of the minimum circumscribed rectangle are used as the multiple coordinate parameters of the corresponding target image to obtain processing position information corresponding to each target image to be processed.
3. The method for determining a machining path according to claim 2, wherein: The step of determining at least one candidate processing path corresponding to the plurality of target images to be processed specifically includes: The plurality of minimum enclosing rectangles are sorted based on first minimum distances between the plurality of minimum enclosing rectangles and the processing origin in the X-axis direction, and first candidate processing paths corresponding to the plurality of target images are determined based on the first sorting order of the plurality of minimum enclosing rectangles.
4. The method for determining a machining path according to claim 2, wherein: The step of determining at least one candidate processing path corresponding to the plurality of target images to be processed specifically includes: Based on the second minimum distances between the multiple minimum enclosing rectangles and the processing origin in the Y-axis direction, the multiple minimum enclosing rectangles are sorted, and based on the second sorting order of the multiple minimum enclosing rectangles, second candidate processing paths corresponding to the corresponding multiple target images are determined.
5. The method for determining a machining path according to claim 2, wherein: The step of determining at least one candidate processing path corresponding to the plurality of target images to be processed specifically includes: The plurality of minimum bounding rectangles are sorted based on third minimum distances between the plurality of minimum bounding rectangles and the processing origin, and third candidate processing paths corresponding to the plurality of target images are determined based on a third sorting order of the plurality of minimum bounding rectangles.
6. The method for determining a machining path according to claim 3, wherein: The step of sorting the plurality of minimum bounding rectangles and determining first candidate processing paths corresponding to the plurality of target images based on a first sorting order of the plurality of minimum bounding rectangles specifically includes: sorting the plurality of minimum bounding rectangles by the plurality of first minimum distances in ascending order to obtain a first sorting order of the plurality of minimum bounding rectangles; Based on the first sorting order of the plurality of minimum bounding rectangles, a first candidate processing path is determined, which starts from the target image corresponding to the minimum bounding rectangle with the smallest first minimum distance and ends at the target image corresponding to the minimum bounding rectangle with the largest first minimum distance.
7. The method for determining a machining path according to claim 4, wherein: The step of sorting the plurality of minimum bounding rectangles and determining the second candidate processing paths corresponding to the plurality of target images based on a second sorting order of the plurality of minimum bounding rectangles specifically includes: sorting the plurality of minimum bounding rectangles according to the second minimum distances in ascending order to obtain a second sorting order of the plurality of minimum bounding rectangles; Based on the second sorting order of the plurality of minimum bounding rectangles, a second candidate processing path is determined, starting from the target image corresponding to the minimum bounding rectangle with the smallest second minimum distance and ending at the target image corresponding to the minimum bounding rectangle with the largest second minimum distance.
8. The method for determining a machining path according to claim 5, wherein: The step of sorting the plurality of minimum bounding rectangles and determining third candidate processing paths corresponding to the plurality of target images based on a third sorting order of the plurality of minimum bounding rectangles specifically includes: sorting the plurality of minimum bounding rectangles by the plurality of third minimum distances in ascending order to obtain a third sorting order of the plurality of minimum bounding rectangles; Based on the third sorting order of the plurality of minimum bounding rectangles, a third candidate processing path is determined, which starts from the target image corresponding to the minimum bounding rectangle with the smallest third minimum distance and ends at the target image corresponding to the minimum bounding rectangle with the largest third minimum distance.
9. The method for determining a machining path according to claim 5, wherein: The sorting of the plurality of minimum bounding rectangles based on the third minimum distances between the plurality of minimum bounding rectangles and the processing origin specifically includes: Determine the minimum bounding rectangle closest to the processing origin based on the third minimum distances between the plurality of minimum bounding rectangles and the processing origin, and record it as the starting point minimum bounding rectangle; Determine the next minimum enclosing rectangle closest to the minimum enclosing rectangle of the starting point according to the distance formula between two points, and use it as the minimum enclosing rectangle of the next starting point. Repeat the above steps until the last minimum enclosing rectangle is determined as the minimum enclosing rectangle of the next starting point. The plurality of minimum enclosing rectangles are sorted according to the order in which the plurality of minimum enclosing rectangles are recorded as the minimum enclosing rectangles of the starting points.
10. The method for determining a machining path according to claim 9, wherein: The distance formula between two points includes: <h2 style=";text-align:left;direction:ltr">sqrt((Xa-Xb)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +(Ya-Yb)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> ); Where Xa is the first distance between the next minimum enclosing rectangle and the processing origin in the X-axis direction, and Ya is the first distance between the next minimum enclosing rectangle and the processing origin in the Y-axis direction; Xb is the second distance between the current minimum enclosing rectangle and the processing origin in the X-axis direction; and Yb is the second distance between the current minimum enclosing rectangle and the processing origin in the Y-axis direction. Among them, the first distance between the same minimum circumscribed rectangle and the processing origin in the X-axis direction is smaller than the second distance between the same minimum circumscribed rectangle and the processing origin in the X-axis direction, and the first distance between the same minimum circumscribed rectangle and the processing origin in the Y-axis direction is smaller than the second distance between the same minimum circumscribed rectangle and the processing origin in the Y-axis direction.
11. The method for determining a machining path according to claim 1, wherein: The step of obtaining processing position information corresponding to the plurality of target images to be processed specifically includes: receiving a plurality of to-be-processed images of an object to be processed; Converting the received multiple images to be processed into corresponding multiple grayscale images; The plurality of grayscale images are amplified according to the processing area and the laser density, and the amplified plurality of grayscale images are determined as a plurality of target images to obtain processing position information of the plurality of target images to be processed.
12. The method for determining a machining path according to claim 1, wherein: The processing time corresponding to the candidate processing path is obtained by the following steps: The processing time corresponding to each candidate processing path is determined based on the processing speed of the processing head and the total distance length of each candidate processing path.
13. The method for determining a machining path according to any one of claims 1 to 12, wherein: After determining the candidate processing path with the shortest processing time as the target processing path, the processing path determination method further includes: Generate numerical control instructions according to the target processing path, and control the processing equipment to perform processing along the target processing path according to the numerical control instructions.
14. A processing equipment, characterized in that, The processing equipment includes: Slide rails; a processing head, the processing head being slidably disposed on the slide rail; A communication component, the communication component being configured to receive a target machining path obtained according to the steps of the machining path determination method according to any one of claims 1 to 13; A controller is provided for controlling the machining head to move on the slide rail to perform machining based on the target machining path.
15. A processing system, characterized in that: The processing system comprises: A processing device, the processing device comprising a processing device base plate and a processing head, the processing device base plate comprising a processing area for placing a material, the processing head being adapted to move over the processing area; and A terminal device communicating with the processing device, wherein the terminal device is used to execute the processing path determination method according to any one of claims 1 to 13.
16. 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 steps of the machining path determination method according to any one of claims 1 to 13 are implemented.
17. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the machining path determination method according to any one of claims 1 to 13 are implemented.
Citation Information
Cited By
Ceramic plate laser processing path planning method and related equipment
CN122583723A