Dispensing path under space contour point, program generation method, system and equipment
By acquiring and correcting the spatial contour point cloud data of the workpiece, a smooth dispensing path is generated, which solves the problem of dispensing path deviation caused by workpiece deformation and achieves high-precision and high-quality dispensing effects.
Patent Information
- Application Number
- CN202510655762.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-10-21
AI Technical Summary
The existing technology is difficult to consider the changes in the normal and contact angle between the nozzle and the workpiece surface when the workpiece is severely deformed, which leads to deviation in the dispensing path and affects the dispensing quality and accuracy.
By acquiring the spatial contour point cloud data of the dispensing process, judging and correcting the normal vector anomaly, performing parameterized processing, generating a smooth dispensing path, and generating a dispensing path NC program executable by the machine tool.
It improves the dispensing accuracy and quality, reduces the problems of glue leakage and unstable glue flow, is suitable for workpieces with severe deformation, and enhances the accuracy and reliability of the dispensing path.
Smart Images

Figure CN120823281A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of glue dispensing technology, and in particular to a glue dispensing path under spatial contour points, a program generation method, a system and a device. Background Art
[0002] Glue dispensing technology is a process whereby glue, oil, or other liquids are precisely applied, potted, or dripped onto a workpiece surface using specialized equipment. With the continuous advancement of automated manufacturing, this technology has gained widespread application in a variety of fields, including electronics manufacturing, the automotive industry, and LED display assembly.
[0003] Five-axis dispensing equipment is a high-precision dispensing device that enables flexible dispensing paths and complex workpiece surface treatment, making it widely used in dispensing technology. During use, the dispensing path needs to be planned. Traditional dispensing path planning methods are based on static 3D CAD models. However, during the actual dispensing process, many workpieces deform due to material properties, external forces during processing, and environmental factors. This deformation makes traditional dispensing path generation methods difficult to adapt to actual needs. For severely deformed workpieces, traditional static path planning methods are particularly incapable of accounting for the dynamic deformation of the workpiece during the dispensing process. This leads to significant deviations in the dispensing path during actual operation, affecting dispensing quality and accuracy. Therefore, fully considering the real-time nature and influencing factors of workpiece deformation when generating dispensing paths for deformed workpieces is a challenge in dispensing technology.
[0004] To better account for the real-time nature and influencing factors of workpiece deformation, existing approaches to dispensing path compensation exist. These methods primarily fall into two categories: methods that calculate errors based on measurement data and perform deformation optimization, and methods that use actual product points for trajectory planning. The method of calculating errors based on measurement data and performing deformation optimization measures the workpiece surface, acquires data, and calculates the error relative to the original design model, thereby optimizing the dispensing path. While this method can optimize the dispensing path to a certain extent, when workpiece deformation is severe, error compensation algorithms relying on measurement data cannot handle complex and large-scale deformations, resulting in optimized results that fail to meet actual dispensing requirements. The method of using actual product points for trajectory planning uses an image acquisition device or scanner to inspect the workpiece surface, extract the actual dispensing area, and then generate a dispensing path based on this extracted area. This method can also optimize the dispensing path to a certain extent, but it typically only considers point position adjustment and fails to account for changes in the normal and contact angle between the nozzle and the workpiece surface. For five-axis dispensing operations, the changes in the normal and contact angles between the nozzle and the workpiece surface have a great impact on the dispensing quality. The lack of axial optimization may lead to unstable glue flow and glue leakage, thereby reducing dispensing accuracy. Summary of the Invention
[0005] To this end, the technical problem to be solved by the present invention is to overcome the shortcomings of the existing technology and provide a dispensing path, program generation method, system and equipment under spatial contour points, which can fully consider the changes in the normal and contact angle between the nozzle and the workpiece surface, and is suitable for situations where the workpiece is severely deformed, thereby improving the dispensing accuracy and reducing glue leakage.
[0006] To solve the above technical problems, the present invention provides a method for generating a dispensing path under a spatial contour point, comprising:
[0007] Acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes spatial coordinates and normal vectors of contour points;
[0008] Determining whether the contour points are smooth according to the spatial coordinates, and smoothing the spatial coordinates of the contour points that are not smooth;
[0009] Calculate the direction of the line connecting the current contour point and the previous contour point of the current contour point. Determine whether the normal vector of the current contour point is abnormal based on the line direction of the two points and the cosine distance of the normal vector of the current contour point. Correct the contour points with abnormal normal vectors. Parameterize all contour points after the normal vector correction and smooth the normal vectors of all contour points based on the end points of the parameterized contour points.
[0010] The dispensing path is generated by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points.
[0011] Furthermore, judging whether the contour point is smooth according to the spatial coordinates is specifically as follows:
[0012] The contour points are the ordered points of the spatial contour. Local fitting is performed on the ordered points to obtain the local fitting curves. The ordered points have one-to-one corresponding fitting points on the fitting curve.
[0013] The gap between the ordered points and the fitted points is calculated, and the ordered points whose gap is greater than the preset threshold are regarded as unsmooth points, and the ordered points whose gap is less than or equal to the preset threshold are regarded as smooth points.
[0014] Furthermore, the direction of the line connecting the current contour point and the contour point immediately preceding the current contour point is calculated, and whether the normal vector of the current contour point is abnormal is determined based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point. Specifically,
[0015] The current contour point is recorded as P n , the previous contour point of the current contour point is recorded as P n-1 , P n As the nth contour point, P n and P n-1The curve between them is approximately a straight line, and P is obtained. n 、P n-1 The direction of the line, calculate the contour point P n The cosine distance between the normal vector and the connecting direction. If the cosine distance is greater than the preset threshold, then P n The normal vector of is corrected, otherwise it is not corrected;
[0016] The pair P n The normal vector of the contour point P is modified as follows: the direction of the connecting line is used as the normal to construct the projection plane, and the contour point P is used as the normal to construct the projection plane. n The normal vector of is projected onto the projection plane to obtain a corrected normal vector.
[0017] Furthermore, all the contour points after the parameterized correction of the normal vector are specifically:
[0018] The nth contour point after spatial coordinate smoothing and normal vector anomaly correction is recorded as Indicates the spatial coordinates of the nth contour point at this time, Indicates the normal vector of the nth contour point at this time; arrange the contour points in order, the contour points The corresponding parameterized contour points are where u n is the parameter value of the nth contour point after parameterization;
[0019] The parameter value of the nth contour point after parameterization is specifically:
[0020]
[0021] Where N is the total number of contour points.
[0022] Furthermore, the normal vectors of all contour points are smoothed according to the end points of the parameterized contour points, specifically:
[0023] According to the coordinates of the end point of the normal vector, the end point is fitted to obtain the fitting curve, which is recorded as f(u n );
[0024] The normal vector of the nth contour point after smoothing is (f(u n ) T -(u n ,0,0)).
[0025] The present invention also provides a method for generating a dispensing program under spatial contour points, which uses the dispensing path generation method under spatial contour points to generate a dispensing path, generates a corresponding APT file based on the dispensing path, and converts the APT file into a dispensing path CNC program executable by a machine tool through post-processing.
[0026] The present invention also provides a dispensing path generation system under a spatial contour point, comprising:
[0027] A data acquisition module is used to acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes spatial coordinates and normal vectors of contour points;
[0028] A coordinate smoothing module is used to determine whether the contour points are smooth according to the spatial coordinates, and to smooth the spatial coordinates of the contour points that are not smooth;
[0029] The normal smoothing module calculates the direction of the line connecting the current contour point and the previous contour point of the current contour point. Based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point, it determines whether the normal vector of the current contour point is abnormal and corrects the contour points with abnormal normal vectors. After parameterizing the corrected normal vectors, the normal vectors of all contour points are smoothed according to the end points of the parameterized contour points.
[0030] The dispensing path generation module is used to generate the dispensing path by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points.
[0031] The present invention also provides a dispensing program generation system under spatial contour points, comprising:
[0032] A data acquisition module is used to acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes spatial coordinates and normal vectors of contour points;
[0033] A coordinate smoothing module is used to determine whether the contour points are smooth according to the spatial coordinates, and to smooth the spatial coordinates of the contour points that are not smooth;
[0034] The normal smoothing module is used to calculate the direction of the line connecting the current contour point and the previous contour point of the current contour point. Based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point, it determines whether the normal vector of the current contour point is abnormal and corrects the contour points with abnormal normal vectors. After parameterizing the corrected normal vectors, the normal vectors of all contour points are smoothed according to the end points of the parameterized contour points.
[0035] The dispensing path generation module is used to generate the dispensing path by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points;
[0036] The dispensing program generation module is used to generate the corresponding APT file according to the dispensing path, and convert the APT file into a dispensing path NC program executable by the machine tool through post-processing.
[0037] The present invention also provides a device for generating a dispensing path under a spatial contour point, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the method for generating a dispensing path under a spatial contour point is implemented.
[0038] The present invention also provides a device for generating a dispensing program under spatial contour points, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the method for generating a dispensing program under spatial contour points is implemented.
[0039] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0040] During the generation process of the dispensing path, the present invention optimizes the nozzle axial angle by smoothing the normal vectors of the workpiece spatial contour points, ensuring that the nozzle and the workpiece surface always maintain a contact angle, thereby reducing the problems of glue leakage or unstable glue flow, improving the dispensing accuracy and quality, and can be applied to situations where the workpiece is severely deformed. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0042] Figure 1 This is a flow chart of the method for generating a dispensing path in a preferred embodiment of the present invention.
[0043] Figure 2 This is a step diagram of the dispensing program generation method in a preferred embodiment of the present invention.
[0044] Figure 3 Schematic diagram of point smoothing judgment in a preferred embodiment of the present invention.
[0045] Figure 4 Schematic diagram of the normal direction of actual contour points in a preferred embodiment of the present invention.
[0046] Figure 5 Schematic diagram of correcting abnormal normal directions of contour points in a preferred embodiment of the present invention.
[0047] Figure 6 Schematic diagram of parameterized contour points in a preferred embodiment of the present invention.
[0048] Figure 7 Schematic diagram of the normal vector of a point after smoothing parameterization in a preferred embodiment of the present invention.
[0049] Figure 8This is an example diagram of spatial contour point information in a simulation experiment in a preferred embodiment of the present invention.
[0050] Figure 9 This is an example diagram of non-smooth points in contour points in a simulation experiment in a preferred embodiment of the present invention.
[0051] Figure 10 For the simulation experiment in the preferred embodiment of the present invention Figure 9 Schematic diagram after smoothing the uneven points in the image.
[0052] Figure 11 This is an example diagram of the normal vectors of contour points before smoothing in a simulation experiment in a preferred embodiment of the present invention.
[0053] Figure 12 For the simulation experiment in the preferred embodiment of the present invention Figure 11 Schematic diagram of the normal vectors of the contour points after correction of abnormal normals, parameterization, and smoothing.
[0054] Figure 13 This is an example diagram of an APT file generated in a simulation experiment in a preferred embodiment of the present invention.
[0055] Figure 14 In the simulation experiment in the preferred embodiment of the present invention, Figure 13 APT file data is converted into a schematic diagram of the corresponding NC program.
[0056] Figure 15 This is an operation interface diagram for generating a dispensing program in the software interface setting of the system in a preferred embodiment of the present invention.
[0057] Figure 16 This is a diagram of the operating interface for setting dispensing path generation parameters in the software interface settings of the system in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0058] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention.
[0059] Reference Figure 1 、 Figure 2 As shown, the present invention discloses a method for generating a dispensing path under a spatial contour point, comprising the following steps:
[0060] S1: Acquire the spatial contour point cloud data of the dispensing process, the point cloud data includes the spatial coordinates and normal vectors of the contour points; the contour points are the ordered points of the spatial contour, denoted as a set X = {P n (x n ,y n ,z n,i n ,j n ,k n ),n=1,2,…,N}, where (x n ,y n ,z n ) represents the spatial coordinates of the nth contour point, (i n ,j n ,k n ) represents the normal vector of the nth contour point, and N represents the total number of contour points.
[0061] S2: Determine whether the contour points are smooth according to the spatial coordinates, and obtain smooth points and non-smooth points.
[0062] like Figure 3 As shown, the method used to determine whether the contour point is smooth according to the spatial coordinates is local polynomial fitting and threshold determination, specifically:
[0063] S2-1: The contour points are the ordered points of the spatial contour. Local fitting is performed on the ordered points to obtain the local fitting curves. The ordered points have a one-to-one corresponding fitting point on the fitting curve, which is recorded as P n ′ (x ′ n ,y n ′ ,z ′ n ,i n ,j n ,k n ), (x ′ n ,y n ′ ,z ′ n ) represents the spatial coordinates of the nth fitting point; when performing local fitting, multiple points can be selected for fitting, and the specific number of points is determined according to the actual situation; Figure 3 As shown in the figure, in this embodiment, five contour points are locally selected for fitting, and the resulting fitting curve is the solid line. The choice of fitting order and the setting of the error threshold directly affect the accuracy and efficiency of the smoothness determination. The polynomial fitting order used in the local fitting can be a second-order or third-order polynomial, and can be adjusted according to the actual situation.
[0064] S2-2: Calculate the gap between the ordered points and the fitting points, and take the ordered points whose gap is greater than the preset threshold as non-smooth points, and the ordered points whose gap is less than or equal to the preset threshold as smooth points. In this embodiment, the gap between the ordered points and the fitting points is represented by the Euclidean distance, and the Euclidean distance between the fitting point and the actual point is calculated and recorded as D n , D n for:
[0065]
[0066] When D n When it exceeds the preset threshold ∈, the ordered point is considered as an unsmooth point and marked, such as Figure 3 As shown, P n To make it smoother.
[0067] S3: Smoothing the spatial coordinates of the non-smooth contour points to ensure the smoothness of the point space. In this embodiment, median filtering and SG smoothing methods are used to optimize the spatial coordinates of the non-smooth points.
[0068] S4: Combined with the previous contour point of the current contour point, calculate the direction of the line connecting the current contour point and the previous contour point of the current contour point. Determine whether the normal vector of the current contour point is abnormal based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point, and correct the contour points with abnormal normal vectors. After parameterizing the corrected normal vectors, smooth the normal vectors of all contour points based on the end points of the parameterized contour points to ensure normal consistency and smoothness.
[0069] The normal information of the contour point is as follows Figure 4 As shown, measurement errors lead to a large error between the measured and actual normal directions of each contour point. Furthermore, the cumulative error between adjacent contour points can cause the dispensing equipment to vibrate during actual dispensing. Therefore, the present invention smoothes the normal directions of the contour points to improve dispensing quality.
[0070] S4-1: If Figure 5 As shown, combined with the previous contour point of the current contour point, the direction of the line connecting the current contour point and the previous contour point of the current contour point is calculated, and whether the normal vector of the current contour point is abnormal is judged according to the cosine distance of the line connecting the two points and the normal vector of the current contour point.
[0071] The current contour point is recorded as P n , the previous contour point of the current contour point is recorded as P n-1 , P n is the nth contour point. Since the distance between contour points is small, P n and P n-1 The curve between them is approximately a straight line. n With P n-1 , get P n 、P n-1 The direction of the connection is recorded as (P n-1 -P n ), calculate the direction of the line and the contour point P n If the cosine distance is greater than the preset threshold, it is considered that Pn The normal vector is abnormal, execute S4-2 to P n Otherwise, the normal vector is considered normal and no correction is made at this time, and S4-3 is directly executed to parameterize the contour points.
[0072] S4-2: If Figure 5 As shown, contour points with abnormal normal vectors are corrected.
[0073] P n 、P n-1 The direction of the line is used as the normal to construct the projection plane, and the contour point P n The normal vector of the projection is projected onto the projection plane to obtain the corrected normal vector (i ′ n ,j n ′ ,k ′ n ) to correct the abnormal normal of the contour points. For the contour points with abnormal normal vectors, a vertical plane is constructed to perform normal vector projection to preliminarily correct the normal vector.
[0074] S4-3: If Figure 6 As shown, all contour points after parameterized correction of normal vectors.
[0075] The nth contour point after spatial coordinate smoothing and normal vector anomaly correction is recorded as Indicates the spatial coordinates of the nth contour point at this time, Indicates the normal vector of the nth contour point at this time; arrange the contour points in order, the contour points The corresponding parameterized contour points are where u n is the parameter value of the nth contour point after parameterization.
[0076] In this embodiment, the parameterization method is: set the parameter value of the first contour point to 0, the parameter value of the last contour point to 1, and the parameter values of the remaining contour points are evenly divided according to the order of the contour points. That is, the parameter value of the nth contour point is:
[0077]
[0078] Where N is the total number of contour points.
[0079] S4-4: If Figure 7 As shown, the normal vectors of all contour points are smoothed according to the end points of the parameterized contour points.
[0080] S4-4-1: Calculate the end point coordinates of the normal vector of the parameterized contour point:
[0081] S4-4-2: Fit the end point according to the coordinates of the end point of the normal vector to obtain the fitting curve, recorded as f(u n ). Fitting the end points to obtain a fitting curve, specifically, fitting the end points to obtain an m-order polynomial fitting curve, f(u n )for:
[0082]
[0083] Among them, a t 、b t 、c t are the polynomial parameters after fitting, and m is the order of the polynomial fitting.
[0084] S4-4-3: The normal vector of the nth contour point after smoothing is (f(u n ) T -(u n ,0,0)).
[0085] S5: The dispensing path is generated by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points. The dispensing path is calculated based on the processed data, combined with the process parameters during the dispensing process, such as feed rate, nozzle number, nozzle angle, etc.
[0086] The present invention also discloses a method for generating a dispensing program under a spatial contour point, comprising the following steps:
[0087] S1: Acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes the spatial coordinates and normal vectors of the contour points.
[0088] S2: Determine whether the contour points are smooth according to the spatial coordinates.
[0089] S3: Smooth the spatial coordinates of non-smooth contour points.
[0090] S4: Calculate the direction of the line connecting the current contour point and the previous contour point of the current contour point based on the previous contour point of the current contour point. Determine whether the normal vector of the current contour point is abnormal based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point. Correct the contour point with abnormal normal vector. Parameterize all contour points after the normal vector correction. Smooth the normal vectors of all contour points based on the end points of the parameterized contour points.
[0091] S5: Generate a dispensing path by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points.
[0092] S6: Generate an APT file based on the dispensing path. This file is then converted into a CNC program for the dispensing path that can be executed by the machine tool through post-processing. By using computer language to softwareize the dispensing path generation method based on spatial contour points, the dispensing path program is more compatible with different devices.
[0093] The present invention also discloses a dispensing path generation system under a spatial contour point, comprising:
[0094] A data acquisition module is used to acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes spatial coordinates and normal vectors of contour points;
[0095] A coordinate smoothing module is used to determine whether the contour points are smooth according to the spatial coordinates, and to smooth the spatial coordinates of the contour points that are not smooth;
[0096] The normal smoothing module is used to calculate the direction of the line connecting the current contour point and the previous contour point of the current contour point. Based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point, it determines whether the normal vector of the current contour point is abnormal and corrects the contour points with abnormal normal vectors. After parameterizing the corrected normal vectors, the normal vectors of all contour points are smoothed according to the end points of the parameterized contour points.
[0097] The dispensing path generation module is used to generate the dispensing path by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points.
[0098] The present invention also discloses a dispensing program generation system for spatial contour points. Based on the dispensing path generation system for spatial contour points, a dispensing program generation module is added. The dispensing program generation module is used to generate an APT file corresponding to the dispensing path and convert the APT file into a dispensing path CNC program executable by the machine tool through post-processing.
[0099] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a method for generating a dispensing path under a spatial contour point or a method for generating a dispensing program under a spatial contour point is implemented.
[0100] The present invention also discloses a device for generating a dispensing path under a spatial contour point, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, a method for generating a dispensing path under a spatial contour point is implemented.
[0101] The present invention also discloses a device for generating a dispensing program under spatial contour points, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for generating a dispensing program under spatial contour points is implemented.
[0102] The present invention addresses the problem of uneven normals at contour points, i.e., inaccurate nozzle axial angles. During the generation of the dispensing path, the present invention smoothes the normal vectors of the workpiece's spatial contour points by correcting, parameterizing, and optimizing the normal end point fitting of the abnormal normals. This optimizes the nozzle axial angle and ensures that the nozzle and the workpiece surface always maintain a contact angle, thereby reducing glue leakage or unstable glue flow, improving dispensing accuracy and quality, and being applicable to situations where workpieces are severely deformed. Compared with the prior art, the present invention has the following advantages:
[0103] (1) Solve the problem of dispensing path for severely deformed workpieces:
[0104] Generating a dispensing program based on the actual dispensing path of the product can effectively deal with workpieces with large deformations, avoid the limitations of traditional methods that cannot cope with severe deformations, and ensure the accuracy and reliability of the dispensing path.
[0105] (2) Optimize the nozzle axial angle:
[0106] During the path planning process, in addition to adjusting the point positions, the present invention also specifically optimizes the axial angle of the nozzle to ensure that the nozzle and the workpiece surface always maintain a contact angle, thereby improving the dispensing accuracy and reducing the problems of glue leakage or unstable glue flow.
[0107] (3) Improve dispensing accuracy and quality:
[0108] By optimizing the path and axis, the stability and consistency of the dispensing process are ensured, avoiding uneven glue flow caused by inaccurate path or inappropriate nozzle angle, and significantly improving dispensing accuracy and quality.
[0109] (4) Reduce the coupling between program and device:
[0110] In existing methods, the generated dispensing program is often highly coupled to the dispensing equipment, or requires additional software processing of the planned trajectory to convert it into an executable program for the dispensing equipment. The present invention generates a file in the general Automatically Programmed Tool (APT) language. This allows for post-processing of APT files to generate G-code CNC programs supported by common CNC systems. This addresses the coupling issues between existing methods and dispensing equipment, particularly five-axis dispensing equipment, and improves the compatibility of dispensing path programs across different devices.
[0111] In the simulation experiment, the spatial contour point cloud data of the dispensing process is obtained by inputting a file containing the spatial contour point cloud data.
[0112] In order to further illustrate the beneficial effects of the present invention, a simulation experiment is conducted using the method of the present invention in this embodiment. First, the spatial contour point position and normal vector information of the workpiece surface where glue is to be dispensed are obtained by laser scanning, three-dimensional imaging or other real-time measurement technology. The information obtained is as follows: Figure 8 As shown in the figure. The unsmooth points are as follows: Figure 9 As shown in the figure, the result after smoothing the uneven points is as follows Figure 10 As shown. The state of the normal vector of the contour point before smoothing is as follows Figure 11 As shown, the state after smoothing is as follows Figure 12 It can be seen that the method of the present invention can achieve effective smoothing of spatial contour points, thereby achieving axial optimization of the dispensing path.
[0113] Taking the dispensing process parameters as feed rate 250mm / s, nozzle number 1, and nozzle angle 0 degrees as an example, the corresponding APT file generated based on the dispensing path is as follows Figure 13 As shown, the corresponding NC program is converted into Figure 14 shown.
[0114] This application has been applied in the actual dispensing process. The specific system interface is as follows: Figure 15 、 Figure 16 As shown, Figure 15 To generate the operation interface diagram of the dispensing program, Figure 16 The operation interface diagram for setting dispensing path generation parameters.
[0115] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0116] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0117] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0118] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0119] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A method for generating a dispensing path under a spatial contour point, characterized in that: include: Acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes spatial coordinates and normal vectors of contour points; Determining whether the contour points are smooth according to the spatial coordinates, and smoothing the spatial coordinates of the contour points that are not smooth; Calculate the direction of the line connecting the current contour point and the previous contour point of the current contour point. Determine whether the normal vector of the current contour point is abnormal based on the line direction of the two points and the cosine distance of the normal vector of the current contour point. Correct the contour points with abnormal normal vectors. Parameterize all contour points after the normal vector correction and smooth the normal vectors of all contour points based on the end points of the parameterized contour points. The dispensing path is generated by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points.
2. The method for generating a dispensing path under a spatial contour point according to claim 1, characterized in that: Judging whether the contour point is smooth according to the spatial coordinates is specifically as follows: The contour points are the ordered points of the spatial contour. Local fitting is performed on the ordered points to obtain the local fitting curves. The ordered points have one-to-one corresponding fitting points on the fitting curve. The gap between the ordered points and the fitted points is calculated, and the ordered points whose gap is greater than the preset threshold are regarded as unsmooth points, and the ordered points whose gap is less than or equal to the preset threshold are regarded as smooth points.
3. The method for generating a dispensing path under a spatial contour point according to claim 1, characterized in that: The calculation of the connection direction of the current contour point and the previous contour point of the current contour point is performed, and the determination of whether the normal vector of the current contour point is abnormal is performed according to the connection direction of the two points and the cosine distance of the normal vector of the current contour point. Specifically, The current contour point is recorded as P n , the previous contour point of the current contour point is recorded as P n-1 , P n As the nth contour point, P n and P n-1 The curve between them is approximately a straight line, and P is obtained. n 、P n-1 The direction of the line, calculate the contour point P n The cosine distance between the normal vector and the connecting direction. If the cosine distance is greater than the preset threshold, then P n The normal vector of is corrected, otherwise it is not corrected; The pair P n The normal vector of the contour point P is modified as follows: the direction of the connecting line is used as the normal to construct the projection plane, and the contour point P is used as the normal to construct the projection plane. n The normal vector of is projected onto the projection plane to obtain a corrected normal vector.
4. The method for generating a dispensing path under a spatial contour point according to claim 1, characterized in that: All contour points after the parameterized correction of the normal vector are specifically: The nth contour point after spatial coordinate smoothing and normal vector anomaly correction is recorded as Indicates the spatial coordinates of the nth contour point at this time, Indicates the normal vector of the nth contour point at this time; arrange the contour points in order, the contour points The corresponding parameterized contour points are where u n is the parameter value of the nth contour point after parameterization; The parameter value of the nth contour point after parameterization is specifically: Where N is the total number of contour points.
5. The method for generating a dispensing path under a spatial contour point according to claim 4, characterized in that: The normal vectors of all contour points are smoothed according to the end points of the parameterized contour points, specifically: According to the coordinates of the end point of the normal vector, the end point is fitted to obtain the fitting curve, which is recorded as f(u n ); The normal vector of the nth contour point after smoothing is (f(u n ) T -(u n ,0,0)).
6. A method for generating a dispensing program under a spatial contour point, characterized by: A dispensing path is generated using the dispensing path generation method under the spatial contour point described in any one of claims 1 to 5, a corresponding APT file is generated according to the dispensing path, and the APT file is converted into a dispensing path CNC program executable by the machine tool through post-processing.
7. A dispensing path generation system under spatial contour points, characterized in that: include: A data acquisition module is used to acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes spatial coordinates and normal vectors of contour points; A coordinate smoothing module is used to determine whether the contour points are smooth according to the spatial coordinates, and to smooth the spatial coordinates of the contour points that are not smooth; The normal smoothing module calculates the direction of the line connecting the current contour point and the previous contour point of the current contour point. Based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point, it determines whether the normal vector of the current contour point is abnormal and corrects the contour points with abnormal normal vectors. After parameterizing the corrected normal vectors, the normal vectors of all contour points are smoothed according to the end points of the parameterized contour points. The dispensing path generation module is used to generate the dispensing path by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points.
8. A dispensing program generation system under spatial contour points, characterized in that: include: A data acquisition module is used to acquire spatial contour point cloud data of the dispensing process, wherein the point cloud data includes spatial coordinates and normal vectors of contour points; A coordinate smoothing module is used to determine whether the contour points are smooth according to the spatial coordinates, and to smooth the spatial coordinates of the contour points that are not smooth; The normal smoothing module is used to calculate the direction of the line connecting the current contour point and the previous contour point of the current contour point. Based on the direction of the line connecting the two points and the cosine distance of the normal vector of the current contour point, it determines whether the normal vector of the current contour point is abnormal and corrects the contour points with abnormal normal vectors. After parameterizing the corrected normal vectors, the normal vectors of all contour points are smoothed according to the end points of the parameterized contour points. The dispensing path generation module is used to generate the dispensing path by combining the spatial coordinates of the smoothed contour points and the normal vectors of all the smoothed contour points; The dispensing program generation module is used to generate the corresponding APT file according to the dispensing path, and convert the APT file into a dispensing path NC program executable by the machine tool through post-processing.
9. A device for generating a dispensing path under a spatial contour point, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for generating a dispensing path under a spatial contour point as described in any one of claims 1 to 5 is implemented.
10. A device for generating a dispensing program under a spatial contour point, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for generating a dispensing program under spatial contour points as claimed in claim 8 is implemented.