Coating path planning method and storage medium
Patent Information
- Application Number
- CN202610908531.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]然而,现有方法在处理复杂多边形区域时存在明显不足
[0008]本申请公开了一种涂覆路径规划方法及存储介质,所述方法包括获取待涂覆区域的几何轮廓,将涂覆扫描线与所述几何轮廓的全部扫描线交点作为扫描线交点集合;从所述扫描线交点集合中确定当前涂覆子路径起点,将所述当前涂覆子路径起点所在的所述涂覆扫描线作为当前涂覆子路径;从所述扫描线交点集合中确定与所述当前涂覆子路径的终点距离最近的所述扫描线交点作为后续涂覆子路径的起点,并将所述后续涂覆子路径的起点所在的所述涂覆扫描线作为后续涂覆子路径;将所述后续涂覆子路径设置为所述当前涂覆子路径,并返回到步骤S2,直至全部所述扫描线交点均生成对应的涂覆子路径。通过上述方式,本申请以当前涂覆子路径终点为基准,从扫描线交点集合中迭代选取距离最近的交点作为后续起点,自动优化涂覆子路径的衔接顺序,显著减少喷枪在相邻线段间的空行程距离,降低因长距离移动导致的喷涂中断间隔,使涂覆路径适应不同交点数量、支持间断或不间断涂覆模式切换,并减少无效移动,进而提高了涂覆效率。
Smart Images

