Gluing path determination method and computer storage medium
By automating the processing of the target workpiece's outer contour map and generating an intelligent adhesive application path, the high cost and low efficiency problems caused by manual operation are solved, achieving efficient and accurate adhesive application quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-24
AI Technical Summary
The existing programming process for industrial adhesive coating is highly dependent on manual operation, resulting in high labor costs, high time costs, and a high risk of human error, which affects the quality of adhesive coating.
By automating the processing of the outer contour drawing of the target workpiece, the drawing elements are reordered to generate an external glue application path. The area to be filled is identified according to the user's fill instruction type, and a complete glue application path is generated by combining the internal directed line segments, reducing manual intervention.
It enables intelligent and accurate planning of the glue application path, improves glue application efficiency and quality stability, reduces manual intervention and costs, and is suitable for automated glue application processing of various complex contour workpieces.
Smart Images

Figure CN121213723B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of automatic gluing, and particularly relates to a gluing path determination method and a computer storage medium. BACKGROUND
[0002] With the continuous improvement of industrial automation level, the gluing process has been widely applied in workpiece manufacturing, part production and material processing and other fields. Taking the dispensing process as an example, in recent years, the automatic dispensing process has become the core link in the high-end manufacturing field such as electronic workpiece packaging.
[0003] The quality and efficiency of the gluing process depend largely on the planning of the gluing path. However, the programming process of the current industrial gluing process highly depends on manual operation, and the complete gluing path needs to be planned manually and then imported into the dispensing equipment. This way not only consumes a lot of labor cost and time cost, but also is prone to human errors, resulting in a significant decrease in gluing quality. SUMMARY
[0004] The embodiment of the application provides a gluing path determination method, a gluing path determination device, a terminal device, a computer readable storage medium and a computer program product, through the automatic processing of the target workpiece outer contour map, the intelligent and accurate planning of the complete gluing path of the target workpiece is realized, the manual intervention is effectively reduced, and the gluing efficiency and the gluing quality stability can be improved.
[0005] The first aspect of the embodiment of the application provides a gluing path determination method, comprising: acquiring a contour map of a target workpiece to be glued; reordering each drawing element in the contour map to obtain an external gluing path of the target workpiece; determining a to-be-filled area in the contour map according to a filling instruction type of a user; generating a plurality of first directed line segments inside each to-be-filled area to obtain an internal gluing path of each to-be-filled area; and determining a complete gluing path for the target workpiece according to the internal gluing path of each to-be-filled area and the external gluing path.
[0006] The second aspect of the embodiment of the application provides a gluing path determination device for implementing the steps in the above gluing path determination method.
[0007] The third aspect of the embodiment of the application provides a terminal device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above gluing path determination method when executing the computer program.
[0008] The fourth aspect of the embodiment of the application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the above gluing path determination method.
[0009] The fifth aspect of the embodiments of the present application provides a computer program product, which, when running on a terminal device, enables the terminal device to implement the steps in the glue application path determination method.
[0010] The glue application path determination method provided by the first aspect of the embodiments of the present application first reorders the drawing elements in the contour graph, automatically generates an external glue application path, and can effectively improve the continuity of the external glue application path, reduce the idle travel of the glue application device, and reduce the time cost of glue application. Secondly, based on the user filling instruction type, the to-be-filled area is accurately identified, and the fine layout of the internal glue application path of the to-be-filled area is realized in combination with the generated parallel first directed line segment inside each to-be-filled area, so that the glue layer covering of each position of the target workpiece is uniform and there is no omission. Finally, through the integration of the external glue application path and the internal glue application path, a complete closed loop path of the target workpiece is formed. In this way, not only can the overlap conflict problem of different area glue application paths be reduced, but also the accuracy of the glue application boundary can be improved. The scheme can not only maintain high glue application quality, but also significantly improve the efficiency, accuracy and reliability of the glue application path planning through hierarchical glue application path planning and to-be-filled area identification driven by filling instructions. Moreover, manual intervention can be effectively reduced, and the glue application cost is significantly reduced. Moreover, this scheme is suitable for automatic glue application processing scenes of various complex contour workpieces, and the expansibility of the scheme is also better.
[0011] It can be understood that the beneficial effects of the above-mentioned second aspect to the fifth aspect can be referred to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0013] Figure 1 is a flowchart of the glue application path determination method provided by an embodiment of the present application;
[0014] Figure 2 is a schematic diagram of the determination principle of an external glue application path of a target workpiece provided by an embodiment of the present application;
[0015] Figure 3 is a schematic diagram of the division principle of a to-be-filled area of a target workpiece provided by an embodiment of the present application;
[0016] Figure 4is a schematic diagram of a user interface in the gluing control software provided by an embodiment of the present application;
[0017] Figure 5 is a schematic diagram of a generation principle of a candidate filling line of a to-be-filled region provided by an embodiment of the present application;
[0018] Figure 6 is a schematic diagram of a line segment starting point search principle of a first directed line segment in a to-be-filled region provided by an embodiment of the present application;
[0019] Figure 7 is a schematic diagram of a line segment ending point search principle of a first directed line segment in a to-be-filled region provided by another embodiment of the present application;
[0020] Figure 8 is a schematic diagram of two first directed line segments determined on a candidate filling line in a to-be-filled region provided by an embodiment of the present application;
[0021] Figure 9 is a schematic diagram of a principle of dividing continuous gluing groups according to a merging gluing mode provided by an embodiment of the present application;
[0022] Figure 10 is a schematic diagram of a determination principle of an internal gluing path of a split line region provided by an embodiment of the present application;
[0023] Figure 11a is one of flow schematic diagrams of a gluing path determination method provided by another embodiment of the present application;
[0024] Figure 11b is another of flow schematic diagrams of a gluing path determination method provided by another embodiment of the present application. DETAILED DESCRIPTION
[0025] In the following description, for the purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail. It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. It will be apparent to one of ordinary skill in the art that numerous changes can be made without departing from the scope of the present application.
[0026] As described above, the current programming process of industrial gluing processing highly depends on manual operation, which requires manual pre-planning of complete gluing path and then importing into the dispensing equipment. This way not only consumes a lot of labor cost and time cost, but also easily causes human errors, resulting in significant decline in gluing quality. In order to at least partially solve the above problems, the present application embodiment first provides a gluing path determination method. The gluing path determination method provided by the present application embodiment can be used for gluing path planning in various automatic gluing scenarios. Including but not limited to the scenarios such as sealing and gluing of the shell of electronic equipment, structural gluing of automobile parts, precise gluing of medical devices, etc. In terms of gluing process, the gluing path determination method of the present application embodiment is suitable for both continuous gluing operation and dot matrix gluing (i.e. dispensing) operation. Through automatic processing of the target workpiece outer contour map, the method realizes intelligent and accurate planning of complete gluing path, effectively reduces manual intervention, and can improve gluing efficiency and gluing quality stability.
[0027] Exemplarily, in a specific application, the gluing control software can be integrated and deployed in the industrial automation control terminal equipment connected with the automatic gluing equipment, and the software architecture can be encapsulated with the technical implementation modules corresponding to each step of the gluing path determination method of the present application embodiment. The user only needs to import the contour map of the target workpiece, and through simple interface interaction, the software system can automatically plan the gluing path matching the contour of the target workpiece.
[0028] As shown in Figure 1 , the gluing path determination method provided by the present application embodiment includes the following steps S110, S120, S130, S140 and S150.
[0029] Step S110, obtaining the contour map of the target workpiece to be glued.
[0030] In the present application embodiment, the contour map of the target workpiece can be obtained by using various suitable methods. In one example, the design drawing of the target workpiece (such as the industrial design drawing of the target workpiece drawn by the user in advance using CAD drawing software) can be directly imported to obtain the contour map of the target workpiece. Figure 2 Figure a in the drawings shows the contour map of the target workpiece to be glued in one embodiment of the present application, which contains the geometric information of the external contour of the target workpiece, and can be composed of a plurality of drawing elements. For example, Figure 2 A line segment in Figure a in the drawings represents a drawing element, which includes straight lines, circular arcs, circles, etc. In another example, the workpiece image of the target workpiece to be glued can also be acquired by an image acquisition device, and then the contour map of the target workpiece shown in Figure a in the drawings can be extracted by image processing. Figure 2
[0031] Step S120: Reorder the drawing elements in the contour drawing to obtain the external adhesive application path of the target workpiece.
[0032] In this embodiment, all drawing elements in the obtained contour drawing of the target workpiece can be parsed and identified first. Then, the identified drawing elements can be reordered. It is understood that if the obtained contour drawing is a design drawing created by a user using drafting software, the order of the drawing elements in the contour drawing may correspond to the user's drawing order. This step involves reordering the drawing elements so that they are arranged according to the user's desired glue application order. Specifically, various suitable methods can be used to reorder the drawing elements in the contour drawing.
[0033] In one example, these drawing elements can be displayed through a human-computer interaction interface, and the gluing order of these drawing elements set by the user can be received based on the user's operation information of the operation controls in the operation interface (such as the user selecting these drawing elements in sequence, or entering the gluing sequence number of each drawing element in the interface), and the drawing elements can be reordered according to the received gluing order.
[0034] In another example, the drawing elements in the contour map can be automatically sorted using a preset sorting algorithm based on their positions and parameters. For instance, the nearest neighbor algorithm can be used to reorder the drawing elements according to their relative positions, bringing the endpoints of adjacent elements as close as possible, thereby forming one or more continuous, closed external adhesive application paths (see reference). Figure 2 (See Figure b in the original text). Optionally, before sorting, the user-selected glue application start point can be received first. For example, when the user draws the outline of the target workpiece, a specific marker point is used to represent the glue application start point. In this step, the glue application start point can be identified first, and then, based on the glue application start point and the relative positional relationship between each drawing element in the outline, the nearest neighbor algorithm is used to automatically sort all the drawing elements. For example, during the automatic sorting process, if multiple sorting schemes are found, the continuity and smoothness of the glue application path can be used as key constraints to filter out the optimal sorting scheme from the multiple possible sorting schemes.
[0035] like Figure 2 As shown in Figure b, after determining the glue application sequence of each drawing element in the contour drawing of the target workpiece, these drawing elements and their respective parameters can be arranged according to the glue application sequence to obtain an external glue application parameter sequence. Then, based on the conversion relationship between the data coordinates in the contour drawing and the machine coordinates of the automatic glue application equipment, the data involved in the external glue application parameter sequence can be converted, and the external glue application path for the target workpiece can be generated based on the converted external glue application parameter sequence.
[0036] For example, after sorting the glue application sequence of each drawing element in the CAD outline drawing of the target workpiece, the sorted drawing elements and their parameters can be stored as a TSP format file. Parsing the TSP format file will yield the external glue application parameter sequence of the target workpiece. Then, the conversion relationship between CAD drawing coordinates and the control table coordinates of the automatic glue application equipment can be solved using the following method. When drawing the CAD outline drawing, the user can mark 2 to 3 marker points on the drawing for alignment with the actual target workpiece. Figure 2 As shown by the three gray squares in Figure a), these marker points are also present on the actual target workpiece. The mechanical axis of the automatic glue applicator can be controlled to move the camera, aligning the camera's field of view with the marker point position on the target workpiece on the machine platform, and recording the coordinates of the mechanical axis at this point. The coordinates of the mechanical axis corresponding to the three marker points on the actual target workpiece (machine platform coordinates) are then mapped to the three marker points on the CAD contour drawing, forming three sets of marker point pairs. Using these three sets of marker point pairs, the transformation relationship between the coordinate system of the CAD contour drawing and the machine platform coordinate system of the automatic glue applicator can be solved. Based on this transformation relationship, the external glue application parameter sequence of the target workpiece can be quickly and accurately mapped to the machine platform coordinate system of the automatic glue applicator, thus accurately obtaining the external glue application path of the target workpiece.
[0037] Step S130: Determine the area to be filled in the contour map according to the user's fill instruction type.
[0038] In this embodiment, the user's fill instruction type may include at least: overall fill type and partition fill type. For example, the user's fill instruction type may also include smart fill type. For instance, a user interface may be provided displaying a single selection box for "fill type," offering three options: "overall fill," "partition fill," and "smart fill," allowing the user to freely select one according to their actual needs.
[0039] In an embodiment of the present application, after receiving the filling instruction type of the user, the area requiring internal filling and gluing, i.e., the to-be-filled area, can be determined according to the filling instruction type and the contour map of the target workpiece. In one example, in the case where the filling instruction type of the user is the overall filling type and the contour map of the target workpiece only contains one closed area, the closed area can be taken as one to-be-filled area, and overall filling can be performed. In another example, in the case where the filling instruction type of the user is the partition filling type, the closed area surrounded by the outer contour line can be divided into multiple to-be-filled areas according to the added partition line and the outer contour line of the contour map, and partition filling can be performed. Each sub-area (to-be-filled area) can independently set filling parameters (such as filling line type, direction, filling line density, etc.), so as to realize differentiated filling. For example, the key area and the main body area of the electronic workpiece shell are set with different filling parameters for partition filling. In yet another example, in the case where the filling instruction type of the user is the intelligent filling type, overall filling or partition filling can be performed according to the geometric features of the contour map in combination with a pre-set judgment mechanism (such as the size of the workpiece in the contour map, the shape complexity of the contour map). For example, in the case where the area of the overall closed area surrounded by the outer contour line of the contour map of the target workpiece does not exceed an area threshold, overall filling strategy is adopted for filling; and in the case where the area of the overall closed area exceeds the area threshold, partition filling strategy is automatically triggered to divide the overall closed area into multiple sub-areas, and filling is performed respectively, so as to improve the gluing quality. For another example, the complexity of the outer contour line of the contour map of the target workpiece can be quantified by a convex hull detection, concave point recognition algorithm, etc., and in the case where the complexity does not exceed a complexity threshold, overall filling strategy is adopted to perform overall filling on the overall closed area surrounded by the outer contour line, otherwise, partition filling strategy is adopted to perform partition filling on the overall closed area.
[0040] In step S140, a plurality of first directed line segments are generated inside each to-be-filled area, so as to obtain an internal gluing path of each to-be-filled area.
[0041] After the to-be-filled regions in the contour map are determined, the internal filling path planning can be performed for each to-be-filled region. Specifically, first, a plurality of parallel first directed line segments can be uniformly or non-uniformly filled in each to-be-filled region. Optionally, the filling parameters of the first directed line segments, such as the direction, line type, and spacing, can be adaptively determined according to the shape of the to-be-filled region and the position of the to-be-filled region in the overall closed region. Alternatively, the filling parameter setting controls of the to-be-filled region can also be provided in the user interface, and the plurality of parallel first directed line segments that meet the personalized needs of the user can be automatically and accurately generated in each to-be-filled region in combination with the filling parameters set by the user using the setting controls. After the first directed line segments are filled in the interior of each to-be-filled region, the internal glue applying path of each to-be-filled region can be further determined according to the position and direction of the first directed line segments. For example, the first directed line segments can be connected in a suitable order to form a continuous internal glue applying path.
[0042] In step S150, the complete glue applying path for the target workpiece is determined according to the internal glue applying path and the external glue applying path of each to-be-filled region.
[0043] For example, in the case where the filling instruction type of the user is overall filling, the internal glue applying path and the external glue applying path of one overall to-be-filled region within the outer contour of the target workpiece to be glued can be integrated to form the complete glue applying path for gluing the target workpiece. In the case where the filling instruction type of the user is zoned filling, the internal glue applying path and the external glue applying path of each to-be-filled region within the outer contour of the target workpiece can be integrated to form the complete glue applying path for gluing the target workpiece. Specifically, the internal glue applying can be completed according to the internal glue applying path of each to-be-filled region in a certain order, and finally, the outer contour of the target workpiece can be glued according to the external glue applying path. During the integration of the glue applying path, the continuity of the glue applying path and the glue applying efficiency can be used as constraint conditions to determine the complete glue applying path. For example, the complete glue applying path can also be optimized by using an optimization algorithm, such as a genetic algorithm or a simulated annealing algorithm, to minimize the total glue applying distance or the total glue applying time.
[0044] In actual applications, the user can import the contour map of the target workpiece and select the corresponding filling instruction type, and the system can automatically plan the glue applying path that matches the target workpiece and meets the user's instruction requirements, greatly simplifying the glue applying programming process and reducing the requirement for the professional skills of the operator.
[0045] In an embodiment, step S130 of determining the to-be-filled regions in the contour map according to the filling instruction type of the user includes the following steps S131 and S132.
[0046] Step S131, in the case that the filling instruction type of the user is the sub-region filling type, the closed region surrounded by the outer contour line is divided into a plurality of to-be-filled regions according to the split line added in the contour graph and the outer contour line of the contour graph.
[0047] In one example, in the case that the filling instruction type of the user is the sub-region filling type, the split line can be automatically added in the contour graph according to a preset algorithm or rule. For example, an input control is provided to accept the number of sub-regions input by the user, and then the number and position of the split line are automatically determined according to the number of sub-regions and the start and end points of each drawing element in the outer contour or the connection points with other drawing elements. For example, referring to FIG. 1a, in the case that the number of sub-regions is 3, two split lines (indicated by two green dashed lines in FIG. 1a) can be automatically determined, and the two end points of each split point correspond to the start and end points of two drawing elements respectively. Through the two split lines in the figure, the overall region surrounded by the outer contour of the workpiece can be divided into three to-be-filled regions as shown in FIG. 1b: to-be-filled region 1, to-be-filled region 2 and to-be-filled region 3. Figure 3 Figure 3 In another example, the outer contour line can also be displayed on the user interface, and a split line adding control is provided in the interface to manually add the split line by operating the split line adding control by the user. In addition, a data import interface can also be provided to import the outer contour file (such as a CAD file) with the added split line by the user into the software system, and the system reads the file and identifies the position of the split line. Figure 3
[0048] In the embodiment of the present application, after the split line is determined, each drawing element can be divided into a plurality of groups according to the coordinates of the split line and the parameters of each drawing element in the outer contour line (the parameters corresponding to the type of the drawing element, such as the coordinates of the two end points of a line segment, the coordinates of the center of a circle and the radius, and the coordinates of the two end points and a point on the arc of a circular arc), and a to-be-filled region is determined according to the position of the drawing element in each group. Specifically, the drawing elements in each group can be connected with the corresponding split line in the order of proximity to form a continuously closed region as a to-be-filled region. Finally, a plurality of independent to-be-filled regions can be formed. By using the split line to divide the region, different filling forms or filling parameters can be applied to different to-be-filled regions in the contour graph.
[0049]
[0050] In a preferred embodiment, after determining the to-be-filled region, a unique region identifier can be assigned to each to-be-filled region, facilitating subsequent planning of the internal glue application path of different to-be-filled regions.
[0051] In a preferred embodiment, after determining the to-be-filled region, a unique region identifier can be assigned to each to-be-filled region, facilitating subsequent planning of the internal glue application path of different to-be-filled regions.
[0052] In the above scheme, according to the user's filling instruction type, the matching to-be-filled region division strategy is dynamically selected to realize accurate planning of the glue application path. In the sub-region filling scenario, the overall glue application region of the target workpiece can be divided into multiple independent to-be-filled regions according to the segmentation line combined with the outer contour line, which can realize differentiated planning of the internal glue application path of different regions and meet the individualized glue application needs of complex workpieces. In the overall filling scenario, the entire workpiece region can be directly taken as a single to-be-filled region, simplifying the glue application path planning logic and improving the glue application efficiency. This scheme improves the flexibility, efficiency and accuracy of glue application path planning through the instruction type-driven to-be-glued region dynamic division mechanism, and is suitable for diversified needs in the automatic glue application scenario.
[0053] In an embodiment, step S140 generates a plurality of first directed line segments in each to-be-filled region to obtain the internal glue application path of each to-be-filled region, including the following steps S141, S142 and S143.
[0054] Step S141 determines the first filling reference information of each to-be-filled region, wherein the first filling reference information includes line segment filling direction, line segment filling density and line segment effective area. The line segment filling direction indicates the direction of the expected generated first directed line segment, the filling density indicates the density of the expected generated filling line segment in the to-be-filled region, and the line segment effective area indicates the position range of the expected generated first directed line segment. The line segment effective area is determined according to the filling contour of the to-be-filled region. The line segment filling direction of the same to-be-filled region is the same, and the line segment filling direction of different to-be-filled regions with adjacent positions is different.
[0055] In the embodiments of the present application, the first filling reference information can be information that needs to be referred to in determining the glue applying path in the to-be-filled region. Specifically, it can include the line segment filling direction, the line segment filling density, and the line segment effective region. In addition, the first filling reference information can also include other information, such as the line segment length range (such as the lower limit of the line segment length), the line segment type (such as a straight line, a curve, etc.), the line segment curvature limit parameter, etc., to meet the different glue applying process requirements of different workpieces.
[0056] In the embodiments of the present application, the line segment filling direction is used to indicate the direction of the first directed line segment expected to be generated. In actual applications, the line segment filling direction can be determined according to the geometric characteristics of the workpiece, the glue applying requirement, or the process requirement. The line segment filling direction can include the horizontal direction (the x-axis direction of the workpiece defined in the software), the vertical direction (the y-axis direction of the workpiece defined in the software), or other directions.
[0057] It should be noted that, in the case where the overall region surrounded by the outer contour of the target workpiece includes multiple to-be-filled regions, the line segment filling direction of the same to-be-filled region is the same, while the line segment filling direction of different to-be-filled regions adjacent in position is different. For example, Figure 3 The overall region surrounded by the outer contour of the workpiece shown in the b figure of FIG. 1 includes three to-be-filled regions, and the line segment filling direction of the to-be-filled region 1 is different from that of the to-be-filled region 2. Exemplarily, the line segment filling direction of the to-be-filled region 1 can be the horizontal direction, while the line segment filling direction of the to-be-filled region 2 can be the vertical direction. It can be understood that the same line segment filling direction of the same to-be-filled region can improve the uniformity and continuity of glue applying, and improve the glue applying efficiency. While the different filling directions of adjacent regions can significantly enhance the structural stability between adjacent regions, and avoid the cracking or peeling of the glue layer due to stress concentration. The glue applying paths in different directions can form staggered supports, and improve the overall bonding strength. At the same time, the multi-directional filling helps to disperse the deformation influence caused by thermal expansion and cold contraction, and enhances the durability of the workpiece in complex environments, thereby significantly improving the workpiece bonding quality. In summary, the same line segment filling direction of the same to-be-filled region and the different filling directions of adjacent regions can significantly improve the glue applying efficiency and quality.
[0058] In the embodiments of the present application, the line segment filling density is used to indicate the density of the filling line segments expected to be generated in the to-be-filled region. Specifically, it can be represented by a density parameter, or by the distance between two adjacent filling line segments (i.e., the filling interval in the following). The line segment filling density can be set according to the geometric shape of the to-be-filled region, the glue applying process requirement, the glue characteristics, and the workpiece material. For the case where the overall region surrounded by the outer contour of the workpiece includes multiple to-be-filled regions, the line segment filling density of different to-be-filled regions can be the same or different.
[0059] In the embodiments of the present application, the line segment effective area is used to indicate the position range of the first directed line segment expected to be generated. A variety of suitable logics can be adopted to determine the line segment effective area according to the filling contour of the region to be filled, which can be the outer contour of the region to be filled or the one obtained by scaling the outer contour of the region to be filled. For example, the outer contour of the region to be filled can be scaled inwards by 5 mm to obtain the filling contour. Alternatively, the region enclosed by the filling contour can be taken as the line segment effective area. Alternatively, the line segment effective area can also be determined according to the outer envelope frame of the filling contour.
[0060] In one example, the first filling reference information of each region to be filled can be automatically determined according to the geometric characteristics of each region to be filled. In another example, a user interface can also be provided, in which operation controls are provided to receive one or more first filling reference information of the region to be filled set by the user directly or indirectly using the operation controls.
[0061] In step S142, for each region to be filled, a plurality of parallel first directed line segments are generated inside the region to be filled according to the first filling reference information of the region to be filled. In the embodiments of the present application, each first directed line segment generated inside the region to be filled matches the first filling reference information of the region to be filled. For example, the direction of the first directed line segment is consistent with the line segment filling direction; the arrangement density of the generated first directed line segments is consistent with the filling density; and the first directed line segments are located in the line segment effective area of the region to be filled.
[0062] In step S143, for each region to be filled, an internal glue applying path of the region to be filled is determined according to the plurality of parallel first directed line segments. For each region to be filled, the plurality of parallel first directed line segments generated can be sorted first. For example, the sorting can be performed from top to bottom according to the positions of the line segment end points. Then, the first directed line segments can be integrated according to the sorting result and the glue applying mode of the region to be filled. The glue applying mode can be set by the user through the operation controls or automatically set by the system. For example, the glue applying mode can include a sequential glue applying mode and a merging glue applying mode. The sequential glue applying mode can correspond to row-by-row or column-by-column glue applying (e.g., left-right-left-left “Z” shape glue applying, left-right-right-left “bow” shape glue applying). The merging glue applying mode can correspond to grouped glue applying, for example, the first directed line segments are grouped and then glued according to the grouping order in consideration of the continuity of the glue applying process. Specifically, the end point coordinates of the first directed line segments in the region to be filled can be combined into an initial end point sequence. Then, the positions of the end points of the first directed line segments in the end point sequence can be updated according to the glue applying mode of the region to be filled to obtain an updated end point sequence. Finally, the end point sequence is updated according to the updated end point sequence, and the directed line segments are sequentially connected to form a continuous internal glue applying path.
[0063] In the above scheme, based on the first filling reference information of the to-be-filled region, a plurality of parallel first directed line segments are generated inside the to-be-filled region, and then the discrete first directed line segments are converted into a continuous internal gluing path. This scheme realizes parameter-driven line segment generation and path optimization, meets the differentiated gluing requirements of complex workpieces in multiple regions, improves gluing efficiency through continuous gluing path planning, reduces gluing cost, and improves gluing quality.
[0064] In an embodiment, step S141 determines the first filling reference information of each to-be-filled region, including steps S1411 to S1415.
[0065] In step S1411, the contour scaling parameter of the to-be-filled region is obtained. In the embodiments of the present application, the contour scaling parameter is used to set the boundary of gluing in the to-be-filled region. The contour scaling parameter can be a numerical value or a vector. Taking the case where the contour scaling parameter is a numerical value as an example. Optionally, the contour scaling parameter can be expressed by a scaling ratio. For example, the contour scaling ratio is 0.95, which means that the contour of the to-be-filled region is reduced by 5% inwardly; the contour scaling ratio is 1.05, which means that the contour of the to-be-filled region is expanded by 5% outwardly. Alternatively, the contour scaling parameter can also be expressed by an inwardly shifting distance or an outwardly expanding distance. For example, the inwardly shifting distance is 0.5 mm, which means that the contour boundary of the to-be-filled region is shifted inwardly by 0.5 mm in parallel. Exemplarily, a user interface can be provided to receive the user input of the contour scaling parameter of the to-be-filled region. For example, a user interface as shown in FIG. 6 can be provided, which can include a view window of the target workpiece (the contour of the target workpiece can be displayed before filling the first directed line segment, and the filled first directed line segment can be displayed after filling the first directed line segment), and can also include setting controls of the line segment filling parameter and the sub-region filling parameter. For example, the user can select the numerical value of the desired inwardly shifting distance in the selection box after “inwardly shifting”. Figure 4
[0066] In step S1412, the contour of the to-be-filled region is scaled according to the contour scaling parameter and the contour point set of the to-be-filled region, to obtain a filling contour.
[0067] In the embodiments of the present application, the contour point set of the to-be-filled region can be a set of a series of points describing the boundary of the to-be-filled region. Then, each point in the contour point set can be scaled according to the contour scaling parameter obtained in step S1411. Specifically, each point in the contour point set can be scaled and transformed relative to the contour center to obtain a new point set, forming the filling contour of the to-be-filled region. Exemplarily, the contour center point of the to-be-filled region can be calculated first, and then for each point in the contour point set, the inwardly shifted point of the point is found in the direction of the line segment from the point to the contour center point. For example, if the user selects the inwardly shifting distance of 0.5 mm in the selection box after “inwardly shifting” in the user interface as shown in FIG. 6, the contour center point of the to-be-filled region can be calculated first, and then for each point in the contour point set, the inwardly shifted point of the point is found in the direction of the line segment from the point to the contour center point. Figure 4 The selection box in the "inset" in the user interface is selected with an inset distance of 0.5 mm. Then a distance between the inset point and the point in the direction of the line segment from the point to the center point of the contour can be determined. In this way, the inset point of each point in the contour point set can be determined. And the inset points can be connected to obtain the filling contour of the region to be filled. As shown in FIG. a in the Figure 5 The filling contour of the region to be filled can be the contour composed of the green line in the figure as shown in FIG. a.
[0068] In step S1413, the filling start point offset parameter of the region to be filled is obtained. In the embodiments of the present application, the filling start point offset parameter is used to adjust the filling start position (i.e. the filling start point). Specifically, the default filling start point can be determined according to the filling contour of the region to be filled. For example, a corner point (such as the top left corner point) of the outer envelope box of the filling contour is determined as the default filling start point. The filling start point offset parameter can indicate the offset parameter of the target filling start point relative to the default filling start point. Specifically, it can be the offset amount of the target filling start point relative to the default filling start point in the x direction and the y direction. Alternatively, a preset filling start point optimization algorithm can be used to automatically calculate the filling start point offset parameter according to the filling requirement and the filling mode. Alternatively, the user can also set the personalized filling start point offset parameter through the user interface. For example, the user can set the filling start point offset parameter through the user interface as shown in Figure 4 The user interface for setting the filling start point offset parameter is shown in FIG. a. For example, the offset amount of the target filling start point relative to the default filling start point in the x direction can be selected or input in the selection box behind "scan start x offset", and the offset amount of the target filling start point relative to the default filling start point in the y direction can be selected or input in the selection box behind "scan start y offset".
[0069] In step S1414, the position of the minimum circumscribed rectangle of the filling contour is adjusted according to the filling start point offset parameter.
[0070] Exemplarily, after obtaining the filling contour of the region to be filled, the minimum circumscribed rectangle of the filling contour can also be determined. Then, the position of the minimum circumscribed rectangle of the filling contour can be adjusted according to the filling start point offset parameter. Exemplarily, the minimum circumscribed rectangle of the filling contour can be translated according to the filling start point offset parameter. For example, "scan start x offset" -3 mm and "scan start y offset" 5 mm can translate the minimum circumscribed rectangle of the filling contour by 3 mm in the negative direction of the x axis and by 5 mm in the positive direction of the y axis.
[0071] In step S1415, the line segment effective area of the region to be filled is determined according to the position of the adjusted minimum circumscribed rectangle.
[0072] In the embodiments of the present application, the line segment effective area can be an area covered by the first directed line segment corresponding to the glue filling path inside the to-be-filled area. Various suitable methods can be used to determine the line segment effective area of the to-be-filled area according to the position of the adjusted minimum circumscribed rectangle. Exemplarily but not limitatively, the area covered by the minimum circumscribed rectangle of the filling contour of the to-be-filled area adjusted according to the filling starting point offset parameter can be directly determined as the line segment effective area of the to-be-filled area. For example, referring to FIG. a in Figure 5 , the area covered by the minimum circumscribed rectangle of the filling contour of the to-be-filled area adjusted according to the filling starting point offset parameter (the area shown by the light gray filled rectangular frame in the figure) can be determined as the line segment effective area of the to-be-filled area.
[0073] In the above scheme, the contour scaling parameter of the to-be-filled area is obtained to generate the filling contour of the to-be-filled area, so as to accurately control the glue filling boundary of the target workpiece and reduce the problem of glue overflow or insufficient coverage. The filling starting point offset parameter is obtained to realize flexible positioning of the filling starting point of the to-be-filled area in combination with the position adjustment of the minimum circumscribed rectangle of the filling contour. The line segment effective area of the to-be-filled area is determined based on the adjusted minimum circumscribed rectangle, so that the generated first directed line segment is located inside the to-be-filled area. The scheme realizes boundary scaling and filling starting point optimization driven by parameters, improves the geometric accuracy of the glue filling path inside the to-be-filled area, and improves the reliability of the glue filling path planning through effective area constraint.
[0074] In an implementation manner, the line segment filling density includes a filling interval. The filling interval can be a distance between two adjacent first directed line segments expected to be filled. Optionally, a suitable filling interval can be automatically determined by using a preset interval determination method. For example, the filling interval can be determined according to the size of the to-be-filled area. Alternatively, the filling interval can be set by the user independently. For example, the user can set the filling interval by operating the user interface shown in Figure 4 . Specifically, the line width value expected to be set can be input or selected in the input selection box after “line width”.
[0075] Step S142 generates a plurality of parallel first directed line segments inside the to-be-filled area according to the first filling reference information of the to-be-filled area, including the following steps S1421, S1422 and S1423.
[0076] Step S1421 calculates a first number of candidate filling lines that can be filled in the to-be-filled area according to the line segment filling direction, the filling interval and the size of the line segment effective area.
[0077] Exemplarily, the first number can be calculated according to the size of the line segment effective region in the direction perpendicular to the line segment filling direction and the filling interval. Specifically, assuming that the filling interval is d0 and the size of the line segment effective region in the direction perpendicular to the line segment filling direction is w, the first number q can be calculated by the following formula: .
[0078] For example, referring to FIG. a in Figure 5 , the ratio of the width of the minimum circumscribed rectangle of the to-be-filled region to the filling interval set by the user can be calculated, and then the first number of the candidate filling lines that can be filled in the to-be-filled region is obtained by rounding down.
[0079] In step S1422, the first number of candidate filling lines is generated in the line segment effective region according to the first number, the line segment filling direction, the preset corner point of the line segment effective region, and the filling interval, wherein the direction of the candidate filling lines is the line segment filling direction, the distance between two adjacent candidate filling lines is equal to the filling interval, and the distance between the preset corner point and the ith candidate filling line in the first number of candidate filling lines is equal to the product of the filling interval and i.
[0080] In the embodiments of the present application, the preset corner point can be a vertex representing the boundary in the line segment effective region, such as the top-left corner point of a rectangular region. Exemplarily, for each to-be-filled region, a straight line parallel to the line segment filling direction can be generated as a candidate filling line every filling interval from the preset corner point of the line segment effective region in the direction perpendicular to the line segment filling direction until the first number of candidate filling lines is generated. Both ends of the candidate filling line can be located on the contour of the line segment effective region.
[0081] For example, in combination with FIGS. a and b in Figure 5 , the preset corner point of the line segment effective region (the rectangular region in FIG. a) of the current to-be-filled region can correspond to the top-left corner point of the line segment effective region, i.e., the top-left corner point of the rectangular region in FIG. a. Assuming that the coordinates of the top-left corner point are (x0, y0) and the line segment filling direction corresponds to the height direction of the rectangular region (such as the y-axis direction of the system coordinate system), the first number q calculated according to the width of the rectangular region and the filling interval d0 set by the user, the 20 candidate filling lines shown in FIG. b can be generated in turn along the x-axis direction and parallel to the y-axis direction. Exemplarily, the starting point coordinates of the ith (1≤i≤20) candidate filling line can be represented by (x0+i*d0, y0), and the end point coordinates can be represented by (x0+i*d0, y0+h), wherein h is the height of the line segment effective region (the rectangular region in FIG. a) of the current to-be-filled region.
[0082] Step S1423, search a first directed line segment on the candidate filling line, which meets the boundary collision condition at both ends, by using the automatic search parameter of the region to be filled.
[0083] In the embodiments of the present application, the automatic search parameter of the region to be filled is used to search the first directed line segment possibly contained on each candidate filling line. The automatic search parameter can be set by the user or automatically determined by the system. Exemplarily, the automatic search parameter can include parameters involved in the search process, such as a search step, a stop search condition, a minimum search length, etc. The search step is used to control the degree of fineness of sampling and judgment on the candidate filling line. In an example in which the system automatically determines the search step, the search step can be determined according to the filling pitch, and the search step can be smaller than the line segment filling pitch. For example, the search step can be equal to one-tenth of the line segment filling pitch. The stop search condition can be used to determine when to terminate the search process on the candidate filling line.
[0084] In addition, the automatic search parameter can also include parameters related to boundary collision detection, such as a collision judgment threshold. The collision judgment threshold can be set according to actual needs, and different collision detection methods can set different types of collision judgment thresholds. For example, the collision judgment threshold can be a distance threshold, or a number threshold of collision detection points (such as the number threshold of collisions below).
[0085] Exemplarily, for each candidate filling line greater than the minimum search length, the search can be started from the starting point of the candidate filling line and moved step by step in the direction of the ending point of the candidate filling line according to the search step. In the search process, a preset collision detection method is used to detect whether the current position meets the boundary collision condition. When the starting point of the line segment meeting the boundary collision condition is detected, the position of the starting point of the line segment is recorded, and the search is continued to search for the ending point of the line segment meeting the boundary collision condition. The line segment between the starting point and the ending point of the line segment determined in sequence can be taken as a first directed line segment on the candidate filling line.
[0086] Specifically, whether the current position meets the boundary collision condition can be determined according to the relative positional relationship between the current search position and the boundary of the filling contour of the region to be filled. In one example, it can be determined that the current position meets the boundary collision condition when the current position is located in the region enclosed by the filling contour of the region to be filled, and the distance between the current search position and the boundary of the filling contour of the region to be filled is less than or equal to the distance threshold of the collision judgment. In another example, whether the current position meets the boundary collision condition can be determined according to the number of collision points or non-collision points among the detection points on the collision detection circle at the current position and the number threshold of the corresponding collision detection points. Specific examples of this scheme will be described below, and for the sake of brevity, will not be described here.
[0087] Exemplarily, for each candidate filling line, after generating the at least one first directed line segment, the first directed line segment with a length less than the minimum search length can be filtered out again according to the minimum search length.
[0088] The above scheme generates uniform and current filling region matching first directed line segments inside the to-be-filled region by parameter driving, which improves the geometric accuracy of the internal glue coating path of the to-be-filled region. In addition, the scheme significantly reduces manual intervention, and the algorithm logic is simple and the calculation amount is small, and high-precision and efficient glue coating path planning can still be maintained in complex workpiece glue coating scenarios.
[0089] In an implementation, step S1423 searches the first directed line segment with both ends satisfying the boundary collision condition on the candidate filling line by using the automatic search parameter of the to-be-filled region, including the following steps: step S1423.1, obtaining the automatic search parameter, wherein the automatic search parameter includes a preset radius of a collision detection circle and an automatic search step; step S1423.2, for each candidate filling line, starting from one end of the candidate filling line, searching along the candidate filling line step by step according to the automatic search step; step S1423.3, for each candidate filling line, when searching to the current search position, generating a collision detection circle with the current search position as the center, wherein the radius of the collision detection circle is equal to the preset radius; step S1423.4, for each candidate filling line, judging whether the current search position satisfies the boundary collision condition according to the relative position relationship between the collision detection circle and the filling contour of the to-be-filled region; step S1423.5, for each candidate filling line, in the case that the current search position satisfies the boundary collision condition, marking the current search position as a line segment starting point or a line segment ending point; step S1423.6, for each candidate filling line, in the case that a line segment starting point and a line segment ending point are marked in sequence, determining the line segment between the line segment starting point and the line segment ending point as the first directed line segment with both ends satisfying the boundary collision condition, until the search of the candidate filling line is completed.
[0090] In the embodiments of the present application, the method of the collision detection circle can be used to search the first directed line segment with both ends satisfying the boundary collision condition on each candidate filling line in the to-be-filled region. Specifically, in step S1423.1, the automatic search parameter of the current to-be-filled region can be obtained first, which can at least include the preset radius of the collision detection circle and the automatic search step. Optionally, the preset radius and the automatic search step can be manually set by the user. For example, the user can set the preset radius and the automatic search step in the user interface of the glue coating path planning system. Figure 4the user interface shown in FIG. 13B. For example, the user can input or select the desired setting of the automatic search step in the input selection box after "step" in the line segment filling parameter setting area of the user interface. The user can also input or select the desired setting of the radius of the collision detection circle as the preset radius of the collision detection circle in the input selection box after "collision circle radius". Alternatively, the preset radius and the automatic search step can also be automatically set by the user, specifically, the preset radius and the automatic search step can be set according to the line segment filling interval. For example, the automatic search step can be greater than the preset radius and can be less than the line segment filling interval.
[0091] In some examples, the automatic search parameters can further include the total number of detection points on the collision detection circle (i.e., the second number below). Exemplarily, the user can set the total number of detection points on the collision detection circle by using the user interface shown in FIG. 13C. For example, the user can input or select the desired setting of the total number of detection points on the collision detection circle in the input selection box after "collision circle detection point number" in the line segment filling parameter setting area of the user interface. Referring to FIG. 13C, the total number of detection points on the collision detection circle can be set to 8. Figure 4 Figure 6 If the user sets the "collision circle detection point number" to 8, 8 detection points on the collision detection circle can be generated evenly (shown as 8 purple dots on the red circle in the figure). In other examples, the automatic search parameters can further include a number threshold of collision points for determining collision (i.e., the number threshold of collision points below), which can be greater than 1 / 2 of the total number of detection points on the collision detection circle. Exemplarily, the user can set the number threshold of collision points for determining collision by using the user interface shown in FIG. 13D. Specifically, the user can input or select the desired setting of the number threshold of collision points for determining collision in the input selection box after "collision point lower limit" in the line segment filling parameter setting area of the user interface. Exemplarily, the collision points can be detection points located within the filling contour of the region to be filled. Figure 4
[0092] In step S1423.2, the candidate filling line can be searched step by step along the candidate filling line from one end point of the candidate filling line according to the automatic search step. Specifically, the search can start from the upper end point of each red candidate filling line in FIG. 13B (e.g., the upper end point of each red candidate filling line in FIG. 13B), and the search can be performed by advancing one automatic search step at a time until the lower end point of the candidate filling line is reached (e.g., the lower end point of each red candidate filling line in FIG. 13B). Figure 5 Figure 5
[0093] Suppose the automatic search step is 3 mm, the "collision circle detection point number" is 8, the "collision point lower limit" is 7, and the preset radius of the collision detection circle is 1.5 mm, as shown in FIG. 13B, FIG. 13C, and FIG. 13D. Figure 6 As shown, in step S1423.3, starting from the start point of the candidate filling line, every time a search position is reached at an interval of 3 mm, a collision detection circle with a radius of 1.5 mm and containing 8 detection points is generated with the current search position as the center.
[0094] In step S1423.4, whether the current search position satisfies the boundary collision condition can be determined at least according to the relative positional relationship between the collision detection circle and the filling contour of the region to be filled. For example, whether the current search position satisfies the boundary collision condition can be determined at least according to the actual number of collision points located in the filling contour of the region to be filled and the “lower limit of collision points”. In another specific example, the current search position can be determined to satisfy the boundary collision condition when the collision detection circle intersects with the filling contour, and the proportion of the area of the intersection region to the total area of the collision detection circle is within a preset proportion range.
[0095] In step S1423.5, in the case where it is determined that the current position satisfies the boundary collision condition, the current position can be marked as a line segment start point or a line segment end point. In one example, whether the current search position is a line segment start point or a line segment end point can be determined according to the search direction and the historical marking situation. If there is no line segment start point marked for the current candidate filling line before, or a line segment end point was marked for the current candidate filling line last time, the current position can be determined as a line segment start point; if a line segment start point was marked for the current candidate filling line last time, the current position can be marked as a line segment end point. In another example, the current position can be determined as a line segment start point in the case where it is determined that the current search position satisfies the boundary collision condition and the last search position does not satisfy the boundary collision condition; the current position can be determined as a line segment end point in the case where it is determined that the current search position satisfies the boundary collision condition and the next search position does not satisfy the boundary collision condition. In yet another example, the boundary collision condition can include a first boundary collision condition indicating that the current position starts to enter a target region surrounded by the filling contour of the region to be filled, and a second boundary collision condition indicating that the current position is about to leave the target region. The current position can be determined as a line segment start point in the case where it is determined that the current position satisfies the first boundary collision condition, and the current position can be determined as a line segment end point in the case where it is determined that the current position satisfies the second boundary collision condition.
[0096] In step S1423.6, for each candidate filling line, if a line segment start point and a line segment end point are marked in sequence, a first directed line segment between the line segment start point and the line segment end point can be determined for the candidate filling line until the search for the candidate filling line is completed. It can be understood that for each candidate filling line, one or more first directed line segments can be determined. Figure 8For a candidate filling line (shown as a light gray line in the figure) in the to-be-filled region shown in the figure, two first directed line segments can be determined, both ends of which satisfy the boundary collision condition. It can be understood that the first directed line segments obtained through collision detection are located within the filling contour of the to-be-filled region and generally do not touch the boundary of the filling contour.
[0097] In the above scheme, the precision of boundary collision detection and the automatic search efficiency are improved through the acquired automatic search parameters such as the collision detection circle radius and the search step length. By gradually searching along the candidate filling line and generating a collision detection circle at each search position, the relative position relationship between the collision detection circle and the filling contour is combined to determine whether the search position satisfies the boundary collision condition, so as to accurately determine the starting / ending point of the line segment, so that the generated first directed line segment is located within the effective region and both ends satisfy the accurate boundary constraint. Through the dynamic search and boundary collision detection driven by parameters, the scheme not only realizes the accurate positioning of the first directed line segment, but also enhances the precision, flexibility and adaptability of the glue application path planning. In addition, the scheme has small calculation amount and high calculation efficiency, and therefore can further improve the glue application path planning efficiency.
[0098] In an embodiment, the boundary collision condition includes a first boundary collision condition and a second boundary collision condition. If a position satisfies the first boundary collision condition, it can be indicated that the position starts to enter the target region surrounded by the filling contour of the to-be-filled region. If a position satisfies the second boundary collision condition, it can be indicated that the position is about to leave the target region. The automatic search parameters further include a second number of detection points on the collision detection circle and a collision number threshold. The second number and the collision number threshold can be set according to actual needs. The collision number threshold is greater than 1 / 2 of the second number and less than or equal to the second number. It can be understood that the greater the second number, the more accurate the judgment result. The smaller the difference between the collision number threshold and the second number, the farther the end point of the generated first directed line segment from the boundary of the to-be-filled region.
[0099] Step S1423.4 determines whether the current search position satisfies the boundary collision condition according to the relative position relationship between the collision detection circle and the filling contour of the region to be filled, including the following steps: step S1423.4a, determining the positions of the second number of detection points on the collision detection circle; step S1423.4b, determining whether each of the second number of detection points is located in the target region surrounded by the filling contour of the region to be filled according to the positions of the second number of detection points and the position of the filling contour of the region to be filled, and recording the detection points located in the target region as collision points; step S1423.4c, determining that the current search position is in the filling contour if the number of collision points is greater than or equal to the collision number threshold, otherwise, determining that the current search position is out of the filling contour; step S1423.4d, determining that the current search position satisfies the first boundary collision condition if the last search position is out of the filling contour and the current search position is in the filling contour; step S1423.4e, determining that the current search position satisfies the second boundary collision condition if the current search position is in the filling contour and the next search position is out of the filling contour.
[0100] The following describes an exemplary implementation of the steps S1423.4a to S1423.4e. Figure 6 And Figure 7 The following describes an exemplary implementation of the steps S1423.4a to S1423.4e. Figure 6 As shown in FIG. 14a, the yellow line represents a part of the current candidate filling line, and the green line represents a part of the filling contour of the region to be filled. When the search reaches the current position (indicated by the red dot), a collision detection circle can be automatically generated with the current search position as the center, and the positions of eight detection points uniformly distributed on the circumference of the collision detection circle can be determined, and the angle between two adjacent detection points and the center is 45°. Then, it is determined whether each detection point is located in the target region surrounded by the filling contour of the region to be filled. For the detection points located in the target region, they can be recorded as collision points, and for the detection points located outside the target region, they can be recorded as non-collision points. Further, the number of collision points can be compared with the preset collision number threshold, and it is determined whether the current search position is in the filling contour or out of the filling contour according to the comparison result. If the number of collision points is greater than or equal to the collision number threshold, it indicates that most of the detection points are located in the target region, and it can be determined that the current search position is in the filling contour; if the number of collision points is less than the collision number threshold, it indicates that there are many detection points located outside the target region, and it can be determined that the current search position is out of the filling contour. It can be seen that, for the current search position, the first boundary collision condition is satisfied if the last search position is out of the filling contour and the current search position is in the filling contour, and the second boundary collision condition is satisfied if the current search position is in the filling contour and the next search position is out of the filling contour. Figure 6The collision detection circle of the current search position (referred to as search position p1 for ease of description) shown in FIG. 7a has 7 detection points outside the target region, that is, the collision detection circle of search position p1 includes 7 non-collision points and 1 collision point. Since the number of collision points 1 is less than the collision number threshold 7, it can be determined that search position p1 is outside the fill contour. Next, referring to FIG. 7b, search position p1 is moved forward by one search step s to reach the current search position (referred to as search position p2 for ease of description) shown in the figure, and the collision detection circle has 1 detection point outside the target region, that is, the collision detection circle of search position p2 includes 1 non-collision point and 7 collision points. Since the number of collision points 7 is equal to the collision number threshold 7, it can be determined that search position p2 is outside the fill contour. Thus, according to the fact that search position p1 is outside the target region and search position p2 is inside the target region, it can be determined that search position p2 satisfies the first boundary collision condition, which means that search position p2 has just crossed the boundary of the fill contour and entered the inside of the target region. Next, referring to FIG. 7c, when reaching search position p3, all the 8 detection points on the generated collision detection circle are collision points, indicating that search position p3 is inside the target region. Referring to FIG. 7d, from search position p3, continue to move forward along the current candidate fill line by one step s, and when reaching search position p4, all the 7 detection points on the generated collision detection circle are collision points, indicating that search position p4 is still inside the target region. Referring to FIG. 7e, when moving forward from search position p4 by one step s to reach search position p5, since all the 8 detection points on the collision detection circle generated at search position p5 are non-collision points, it indicates that search position p5 has left the target region and is outside the target region. This shows that when searching to search position p4, the search path is about to leave the region to be filled. Therefore, it can be determined that search position p4 satisfies the second boundary collision condition. Figure 6 Figure 7 Figure 7 Figure 7
[0101] Step S1423.5, in the case where it is determined that the current search position satisfies the boundary collision condition, marks the current search position as a line segment start point or a line segment end point, including the following steps: step S1423.5a, in the case where it is determined that the current search position satisfies the first boundary collision condition, marks the current search position as a line segment start point; and step S1423.5b, in the case where it is determined that the current search position satisfies the first boundary collision condition, marks the current search position as a line segment end point.
[0102] As shown in FIG. 8a, in the case where it is determined that search position p2 satisfies the first boundary collision condition, the position of search position p2 can be marked as a line segment start point. Similarly, as shown in FIG. 8b, in the case where it is determined that search position p4 satisfies the second boundary collision condition, the position of search position p4 can be marked as a line segment end point. Figure 6 Figure 7 As shown, if the search position p4 satisfies the second boundary collision condition, then search position p4 can be marked as a line segment termination point. Furthermore, a complete first directed line segment can be determined from the line segment between search positions p2 and p4 on the candidate fill line. Following this method, one or more first directed line segments can be determined for each candidate fill line. Further, this can be further utilized by the user... Figure 4 The user interface setting shown filters out the first directed line segment whose length is less than the "lower line length limit".
[0103] The above scheme improves the accuracy of adhesive application boundary judgment and reduces the random error of single-point detection by sampling multiple detection points on the collision detection circle generated at the search location. This ensures that the generated first directed line segment lies within the filling contour of the area to be filled, and that its two endpoints have precise collision constraints with the filling contour boundary. This improves the geometric integrity of the internal adhesive application path, ensuring uniform and complete coverage of the area to be filled with adhesive. It also reduces adhesive overflow from the filling contour boundary of the area to be filled, effectively improving the adhesive application quality. Furthermore, this scheme offers high flexibility and adaptability. Simultaneously, due to its low computational load and high computational efficiency, it can quickly complete adhesive application path planning, significantly shortening the production cycle and improving production efficiency.
[0104] In one embodiment, step S143 determines the internal adhesive application path of the area to be filled based on a plurality of parallel first directional line segments, including the following steps S1431 to S1437.
[0105] Step S1431: Obtain the endpoint sequence of multiple parallel first directed line segments, wherein the endpoint sequence includes the start point and end point of each first directed line segment searched sequentially. For example, during the process of sequentially determining the first directed line segments on each candidate fill line in each area to be filled according to the methods described in steps S1423.4a to S1423.4e, the coordinates of the start point and end point of each first directed line segment can be stored sequentially. (See reference...) Figure 5 In Figure b, assuming the region to be filled contains n candidate lines, the coordinates of the starting and ending points of the first directed line segments can be stored sequentially from left to right. Assuming a total of n first directed line segments are found, the coordinates of 2n endpoints can be stored sequentially, forming the endpoint sequence of the first directed line segments in the region to be filled. For example, the endpoint sequence can be represented as: {(x1,y1),(x2,y2),(x3,y3)...(xn,yn)}, where two adjacent points constitute a first directed line segment.
[0106] In the embodiment of the present application, the gluing mode of the to-be-filled region can be determined automatically by the system or manually set by the user. For example, the user can set the gluing mode in the user interface shown in FIG. 13B, specifically in the drop-down selection box after "line segment integration mode" under "line segment filling parameters". The gluing mode can include at least two categories: sequential gluing mode and merging gluing mode. Each category of gluing mode can correspond to multiple subdivided subtypes. For example, when the user selects the sequential gluing mode, the user can further select the subtype of the sequential gluing mode, such as "Z" type and "bow" type. After obtaining the gluing mode of the to-be-filled region, the end point sequence of each to-be-filled region can be processed according to the gluing mode. For example, when the gluing mode is the sequential gluing mode, the end point sequence can be updated according to the method in step S1433; when the gluing mode is the merging gluing mode, the end point sequence can be updated according to the methods in steps S1434, S1435 and S1436. Figure 4
[0107] For example, when the gluing mode is the sequential gluing mode, for each first directed line segment, whether the first directed line segment satisfies the reverse direction condition can be determined according to the coordinates of the line segment start point and the line segment end point of the first directed line segment and the subtype of the sequential gluing mode. For example, if the subtype of the sequential gluing mode is the "Z" type, and the order of the line segment start point and the line segment end point of each first directed line segment in the end point sequence is consistent with the automatic search order, it can be determined that the first directed line segment does not satisfy the reverse direction condition. For example, for the first directed line segment 1301 in FIG. 13B, the order of the line segment start point and the line segment end point of the first directed line segment 1301 in the end point sequence is consistent with the automatic search order, so the first directed line segment 1301 does not satisfy the reverse direction condition.
[0108] For example, when the gluing mode is the sequential gluing mode, for each first directed line segment, whether the first directed line segment satisfies the reverse direction condition can be determined according to the coordinates of the line segment start point and the line segment end point of the first directed line segment and the subtype of the sequential gluing mode. For example, if the subtype of the sequential gluing mode is the "Z" type, and the order of the line segment start point and the line segment end point of each first directed line segment in the end point sequence is consistent with the automatic search order, it can be determined that the first directed line segment does not satisfy the reverse direction condition. For example, for the first directed line segment 1301 in FIG. 13B, the order of the line segment start point and the line segment end point of the first directed line segment 1301 in the end point sequence is consistent with the automatic search order, so the first directed line segment 1301 does not satisfy the reverse direction condition. Figure 5 For example, if the sub-type of the sequential gluing manner is the "Z" type, the end points of the two adjacent first directed line segments can be kept in the order of "up-down-up-down", that is, if the positive direction of the y-axis is downward, in the end point sequence, the end point with the smaller vertical coordinate (the line segment starting point) of the two end points of each first directed line segment is kept in front, and the end point with the larger vertical coordinate (the line segment ending point) is kept in the rear. For another example, if the sub-type of the sequential gluing manner is the "bow" type, and the order of the line segment starting point and the line segment ending point of each first directed line segment in the end point sequence is consistent with the automatic search order, whether each first directed line segment in the end point sequence satisfies the reverse direction condition can be determined in turn. Exemplarily but not limitatively, whether the two first directed line segments are located on the same candidate filling line can be determined according to the end point coordinates of each first directed line segment in the end point sequence and the end point coordinates of the last determined direction first directed line segment. If yes, it is determined that the direction of the current first directed line segment is the same as that of the last first directed line segment, otherwise, it is determined that the direction of the current first directed line segment is opposite to that of the last first directed line segment. For example, for the plurality of first directed line segments determined on the candidate filling line shown in FIG. b, the direction of the first first directed line segment in the end point sequence can be determined first. Then, according to the direction of the first first directed line segment, whether the first first directed line segment and the second first directed line segment are located on the same candidate filling line, whether the second first directed line segment satisfies the reverse direction condition is determined. For example, it is determined that the first first directed line segment does not satisfy the reverse direction condition first. If the vertical coordinates of the two end points of the second first directed line segment are the same as the vertical coordinates of the two end points of the first first directed line segment, it is determined that the two are located on the same candidate filling line, and it is further determined that the second first directed line segment also does not satisfy the reverse direction condition. After it is determined that the second first directed line segment does not satisfy the reverse direction condition, if it is determined that the third first directed line segment and the second first directed line segment are located on different candidate filling lines, it is determined that the third first directed line segment satisfies the reverse direction condition, at this time, the order of the two end points of the third first directed line segment in the end point sequence can be exchanged. By analogy, until the update of the end point sequence of all first directed line segments of the current to-be-filled region is completed. Figure 5
[0109] In step S1434, in the case where the gluing manner is the merging gluing manner, the plurality of parallel first directed line segments are divided into a plurality of continuous gluing groups according to the coordinates of the line segment starting point and the line segment ending point of each first directed line segment in the end point sequence.
[0110] In step S1435, the first order of the plurality of continuous gluing groups and the second order of the first directed line segments in each continuous gluing group are determined.
[0111] Step S1436, according to the first order and the second order, updating the order of the line segment start point and the line segment end point of each first directed line segment in the endpoint sequence.
[0112] An example implementation of steps S1434 to S1436 is described below with reference to Figure 9 An example implementation of steps S1434 to S1436 is described below with reference to Figure 9 As shown in FIG. 14B, in the process of searching for the first directed line segments, the first directed line segments of the to-be-filled region in the graph can be searched in the order from left to right and from top to bottom in the graph, and thus the endpoints of the first directed line segments of the to-be-filled region in the graph can also be arranged in the order from left to right and from top to bottom. If it is determined that the gluing manner of the to-be-filled region is the merging gluing manner, the plurality of parallel first directed line segments can be divided into a plurality of continuous gluing groups according to the coordinates of the line segment start point and the line segment end point of each first directed line segment in the endpoint sequence. A variety of suitable methods can be used to divide the continuous gluing groups. For example, the continuous gluing groups can be divided based on the distances between different first directed line segments. For example, the first first directed line segment (e.g., denoted as line segment 1) in the endpoint sequence can be taken as a continuous gluing group first, and then the other first directed line segment (e.g., denoted as line segment 2) closest to line segment 1 can be added to the continuous gluing group, where the distance between line segment 2 and line segment 1 is less than or equal to a preset distance threshold (e.g., the distance threshold is equal to 2 times the line segment filling interval). Then, the line segment 3 closest to line segment 2 can also be added to the continuous gluing group. In this way, until the distance between the remaining first directed line segments and the last added first directed line segment (e.g., denoted as line segment m) in the current continuous gluing group is greater than the preset distance threshold. Then, the remaining first directed line segments can be grouped in a similar manner. As shown in FIG. 14B, three continuous gluing groups can be divided, where the first directed line segments represented by the lines of the same color belong to one continuous gluing group. Figure 9
[0113] Exemplarily, after the grouping is completed, the gluing sequence relationship between the continuous gluing groups (first order) and the gluing sequence relationship of each line segment in each continuous gluing group (i.e., second order) can be further determined, and the end point sequence is updated according to the first order and the second order. In a specific example, it can be determined that the first order is consistent with the order of division of the continuous gluing groups. That is, the end points of the first directed line segment of the continuous gluing group divided first are also arranged in sequence in the end point sequence. In addition, for each continuous gluing group, the order of the first directed line segment in the end point sequence can be updated in the order of the first directed line segment added to the group. For example, the end points of line segment 1, line segment 2, line segment 3, …, line segment m are arranged in sequence. Then, for each continuous gluing group, it can be determined in sequence whether each first directed line segment in the continuous gluing group satisfies the reverse direction condition according to the "bow" type gluing mode. If a first directed line segment satisfies the reverse condition, the positions of the two end points of the first directed line segment are further exchanged in the updated end point sequence. It can be understood that after updating the end point sequence according to this scheme, the gluing path continuity can be better.
[0114] Step S1437, after updating the end point sequence according to the gluing mode, the internal gluing path of the to-be-filled region is determined according to the updated end point sequence. Exemplarily, for each to-be-filled region, the end point sequence of the updated first directed line segment is mapped to the control machine coordinate system to obtain the internal gluing path of the to-be-filled region.
[0115] In the above scheme, the end point sequence of the first directed line segment generated in the to-be-filled region can be updated according to the gluing mode of the to-be-filled region, and an internal gluing path with higher continuity matching the gluing mode can be generated, thereby significantly improving the gluing efficiency, reducing the empty stroke in the gluing process, and improving the consistency of the gluing quality.
[0116] In an embodiment, before step S150 of determining the complete gluing path for the target workpiece according to the internal gluing path and the external gluing path of each to-be-filled region, the gluing path determination method of the embodiment further includes the following steps: step S1501, acquiring second filling reference information of a division line region in the contour map, wherein the division line region is a region between the filling contours of two adjacent to-be-filled regions, the first division line for dividing the two adjacent to-be-filled regions is included in the division line region, and the second filling reference information includes a line segment filling density; step S1502, generating a plurality of second directed line segments parallel to the first division line in the division line region according to the second filling reference information; and step S1503, determining an internal gluing path of the division line region according to the plurality of second directed line segments.
[0117] It is understandable that when the outer contour of the target workpiece includes multiple areas to be filled, since the generation of the internal glue application path for each area to be filled considers contour shrinkage and boundary collision detection, there may be some areas between the internal glue application paths of two adjacent areas to be filled that are not filled with glue. To improve the stability and consistency of the overall glue application on the target workpiece, in this embodiment, in response to the user's segmented filling command (e.g., the user in...), Figure 4 The "Fill near partition lines" option is checked in the "Partition Fill Parameters" area of the user interface, automatically determining the glue application path for the partition line area between two adjacent areas. Specifically, the partition line area can be the area between the fill outlines of two adjacent areas to be filled. Figure 10 As shown, the dividing line area between the fill outlines of the two regions to be filled (shown by the green lines in the figure) includes the dividing line (first dividing line) between the two regions to be filled.
[0118] In this embodiment of the application, multiple parallel second directed line segments can be generated in each dividing line region in a manner similar to the scheme of generating a first directed line segment in the region to be filled.
[0119] For example, second fill reference information for each dividing line region can be obtained first. This second fill reference information can be set by the user or automatically determined by the system. In this embodiment, the second fill reference information may include at least the line segment fill density (such as the line segment fill spacing) and may also include a lower limit for line length, etc. For example, the user can... Figure 4 This section shows the interactive controls in the "Partition Fill Parameters" area of the user interface. You can select the desired dividing line area to fill in the selection box after "Current Line," enter the indentation parameter in the selection box after "Partition Line Indentation," and enter the line fill spacing for the second directed line segment in the selection box after "Partition Line Line Width." For example... Figure 10 As shown, the second directed line segment generated within the dividing line region in the figure can be parallel to the first dividing line. This is illustrative and not restrictive, referring to... Figure 10The right boundary of the filling contour of the left side to-be-filled region and the left boundary of the filling contour of the right side to-be-filled region can be connected to obtain two connecting lines (shown by black lines in the figure) to generate a quadrangle, which can be used as the filling contour of the split line region and the line segment effective region, and 3 parallel second directed line segments can be generated in the split line region according to a method similar to the foregoing steps S1421, S1422, S1423.1 to S1423.6. Then, the generated second directed line segments can be converted into the internal glue applying path of the split line region by using various suitable methods. For example, the second directed line segments can be sorted first. For example, the end point sequence of the second directed line segments can be updated in the order from left to right (line segment sorting) and from top to bottom (end point sorting of the same line segment). Then, according to the updated end point sequence, a glue applying path with the shortest path and the least idle stroke can be generated as the internal glue applying path of the split line region. For example, for each split line region, the updated end point sequence of the second directed line segments can be mapped to the control machine coordinate system to obtain the internal glue applying path of the split line region.
[0120] Step S150 determines the complete glue applying path for the target workpiece according to the internal glue applying path and the external glue applying path of each to-be-filled region, including step S151, determining the complete glue applying path for the target workpiece according to the internal glue applying path of each to-be-filled region, the internal glue applying path and the external glue applying path of each split line region.
[0121] Exemplarily, in combination with Figure 3 , Figure 4 and Figure 10 , after the external glue applying path of the target workpiece, the internal glue applying path of each of the 3 to-be-filled regions, and the internal glue applying path of each of the 2 split line regions between the 3 to-be-filled regions are determined, these glue applying paths (for example, collectively referred to as sub glue applying paths) can be integrated to obtain a complete glue applying path for the target workpiece. Exemplarily, the execution order of each sub glue applying path can be determined first, and then the sub glue applying paths can be connected according to the execution order to obtain the complete glue applying path. For example, the internal glue applying path of each to-be-filled region can be executed first, then the internal glue applying path of each split line region can be executed, and finally the external glue applying path can be executed.
[0122] In a preferred embodiment, the integrated complete glue applying path can also be further optimized according to the characteristics and requirements of the glue applying equipment, for example, the number of lifting of the glue head is reduced, the glue applying sequence is optimized, and the like, so as to improve the glue applying efficiency and quality.
[0123] In the above scheme, according to the second filling reference information of the partition line region between adjacent to-be-filled regions, a second directed line segment parallel to the first partition line is automatically generated in the partition line region, and an internal glue application path of the partition line region is obtained, so that the glue application path between the to-be-filled regions is coordinated with the direction of the glue application path of the adjacent to-be-filled regions, the stability of the glue application structure is enhanced, and the glue application quality is improved. Finally, by integrating the internal glue application paths of the to-be-filled regions and the partition line region and the external glue application path of the target workpiece, a complete closed loop glue application path of the target workpiece is formed, so that the glue path uniformly covers the entire target workpiece. The scheme effectively fills the gap between adjacent to-be-filled regions through the parallel glue path of the partition line region, and improves the overall glue application consistency. By setting the direction of the second directed line segment consistent with the first partition line, the deformation resistance of the glue layer is enhanced. The effective balance of glue application quality, glue application efficiency and glue application structure strength is achieved.
[0124] The following refers to Figure 11a and Figure 11b A glue application path determination method of another embodiment of the present application is described. As shown in Figure 11a , first, the user imported CAD drawing of the external contour of the target workpiece is received, the drawing elements in the CAD drawing are reordered, and then the ordered external contour parameter set in TSP format is generated. Then, the external contour parameter set is parsed to obtain the external glue application parameter sequence of the target workpiece. The coordinate conversion relationship between the drawing coordinate system and the control machine coordinate system of the automatic glue application equipment can be solved through marker point alignment. Then, according to the coordinate conversion relationship, the external glue application parameter sequence can be mapped to the control machine coordinate system to obtain the external glue application path of the target workpiece. It can be judged whether the user's partition filling instruction is received. If the partition filling instruction is not received, the closed region surrounded by the external contour can be regarded as a to-be-filled region. If the partition filling instruction is received, the partition line can be added in the external contour, and the closed region surrounded by the external contour can be divided into multiple to-be-filled regions according to the position of the partition line. Then, the contour of each to-be-filled region can be refined and divided by using the polygon contour point set algorithm to obtain the contour point set of each to-be-filled region. Then, for each to-be-filled region, the partition filling process shown in Figure 11b is executed, and the internal glue application path of each to-be-filled region can be determined.
[0125] Specifically, referring to Figure 11bAccording to the internal shrinkage parameter of the current to-be-filled region, the outer contour of the to-be-filled region is scaled to obtain a filling contour of the to-be-filled region. Then, the minimum circumscribed rectangle of the filling contour is determined, and the minimum circumscribed rectangle can be adjusted according to the filling starting point offset parameter of the to-be-filled region. Subsequently, the number n of candidate filling lines that can be filled in the minimum circumscribed rectangle is calculated according to the line segment filling interval of the to-be-filled region, and n candidate filling lines are generated in the to-be-filled region. Then, by using a collision detection method, a first directed line segment on each candidate filling line that meets the boundary collision condition at both ends is searched in turn. The end points of the searched first directed line segment are stored in turn to obtain an end point sequence. Next, according to the gluing mode of the to-be-filled region and the end point sequence of the first directed line segment, an internal gluing path of the to-be-filled region is determined. Specifically, if the gluing mode is sequential gluing, the end point sequence of the first directed line segment is further updated according to the sub-type of the sequential gluing. If the sequential gluing is of an arch type, the end point sequence of the first directed line segment is updated in turn from the first first directed line segment in the end point sequence. Specifically, it can be judged whether the current first directed line segment meets the reverse direction condition, and if it meets the reverse direction condition, the order of the two end points of the first directed line segment in the end point sequence is exchanged. If it does not meet the reverse direction condition, the order of the end points is not updated. Next, the next first directed line segment is taken as the current first directed line segment, and the update of the end point position is continued until the traversal is completed. If the sequential gluing is of a Z type, the end point sequence is not updated. If the to-be-filled region is of a merged gluing mode, the first directed line segments are first divided into a plurality of continuous gluing groups according to the distance between the first directed line segments. Then, a first order of the plurality of continuous gluing groups and a second order of the first directed line segments in each continuous gluing group are determined. Subsequently, the end point sequence is updated according to the first order and the second order. Finally, the end point sequence is mapped to a control machine coordinate system, and an internal gluing path of the current to-be-filled region is generated.
[0126] Referring again to Figure 11a After the internal gluing paths of the to-be-filled regions are determined, it can be further judged whether a user's split line region filling instruction is received. If the split line region filling instruction is received, a split line filling process is performed on each split line region, and the internal gluing path of each split line region is determined. Finally, the complete gluing path of the target workpiece is obtained by integrating the external gluing path of the target workpiece, the internal gluing paths of the to-be-filled regions, and the internal gluing paths of the split line regions.
[0127] The embodiment of the present application further provides a glue applying path determination device. The glue applying path determination device of the embodiment of the present application comprises: an acquisition module, configured to acquire a contour map of a target workpiece to be glued; an external glue applying path determination module, configured to reorder each drawing element in the contour map to obtain an external glue applying path of the target workpiece; a region to be filled determination module, configured to determine a region to be filled in the contour map according to a filling instruction type of a user; an internal glue applying path determination module, configured to generate a plurality of first directed line segments inside each region to be filled to obtain an internal glue applying path of each region to be filled; and a complete glue applying path determination module, configured to determine a complete glue applying path for the target workpiece according to the internal glue applying path of each region to be filled and the external glue applying path.
[0128] The unit modules of the glue applying path determination device described above can respectively execute the corresponding steps in the method embodiments described above, and thus the unit modules will not be described in detail here, and the details can be referred to the description of the corresponding steps above. It should be noted that the glue applying path determination device described above is embodied in the form of functional units. The term "unit" herein can be implemented in the form of software and / or hardware, and is not specifically limited. For example, the "unit" can be a software program, a hardware circuit or a combination of both, which realizes the functions described above. The hardware circuit can include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, and other suitable components for supporting the described functions.
[0129] Therefore, the units of each example described in the embodiments of the present application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.
[0130] The embodiment of the present application further provides a terminal device. The terminal device of the embodiment of the present application comprises at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and the processor implements the steps of the glue applying path determination method when executing the computer program.
[0131] In the embodiments of the present application, the terminal device can include but is not limited to a processor and a memory, and can include more or fewer components, or combine certain components, or different components. The processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0132] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the above glue application path determination method can be implemented.
[0133] The embodiments of the present application provide a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps of the above glue application path determination method.
Claims
1. A method for determining an adhesive application path, characterized in that, include: Obtain the outline of the target workpiece to be coated with adhesive; The drawing elements in the contour diagram are reordered to obtain the external adhesive application path of the target workpiece; The area to be filled in the contour map is determined according to the user's fill instruction type; Multiple first directed line segments are generated within each area to be filled to obtain the internal adhesive application path of each area to be filled; Based on the internal adhesive application path and the external adhesive application path of each area to be filled, a complete adhesive application path for the target workpiece is determined; The step of generating multiple first directed line segments within each area to be filled to obtain the internal adhesive application path of each area to be filled includes: First fill reference information is determined for each region to be filled, wherein the first fill reference information includes line segment fill direction, line segment fill density, and effective line segment area. The line segment fill direction indicates the direction of the first directed line segment to be generated. The fill density indicates the density of the fill line segments to be generated in the region to be filled. The effective line segment area indicates the position range of the first directed line segment to be generated. The effective line segment area is determined according to the fill profile of the region to be filled. The line segment fill direction is the same for the same region to be filled. The line segment fill direction is different for different regions to be filled that are adjacent to each other. For each region to be filled Based on the first filling reference information of the area to be filled, multiple parallel first directed line segments are generated within the area to be filled. The internal adhesive application path of the area to be filled is determined based on the plurality of parallel first directed line segments; The line segment fill density includes the fill spacing, and the step of generating multiple parallel first directed line segments within the area to be filled based on the first fill reference information of the area to be filled includes: Based on the line segment filling direction, the filling spacing, and the size of the effective area of the line segment, calculate the first number of candidate filling lines that can be filled in the area to be filled; Based on the first number, the line segment filling direction, the preset corner point of the effective area of the line segment, and the filling spacing, the first number of candidate filling lines are generated within the effective area of the line segment. The direction of the candidate filling line is the line segment filling direction, the distance between two adjacent candidate filling lines is equal to the filling spacing, and the distance between the preset corner point and the i-th candidate filling line in the first number of candidate filling lines is equal to the product of the filling spacing and i. Using the automatic search parameters of the region to be filled, a first directed line segment that satisfies the boundary collision condition at both ends is searched on the candidate filling line.
2. The method for determining the adhesive application path as described in claim 1, characterized in that, The step of using the automatic search parameters of the region to be filled to search for a first directed line segment on the candidate filling line that satisfies the boundary collision condition at both ends includes: Obtain the automatic search parameters, wherein the automatic search parameters include a preset radius of the collision detection circle and an automatic search step size; For each candidate fill line According to the automatic search step size, starting from one end of the candidate fill line, the search proceeds step by step along the candidate fill line. When the search reaches the current search position, a collision detection circle is generated with the current search position as the center, wherein the radius of the collision detection circle is equal to the preset radius; Based at least on the relative positional relationship between the collision detection circle and the filling contour of the area to be filled, it is determined whether the current search position meets the boundary collision condition; If the current search position is determined to meet the boundary collision condition, the current search position is marked as a line segment start point or line segment end point; If a line segment start point and a line segment end point are marked successively, the line segment between the start point and the end point is determined as the first directed line segment that satisfies the boundary collision condition at both ends, until the search for the candidate filling line is completed.
3. The method for determining the adhesive application path as described in claim 2, characterized in that, The boundary collision conditions include a first boundary collision condition and a second boundary collision condition. The automatic search parameters also include a second number of detection points on the collision detection circle and a collision number threshold. Determining whether the current search position meets the boundary collision conditions based at least on the relative positional relationship between the collision detection circle and the filling contour of the area to be filled includes: Determine the positions of the second number of detection points on the collision detection circle; Based on the positions of the second number of detection points and the position of the filling outline of the area to be filled, determine whether each of the second number of detection points is located within the target area enclosed by the filling outline of the area to be filled, and record the detection points located within the target area as collision points; If the number of collision points is greater than or equal to the collision number threshold, the current search position is determined to be within the filled contour; otherwise, the current search position is determined to be outside the filled contour. If the previous search position is outside the filled contour and the current search position is inside the filled contour, it is determined that the current search position satisfies the first boundary collision condition. If the current search position is within the filled contour and the next search position is outside the filled contour, it is determined that the current search position satisfies the second boundary collision condition. The step of marking the current search position as a line segment start point or line segment end point when it is determined that the current search position meets the boundary collision condition includes: If the current search position is determined to meet the first boundary collision condition, the current search position is marked as the starting point of a line segment; If the current search position is determined to meet the first boundary collision condition, the current search position is marked as a line segment termination point.
4. The method for determining the adhesive application path as described in any one of claims 1-3, characterized in that, The step of determining the area to be filled in the contour map based on the user's fill instruction type includes: When the user's fill instruction type is partition fill type, the closed area enclosed by the outer contour line is divided into multiple areas to be filled based on the dividing line added to the contour map and the outer contour line of the contour map. If the user's fill instruction type is a global fill type, the closed area enclosed by the outer contour line is taken as a region to be filled.
5. The method for determining the adhesive application path as described in claim 4, characterized in that, Before determining the complete adhesive application path for the target workpiece based on the internal adhesive application path and the external adhesive application path for each area to be filled, the method further includes: Obtain second fill reference information for the dividing line region in the contour map, wherein the dividing line region is the region between the fill contours of two adjacent regions to be filled, and the dividing line region contains a first dividing line for dividing the two adjacent regions to be filled, and the second fill reference information includes line segment fill density. Based on the second filling reference information, a plurality of second directed line segments parallel to the first dividing line are generated within the dividing line area; The internal adhesive application path of the dividing line region is determined based on the plurality of second directed line segments; The step of determining the complete adhesive application path for the target workpiece based on the internal adhesive application path and the external adhesive application path of each area to be filled includes: Based on the internal adhesive application path of each area to be filled, the internal adhesive application path of each dividing line area, and the external adhesive application path, a complete adhesive application path for the target workpiece is determined.
6. The method for determining the adhesive application path as described in any one of claims 1-3, characterized in that, The step of determining the internal adhesive application path of the area to be filled based on the plurality of parallel first directed line segments includes: Obtain the endpoint sequence of the plurality of parallel first directed line segments, wherein the endpoint sequence includes the line segment start point and line segment end point of each first directed line segment searched sequentially; Obtain the adhesive application method for the area to be filled; When the glue application method is sequential glue application, based on the coordinates of the starting point and ending point of each first directed line segment in the endpoint sequence, it is determined whether each first directed line segment satisfies the reverse direction condition. If so, the order of the starting point and ending point of the first directed line segment is swapped in the endpoint sequence. When the adhesive application method is a combined adhesive application method, the plurality of parallel first directed line segments are divided into a plurality of continuous adhesive application groups according to the coordinates of the starting point and the ending point of each first directed line segment in the endpoint sequence. Determine the first order of the plurality of consecutive adhesive application groups and the second order of the first directed line segments in each consecutive adhesive application group; According to the first order and the second order, update the order of the start point and end point of each first directed line segment in the endpoint sequence; After updating the endpoint sequence according to the described adhesive application method, the internal adhesive application path of the area to be filled is determined according to the updated endpoint sequence.
7. The method for determining the adhesive application path as described in any one of claims 1-3, characterized in that, The determination of the first filling reference information for each region to be filled includes: Get the outline scaling parameters of the region to be filled; Based on the contour scaling parameters and the contour point set of the region to be filled, the contour of the region to be filled is scaled to obtain the filling contour; Get the fill start offset parameter of the area to be filled; The position of the minimum bounding rectangle of the fill profile is adjusted according to the fill start point offset parameter. The effective area of the line segments in the region to be filled is determined based on the position of the adjusted minimum bounding rectangle.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the adhesive path determination method as described in any one of claims 1-7.
Citation Information
Patent Citations
Gluing path generation method, device and system and computer readable storage medium
CN112238032A
Glue path quality detection method and device, electronic equipment and storage medium
CN118351097A