Figure CN122839615A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of integrated circuit technology, and in particular to a coating path planning method and a storage medium. Background Technology
[0002] Coating path planning is a crucial step in fields such as automated spraying, 3D printing, and surface treatment, and the rationality of the path directly affects coating efficiency and product quality. Currently, common coating path planning methods are mainly based on scan line filling algorithms, which generate a set of parallel scan lines, calculate the intersection points of the scan lines with the boundary of the area to be coated, and connect these intersection points sequentially to form the coating path.
[0003] However, existing methods have significant shortcomings when dealing with complex polygonal regions. When the number of intersections between the scan line and the polygon boundary exceeds two, the traditional simple beginning-end connection method easily leads to a large number of invalid movements (i.e., empty strokes) in the coating path, especially when the boundary lines of the polygon are inconsistent. Frequent boundary crossings significantly reduce coating efficiency. In addition, existing methods lack an effective distinction between discontinuous and continuous coating scenarios, and cannot flexibly switch path strategies according to actual process requirements. This results in unreasonable path planning in scenarios requiring discontinuous coating, increasing unnecessary empty strokes.
[0004] Therefore, how to adapt the coating path to different numbers of intersections, support the switching between intermittent and continuous coating modes, reduce invalid movement, and thus improve coating efficiency has become an urgent technical problem to be solved. Summary of the Invention
[0005] This application provides a coating path planning method and a storage medium to improve coating efficiency.
[0006] In a first aspect, this application provides a coating path planning method, the method comprising: S1. Obtain the geometric contour of the area to be coated, and take all the intersections of the coating scan line and the geometric contour as the scan line intersection set; S2. Determine the starting point of the current coating sub-path from the set of scan line intersections, and take the coating scan line where the starting point of the current coating sub-path is located as the current coating sub-path; S3. Determine the scan line intersection point closest to the end point of the current coating sub-path from the set of scan line intersection points, and use the coating scan line containing the start point of the subsequent coating sub-path as the subsequent coating sub-path; S4. Set the subsequent coating sub-path as the current coating sub-path and return to step S2 until all the scan line intersections have generated corresponding coating sub-paths.
[0007] Secondly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the coating path planning method as described above.
[0008] This application discloses a coating path planning method and storage medium. The method includes obtaining the geometric contour of the area to be coated; taking all the intersection points of the coating scan line and the geometric contour as a set of scan line intersection points; determining the starting point of the current coating sub-path from the set of scan line intersection points; taking the coating scan line where the starting point of the current coating sub-path is located as the current coating sub-path; determining the scan line intersection point closest to the end point of the current coating sub-path from the set of scan line intersection points as the starting point of the subsequent coating sub-path; taking the coating scan line where the starting point of the subsequent coating sub-path is located as the subsequent coating sub-path; setting the subsequent coating sub-path as the current coating sub-path; and returning to step S2 until all the scan line intersection points have generated corresponding coating sub-paths. By using the above method, this application takes the current coating sub-path endpoint as a reference, iteratively selects the nearest intersection point from the scan line intersection point set as the subsequent starting point, automatically optimizes the connection sequence of the coating sub-path, significantly reduces the idle travel distance of the spray gun between adjacent line segments, reduces the spraying interruption interval caused by long-distance movement, makes the coating path adaptable to different numbers of intersection points, supports the switching of intermittent or non-intermittent coating modes, and reduces invalid movement, thereby improving coating efficiency. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic flowchart of a coating path planning method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the starting and ending points of a coating path planning method provided in an embodiment of this application; Figure 3 This is a schematic diagram of continuous coating of a coating path planning method provided in an embodiment of this application; Figure 4 This is a schematic diagram of interrupted coating of a coating path planning method provided in an embodiment of this application. Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0012] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0013] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0014] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0015] Embodiments of this application provide a coating path planning method and a storage medium. This coating path planning method can be applied to a server. Using the current coating sub-path endpoint as a reference, iteratively selects the nearest intersection point from the scan line intersection point set as the subsequent starting point, automatically optimizing the connection sequence of the coating sub-path. This significantly reduces the idle travel distance of the spray gun between adjacent line segments, reduces spraying interruption intervals caused by long-distance movement, allows the coating path to adapt to different numbers of intersection points, supports switching between intermittent and continuous coating modes, and reduces invalid movement, thereby improving coating efficiency.
[0016] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0017] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a coating path planning method provided in an embodiment of this application. This coating path planning method can be applied in a server to identify users applying for marketing activities through a terminal, thereby improving coating efficiency.
[0018] like Figure 1 As shown, the coating path planning method specifically includes steps S1 to S4.
[0019] S1. Obtain the geometric contour of the area to be coated, and take all the intersections of the coating scan line and the geometric contour as the scan line intersection set; S2. Determine the starting point of the current coating sub-path from the set of scan line intersections, and take the coating scan line where the starting point of the current coating sub-path is located as the current coating sub-path; S3. Determine the scan line intersection point closest to the end point of the current coating sub-path from the set of scan line intersection points, and use the coating scan line containing the start point of the subsequent coating sub-path as the subsequent coating sub-path; S4. Set the subsequent coating sub-path as the current coating sub-path and return to step S2 until all the scan line intersections have generated corresponding coating sub-paths.
[0020] Specifically, the system provides users with various region setting tools through the human-computer interaction interface, including a rectangle tool, a polygon tool, and a polyline tool. When the user selects the rectangle tool, the system responds to mouse drag operations on the acquired workpiece image, using the drag start and end points as the diagonal vertices of the rectangle to generate a rectangular coating area. When the user selects the polygon tool, the system responds to mouse click operations sequentially, connecting the clicked positions to form a closed polygon coating area to cover the irregular or non-standard shaped workpiece surface to be coated. After the user completes the region setting, the system detects and confirms that the set area is a valid closed area, stores this closed area as the region to be coated, and records the boundary contour coordinates of this area as the basic geometric constraint for subsequent scan line intersection calculations. If the user also sets a shielding area, the boundary of the shielding area is first obtained and then clipped from the original coating area to generate the region to be coated after removing the shielding area.
[0021] The system invokes a pre-defined scan line algorithm to traverse and calculate the area to be coated, generating a set of scan line intersections containing all valid intersections. Subsequently, based on preset initial rules (such as starting from the upper left corner of the area or a specific coordinate point), the system selects an intersection point from this set as the starting point of the current coating sub-path, and locks the coating scan line containing that starting point, establishing it as the current coating sub-path for the coating operation to be performed.
[0022] After completing the planning of the current coating sub-path, calculate the distance between the end point of the sub-path (i.e., another intersection point on the scan line) and all intersection points in the scan line intersection point set that have not been planned as the starting point of any sub-path. Select the intersection point with the smallest distance as the starting point of the subsequent coating sub-path, and determine the coating scan line containing this starting point as the subsequent coating sub-path.
[0023] The subsequent coating sub-path determined in step S3 is updated to the new current coating sub-path. Then, the process of "determining the starting point → calculating the nearest intersection point → updating the sub-path" is repeated, returning to step S2. In each iteration, the nearest intersection point to the current sub-path endpoint is selected from the remaining unused scan line intersection points, until all intersection points in the scan line intersection point set are assigned to the corresponding coating sub-path. This ultimately forms a continuous and efficient coating path that covers the entire coating area.
[0024] In some embodiments, such as Figure 2 As shown, Figure 2 This is a schematic diagram of the starting and ending points of a coating path planning method provided in an embodiment of this application.
[0025] exist Figure 2 In this process, point A can be randomly selected as the starting point of the current coating sub-path, AB is the current coating sub-path, and B is the ending point of the current coating sub-path. For point B, the closest scan line intersection to point B is point C. Therefore, C is selected as the starting point of the subsequent coating sub-path, and CD is the corresponding subsequent coating sub-path, and D is the ending point of the subsequent coating sub-path.
[0026] And so on, Figure 2 The last scan line intersection of the short coating scan line in the upper left is point E. For point E, point F is the nearest scan line intersection, therefore the subsequent coating sub-path is FG. For point G, there are two scan line intersections that are closest and equidistant from it, namely points I and H. In this case, point I can be randomly selected as the starting point of the current coating sub-path, or point H can be selected as the starting point of the current coating sub-path.
[0027] Accordingly, if point I is taken as the starting point of the current coating sub-path, then according to the above rules, the short coating scan line in the upper right corner will be coated first, until point J is reached. For point J, the nearest intersection with the scan line is point H, so point H will be taken as the starting point of the current coating sub-path. Figure 2 The long coating scan lines below are coated sequentially, eventually reaching point K to complete the entire coating operation.
[0028] This embodiment discloses a coating path planning method and storage medium. The method includes obtaining a set of scan line intersection points generated by a scan line algorithm; determining the starting point of the current coating sub-path from the set of scan line intersection points; taking the coating scan line where the starting point of the current coating sub-path is located as the current coating sub-path; determining the scan line intersection point closest to the end point of the current coating sub-path from the set of scan line intersection points as the starting point of the subsequent coating sub-path; taking the coating scan line where the starting point of the subsequent coating sub-path is located as the subsequent coating sub-path; setting the subsequent coating sub-path as the current coating sub-path; and returning to step S2 until all scan line intersection points have generated corresponding coating sub-paths. Through the above method, this application uses the end point of the current coating sub-path as a reference, iteratively selecting the closest intersection point from the set of scan line intersection points as the subsequent starting point, automatically optimizing the connection order of coating sub-paths, significantly reducing the idle travel distance of the spray gun between adjacent line segments, reducing the spraying interruption interval caused by long-distance movement, making the coating path adaptable to different numbers of intersection points, supporting the switching between intermittent or continuous coating modes, and reducing invalid movement, thereby improving coating efficiency.
[0029] based on Figure 1 The embodiment shown further includes: If there are at least two equally spaced scan line intersections in the set of scan line intersections that are closest to and equal to the end point of the current coating sub-path, then one of the equally spaced scan line intersections is randomly selected as the starting point of the subsequent coating sub-path.
[0030] Specifically, such as Figure 2 As shown, for point G, there are two scan line intersections that are closest to it and equidistant, namely points I and H. In this case, point I can be randomly selected as the starting point of the current coating sub-path, or point H can be selected as the starting point of the current coating sub-path.
[0031] Accordingly, if point H is taken as the starting point of the current coating sub-path, then according to the above rules, the longer coating scan lines below will be coated first, until point K is reached. For point K, the nearest intersection with the scan line is point I, so point I will be taken as the starting point of the current coating sub-path. Figure 2 The short coating scan lines in the upper right corner are applied sequentially until they reach point J, completing the entire coating operation.
[0032] based on Figure 1 The embodiment shown further includes: If there are at least two equally spaced scan line intersections in the set of scan line intersections that are closest to and equal to the end point of the current coating sub-path, then calculate the subsequent global distance corresponding to each of the equally spaced scan line intersections as the starting point of the subsequent coating sub-path. The intersection of the equidistant scan lines with the smallest subsequent global distance is determined as the starting point of the subsequent coating path.
[0033] Specifically, when traversing the set of scan line intersections to find the intersection closest to the current coating sub-path endpoint, if at least two intersections are detected that are equal to the current endpoint and both are the minimum value, these intersections are marked as equidistant scan line intersections.
[0034] For each intersection of equidistant scan lines, it is assumed to be the starting point of the subsequent coating sub-path. Based on this assumed starting point, the nearest intersection point iterative search continues to simulate and generate a complete candidate path from this assumed starting point until all remaining intersection points are covered. The sum of the connection distances of all adjacent coating sub-paths in the candidate path is calculated as the subsequent global distance corresponding to the assumed starting point. The global distance reflects the total empty travel cost of all remaining coating paths when this equidistant intersection point is selected as the starting point.
[0035] By comparing the subsequent global distances corresponding to the intersections of each equidistant scan line, the intersection of the equidistant scan line with the smallest global distance is selected and determined as the starting point of the subsequent coating sub-path. By introducing a global distance evaluation mechanism, in cases of ambiguity where local distances are equal, the intersection point that minimizes the empty travel of the remaining overall coating path is prioritized, avoiding overall path degradation caused by local optima and improving the global optimality of coating path planning.
[0036] based on Figure 1 In the illustrated embodiment, step S3 includes: Calculate the distance between the end point of the current coated sub-path and the intersection points of each of the uncoated scan lines; The intersection of the scan lines with the smallest distance is determined as the starting point of the subsequent coating sub-path.
[0037] Specifically, obtain the coordinates of the end point of the current coated sub-path, traverse all scan line intersections in the scan line intersection set that have not yet generated coated sub-paths, calculate the distance between each uncoated intersection and the end point, and establish a mapping record between each intersection and its corresponding distance value.
[0038] Compare the above distance values, select the intersection point of the scan lines with the smallest distance value, determine the intersection point as the starting point of the subsequent coating sub-path, and take the coating scan line where the starting point is located as the subsequent coating sub-path.
[0039] based on Figure 1 The embodiment shown further includes: All the coating sub-paths are planned by pre-setting coating rules to generate the target coating path plan.
[0040] In a specific embodiment, all the coating sub-paths are planned using preset coating rules to generate a target coating path plan, including: When the preset coating rule is continuous coating, the end point of the current coating sub-path is connected to the start point of the subsequent coating sub-path to generate an inter-scan line coating path. The target coating path plan is generated based on the coating paths between each scan line and all the coating sub-paths.
[0041] Specifically, such as Figure 3 As shown, Figure 3 This is a schematic diagram of continuous coating of a coating path planning method provided in an embodiment of this application.
[0042] When the preset coating rule is continuous coating (i.e., coating is required even between two adjacent coating scan lines), after step S3 determines the starting point of the subsequent coating sub-path, the ending point of the current coating sub-path is connected to the starting point of the subsequent coating sub-path with a line segment. The line segment is the coating path between scan lines, which is used to guide the coating nozzle to move continuously between two scan lines and perform coating, ensuring uninterrupted coverage of the entire coating area.
[0043] Repeat the aforementioned steps until all scan line intersections are assigned to their corresponding coating sub-paths, and a corresponding inter-scan line coating path has been generated between each pair of adjacent sub-paths. Finally, sequentially splice all coating sub-paths (i.e., straight line segments on each scan line) and all inter-scan line coating paths (i.e., straight line segments connecting adjacent sub-paths) in the planned order to form a complete and continuous target coating path.
[0044] In a specific embodiment, all the coating sub-paths are planned using preset coating rules to generate a target coating path plan, including: When the preset coating rule is to interrupt coating, after coating the end point of the current coating sub-path according to the coating sub-path, lift the nozzle to stop coating, and start coating after moving to the starting point of the subsequent coating sub-path.
[0045] Specifically, such as Figure 4 As shown, Figure 4 This is a schematic diagram of interrupted coating in a coating path planning method provided in an embodiment of this application.
[0046] When the preset coating rule is to interrupt coating, after the coating at the end of the current coating sub-path is completed, the coating nozzle is immediately lifted upwards and the coating action is stopped to avoid unnecessary spraying on the workpiece during the idle travel. Then, the nozzle is moved along the shortest path to the starting position of the next coating sub-path. Upon arrival, coating is restarted to begin the spraying operation for the next coating sub-path. This process is repeated until all coating sub-paths are completed.
[0047] based on Figure 1 In the illustrated embodiment, step S1 includes: Obtain the area to be coated, wherein the area to be coated is a rectangular area or a polygonal area; The intersection points of the coated scan line and the scan line of the coated area are determined by the scan line algorithm, and all the scan line intersection points are taken as the scan line intersection point set. The coating scan lines are horizontal or vertical lines arranged at a preset interval.
[0048] Specifically, the system provides users with various region setting tools through the human-computer interaction interface, including a rectangle tool, a polygon tool, and a polyline tool. When the user selects the rectangle tool, the system responds to mouse drag operations on the acquired workpiece image, using the drag start and end points as the diagonal vertices of the rectangle to generate a rectangular coating area. When the user selects the polygon tool, the system responds to mouse click operations sequentially, connecting the clicked positions to form a closed polygon coating area to cover the irregular or non-standard shaped workpiece surface to be coated. After the user completes the region setting, the system detects and confirms that the set area is a valid closed area, stores it as the area to be coated, and records the boundary contour coordinates of the area as the basic geometric constraint for subsequent scan line intersection calculations. If the user also sets a shielding area, the boundary of the shielding area is first obtained and then clipped from the original coating area to generate the valid area to be coated after removing the shielding area.
[0049] After acquiring the area to be coated, the ordered edge table scan line algorithm is used to process the area. Specifically, a series of parallel scan lines are generated according to a preset scan interval. An active edge table is maintained using the ordered edge table method. As the scan line advances from the lowest point to the highest point (or from the leftmost point to the rightmost point) of the area, the edge information in the active edge table is updated in real time, and all valid intersection points between the current scan line and the boundary of the coated area are calculated. When the scan line intersects the polygon boundary, the singularity problem at the vertex is handled using the left-closed, right-open rule to ensure the correctness of the number of intersection points. All valid intersection points calculated between the scan line and the area boundary are organized according to the scan line number and the position of the intersection point along the scan line direction, and are included in the scan line intersection point set. At the same time, the scan line number to which each intersection point belongs is recorded, providing a data basis for the subsequent division and combination of coating sub-paths.
[0050] Scan lines are generated based on the coating and filling direction set by the user in the interactive interface. When the user selects a horizontal filling direction, a set of parallel scan lines is generated that extend horizontally in the image coordinate system and are equidistant from each other according to the pixel spacing set by the user (corresponding to the actual physical spacing). When the user selects a vertical filling direction, the system generates a set of parallel scan lines that extend vertically and are equidistant from each other at the same preset spacing. The starting position of the scan lines is automatically calculated and determined by the system based on the boundary range of the coating area to ensure that the scan lines can completely cover the entire area to be coated, and the spacing between adjacent scan lines always remains at the user's set value. The smaller the spacing value set by the user, the denser the scan lines and the higher the coating coverage accuracy, but at the same time, the number of coating sub-paths increases, and the total operation time is correspondingly extended; conversely, the larger the spacing value, the sparser the scan lines, the higher the coating efficiency but the lower the coverage accuracy.
[0051] It should be noted that the above steps are preparatory steps performed before executing the coating sub-path iterative planning (i.e., the loop of steps S2 to S4), providing basic input data for the core planning process. In practical applications, before executing the above steps, it is necessary to complete the hand-eye calibration between the camera and the actuator, and place the workpiece on the positioning platform to acquire images, to ensure the accuracy of the coordinates for setting the coating area and subsequent path planning.
[0052] Based on any of the above embodiments, in this embodiment, step S4 is followed by: The connection sequence between adjacent coating sub-paths is optimized to reduce the idle travel of the coating nozzles.
[0053] Specifically, after iteratively allocating all scanline intersections and generating all coated sub-paths, each coated sub-path is abstracted as a node in the graph structure. The distance traveled between any two coated sub-paths (i.e., the distance between the end point of the previous sub-path and the start point of the next sub-path) is used as the weight value of the edge connecting the two nodes. All coated sub-paths are traversed, and the pairwise distances between any two sub-paths are calculated to construct a complete weighted graph. The set of nodes represents all coated sub-paths, and the set of edge weights represents the distance traveled between the corresponding sub-paths. Simultaneously, the start and end coordinates of each sub-path are recorded as the basic attribute data of the graph structure.
[0054] The optimization objective is to minimize the total distance the coating nozzle travels in idle distance between all adjacent coating sub-paths. An objective function is established to minimize the sum of the idle distances between adjacent sub-paths after all generated coating sub-paths are arranged in a specific connection order. Simultaneously, optimization constraints are set according to preset coating rules: when the coating rule is continuous coating mode, the constraint is that adjacent sub-paths are directly connected by the coating path between scan lines, and the endpoints of the connecting paths must be at the same position as the endpoint of the previous sub-path and the starting point of the next sub-path; when the coating rule is interrupted coating mode, the constraint is that after completing the coating of each sub-path, the nozzle must first rise and then travel in idle distance to the starting point of the next sub-path. Furthermore, if different spraying areas exist as defined by the user, the sub-paths within the same spraying area are preferentially arranged adjacently as an additional constraint to ensure the differentiated coating effects required between different areas.
[0055] The objective function and constraints are input into the optimization solver, and a heuristic search algorithm is used to iteratively optimize the connection order of the coated sub-paths. Specifically, the initial connection order generated in steps S2 to S4 is used as the starting solution. Neighborhood operations such as path reversal and path swapping are used to generate a sequence of candidate solutions. The total distance traveled for each candidate solution is calculated, and the current optimal solution is updated in real time. A simulated annealing algorithm or a genetic algorithm is used for global search to avoid getting trapped in local optima. A maximum number of iterations and a convergence threshold are set as termination conditions. During the iteration process, the path queue is dynamically updated each time a better connection order is found, until the termination condition is met, at which point the optimal solution is output, resulting in the optimized sequence of coated sub-path connection orders.
[0056] The optimized sub-path connection sequence is used as the final coating operation sequence. Each coating sub-path (and the corresponding inter-scanline coating path in continuous coating mode) is then sequentially assembled according to this sequence to generate the optimized complete coating path plan. The sum of the idle travel distances between adjacent sub-paths in the optimized path is calculated and compared with the total idle distance of the initial sequence before optimization. If the total idle distance after optimization is significantly reduced compared to before optimization (the reduction exceeds the user-defined threshold), the optimized path is marked as a valid path and stored. If the optimization effect is not significant, the original path is retained, and the user is prompted to check whether the scanline spacing or area settings are reasonable. Finally, the optimized complete coating path is converted into an execution path in actual physical coordinates through calibration parameters and sent to the motion control system to execute the coating operation.
[0057] This embodiment is a global optimization step performed after iterative planning of all coating sub-paths is completed in steps S2-S4, and a preliminary complete path is generated based on the continuous or interrupted coating mode. It is not performed within the iterative loop. This embodiment complements the single-step greedy strategy in step S3, which involves "finding the scan line intersection closest to the current endpoint." Step S3 makes a locally optimal choice in each iteration, while this step adjusts the execution order of sub-paths at the global level, compensating for the global suboptimal defects that may result from the greedy strategy. Implementing this step significantly reduces the ineffective idle movement of the coating nozzle between sub-paths, making it particularly suitable for coating scenarios with complex scan line intersection distributions and a large number of sub-paths, effectively improving the overall efficiency of the coating operation.
[0058] The embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, and the processor executing the program instructions to implement any of the coating path planning methods provided in the embodiments of this application.
[0059] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.
[0060] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A coating path planning method, characterized in that, include: S1. Obtain the geometric contour of the area to be coated, and take all the intersections of the coating scan line and the geometric contour as the scan line intersection set; S2. Determine the starting point of the current coating sub-path from the set of scan line intersections, and take the coating scan line where the starting point of the current coating sub-path is located as the current coating sub-path; S3. Determine the scan line intersection point closest to the end point of the current coating sub-path from the set of scan line intersection points, and use the coating scan line containing the start point of the subsequent coating sub-path as the subsequent coating sub-path; S4. Set the subsequent coating sub-path as the current coating sub-path and return to step S2 until all the scan line intersections have generated corresponding coating sub-paths.
2. The coating path planning method according to claim 1, characterized in that, The method further includes: If there are at least two equally spaced scan line intersections in the set of scan line intersections that are closest to and equal to the end point of the current coating sub-path, then one of the equally spaced scan line intersections is randomly selected as the starting point of the subsequent coating sub-path.
3. The coating path planning method according to claim 1, characterized in that, The method further includes: If there are at least two equally spaced scan line intersections in the set of scan line intersections that are closest to and equal to the end point of the current coating sub-path, then calculate the subsequent global distance corresponding to each of the equally spaced scan line intersections as the starting point of the subsequent coating sub-path. The intersection of the equidistant scan lines with the smallest subsequent global distance is determined as the starting point of the subsequent coating path.
4. The coating path planning method according to claim 1, characterized in that, The step of determining the scan line intersection point closest to the end point of the current coating sub-path from the set of scan line intersection points as the starting point of the subsequent coating sub-path includes: Calculate the distance between the end point of the current coated sub-path and the intersection points of each of the uncoated scan lines; The intersection of the scan lines with the smallest distance is determined as the starting point of the subsequent coating sub-path.
5. The coating path planning method according to claim 1, characterized in that, The method further includes: All the coating sub-paths are planned by pre-setting coating rules to generate the target coating path plan.
6. The coating path planning method according to claim 5, characterized in that, The step of planning all the coating sub-paths according to preset coating rules to generate a target coating path plan includes: When the preset coating rule is continuous coating, the end point of the current coating sub-path is connected to the start point of the subsequent coating sub-path to generate an inter-scan line coating path. The target coating path plan is generated based on the coating paths between each scan line and all the coating sub-paths.
7. The coating path planning method according to claim 5, characterized in that, The step of planning all the coating sub-paths according to preset coating rules to generate a target coating path plan includes: When the preset coating rule is to interrupt coating, after coating the end point of the current coating sub-path according to the coating sub-path, lift the nozzle to stop coating, and start coating after moving to the starting point of the subsequent coating sub-path.
8. The coating path planning method according to claim 1, characterized in that, The process of obtaining the geometric contour of the area to be coated involves taking all the intersections of the coating scan line with the geometric contour as the set of scan line intersections, including: Obtain the area to be coated, wherein the area to be coated is a rectangular area or a polygonal area; The intersection points of the coated scan line and the scan line of the coated area are determined by the scan line algorithm, and all the scan line intersection points are taken as the scan line intersection point set. The coating scan lines are horizontal or vertical lines arranged at a preset interval.
9. The coating path planning method according to any one of claims 1 to 8, characterized in that, The step of setting the subsequent coating sub-path as the current coating sub-path and returning to step S2 until all the scan line intersections have generated corresponding coating sub-paths includes: The connection sequence between adjacent coating sub-paths is optimized to reduce the idle travel of the coating nozzles.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the coating path planning method as described in any one of claims 1 to 9.