A point cloud processing and path planning method for automatic marking of workpieces

By generating standardized path posture files through 3D point cloud processing and spatial modeling algorithms, the efficiency and accuracy problems of existing automatic scribing systems on complex workpieces are solved, and efficient and adaptive automatic scribing capabilities are achieved.

CN120782858BActive Publication Date: 2026-06-26CMCU ENG

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CMCU ENG
Filing Date
2025-06-27
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing automatic scribing systems are ill-suited for workpieces with complex curved surfaces and multi-angle contours, resulting in low efficiency and insufficient accuracy, and they also lack the ability to adaptively adjust the path.

Method used

Using 3D point cloud processing and spatial modeling algorithms, a standardized path and posture file is generated through steps such as point cloud preprocessing, main plane extraction, boundary recognition, posture calculation, and trajectory point sampling, which is used for robot terminal parsing.

Benefits of technology

It significantly improves the efficiency and accuracy of trajectory generation, enables adaptive recognition and high-precision scribing of complex workpieces, and is suitable for automated processing of various complex workpieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120782858B_ABST
    Figure CN120782858B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of point cloud processing and path planning method for automatic marking of workpiece, belong to workpiece automation processing technical field, to solve the problem of low efficiency, poor precision and existing system insufficient adaptability of artificial marking.The technical scheme includes: the three-dimensional model of workpiece is converted into point cloud, and the main plane is extracted by random sampling consistency algorithm;Adopt spatial index clustering optimization boundary;Based on principal component analysis, construct local coordinate system;Generate the minimum circumscribed rectangle boundary;Calculate the rotation quaternion posture and sample trajectory point;Define workpiece coordinate system to realize space transformation;Output standardized trajectory file.The method significantly improves the adaptability of complex surface, realizes high-precision trajectory automatic generation, reduces the dependence on artificial experience, and the standardized interface is convenient for integration robot system, promotes the intelligent upgrading of industrial marking process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of workpiece automated processing technology, and relates to a point cloud processing and path planning method for automatic workpiece scribing. Background Technology

[0002] Currently, workpiece scribing in industrial settings is predominantly done manually. Manual methods are ill-suited for marking complex curved surfaces and multi-angle contours. Manual scribing on complex geometric components inherently suffers from low efficiency and high error rates. Furthermore, operators require extensive experience to maintain the repeatability of the marking results. Existing automated scribing systems mostly employ traditional image recognition technology or fixed template trajectory planning. These systems struggle to achieve dynamic recognition capabilities, lack adaptive path adjustment mechanisms, and cannot meet high-precision execution requirements.

[0003] Therefore, the industrial sector urgently needs an automatic trajectory generation method that combines 3D point cloud and spatial modeling algorithms. Such a method should serve as a front-end path provider module for line-marking robot systems to address core issues such as poor adaptability to complex workpieces, low trajectory generation efficiency, and insufficient accuracy. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a point cloud processing and path planning method for automatic workpiece scribing.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] This invention provides a 3D point cloud processing and trajectory planning method for complex curved surface workpieces. The method includes point cloud preprocessing, principal plane extraction, boundary recognition, attitude calculation, trajectory point sampling, and coordinate transformation, ultimately outputting a standardized path and attitude file for robot terminal parsing. Compared to traditional offline path programming methods, this method significantly improves trajectory generation efficiency and accuracy, and possesses good automation and versatility.

[0007] A point cloud processing and path planning method for automatic workpiece scribing includes the following steps:

[0008] S1: Point Cloud Loading and Preprocessing: The 3D model of the workpiece is converted into a dense point cloud. The principal plane is extracted using a combination of Euclidean clustering, voxel downsampling, and random sampling consensus algorithms. The mathematical expression for the principal plane is:

[0009] ax + by + cz + d = 0

[0010] Where vector [a,b,c] represents the plane normal vector, and d is the plane offset;

[0011] S2: Point cloud clustering and boundary optimization: The spatial indexing algorithm is used to retain the largest cluster, and the breadth-first search is used to merge neighboring point clusters to improve boundary continuity;

[0012] S3: Principal Axis Analysis and Local Coordinate System Construction: Perform principal component analysis on the target plane point set to extract the first principal axis direction. Second principal axis direction:

[0013]

[0014] Construct a two-dimensional projection plane;

[0015] S4: Convex Hull Fitting and Rectangular Boundary Generation: Generate the convex hull boundary of the point cloud in the local coordinate system, and optimize the envelope using the minimum bounding rectangle algorithm;

[0016] S5: Trajectory Generation and Attitude Calculation: Calculating the rotation quaternion Q based on the target plane normal vector.

[0017]

[0018] Where (x, y, z) is the unit rotation axis and θ is the rotation angle; trajectory points are generated by sampling at equal intervals on the rectangular boundary;

[0019] S6: Coordinate System Transformation: Construct a transformation matrix by defining points A, B, and C in the workpiece coordinate system, where point A is the origin, point B is the point in the X-axis direction, and point C is the point in the normal direction.

[0020]

[0021] Transform the trajectory points from the scan coordinate system to the workpiece coordinate system:

[0022] P1 = RP0 + T

[0023] Where R is the rotation matrix and T is the translation vector;

[0024] S7: Output normalized path file: containing 3D position [x,y,z] and quaternion [q] x ,q y ,q z ,q w The trajectory point sequence is formatted into a structured data file.

[0025] Furthermore, in S1, the 3D model is an STL format file, which is converted into an open3d.geometry.PointCloud structure using the Open3D library.

[0026] Furthermore, in S2, the spatial indexing algorithm uses cKDTree to implement nearest neighbor search, and the merging condition is that the Euclidean distance is less than 1mm.

[0027] Furthermore, in S4, the convex hull boundary generation is implemented using the Graham scan method or the QuickHull algorithm.

[0028] Furthermore, in S5, the equal-spaced sampling interval is a fixed value of 5mm.

[0029] Furthermore, in S6, the column vectors of matrix R consist of [x, y, z], and the translation vector T represents the coordinates of point A.

[0030] Furthermore, in step S7, the structured data file is in JSON format and contains robot configuration code and execution parameter fields.

[0031] Furthermore, the RANSAC algorithm for extraction from the main plane has more than 1000 iterations, and the distance threshold is less than 3 times the average spacing of the point cloud.

[0032] An automatic workpiece scribing system, used to implement the point cloud processing and path planning method for automatic workpiece scribing, includes:

[0033] The point cloud processing module is used to perform point cloud loading, preprocessing, clustering and boundary optimization operations, and its output is connected to the path planning module.

[0034] The path planning module receives the output data from the point cloud processing module and performs principal axis analysis, convex hull fitting, trajectory generation and coordinate system transformation operations. Its output is connected to the data output module.

[0035] The data output module converts the trajectory data generated by the path planning module into a standardized file format.

[0036] Furthermore, the data output module establishes a communication connection with the robotic arm control system via the industrial Ethernet protocol.

[0037] The beneficial effects of this invention are as follows:

[0038] Supports common STL models and point cloud input formats, with strong compatibility;

[0039] Stable and efficient surface extraction and pose generation based on RANSAC and PCA algorithms;

[0040] The trajectory points are continuous and the posture is stable, making it suitable for high-precision line drawing requirements;

[0041] The output format is standardized, facilitating integration with mainstream industrial robot systems;

[0042] It supports adaptive recognition and automatic trajectory generation for various complex workpieces, and has good prospects for industrial application.

[0043] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0044] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0045] Figure 1 This is a flowchart of the point cloud processing and path planning method in this invention. Detailed Implementation

[0046] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0047] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0048] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0049] Please see Figure 1 This is a point cloud processing and path planning method for automatic workpiece scribing.

[0050] Example 1: Scribing process for planar workpieces

[0051] 1.1 Point Cloud Processing Stage

[0052] Import the STL format 3D model of the milled workpiece and convert it into a 120,000 density point cloud using the Open3D library;

[0053] The RANSAC algorithm was iterated 1500 times with a distance threshold of 0.5 mm to extract the upper surface as the principal plane.

[0054] Outliers are removed using the cKDTree index, while the largest cluster is retained.

[0055] 1.2 Trajectory Generation Stage

[0056] Perform PCA analysis on the principal plane point set to obtain the mutually orthogonal first and second principal axes;

[0057] The convex hull boundary was generated using the Graham scan method and fitted as a 120×80mm rectangle after rotation correction.

[0058] Sampling points are taken along the long side of the rectangle at 5mm intervals to calculate the quaternion attitude of the normal vector direction;

[0059] 1.3 System Execution Phase

[0060] Set the origin A, the X-axis reference point B, and the normal point C on the workpiece surface;

[0061] The trajectory points are transformed to the robot's base coordinate system using coordinate transformation formulas.

[0062] Output a JSON file containing 200 attitude points, and the robotic arm completes the linear marking path.

[0063] Example 2: Boundary Marking of Curved Impeller

[0064] 2.1 Complex Surface Processing

[0065] The turbine blade point cloud is divided into 6 sub-planes, and the normal vector of each plane is extracted.

[0066] The BFS clustering algorithm was used to merge neighboring point cloud clusters with a spacing of 0.8 mm;

[0067] The QuickHull algorithm is used to generate continuous convex hull boundaries for non-planar regions;

[0068] 2.2 Adaptive Trajectory Generation

[0069] Calculate the minimum bounding rectangle in the local coordinate system, allowing for ±15° rotation optimization.

[0070] Variable spacing sampling is performed along the surface boundary: 5mm for straight segments and 3mm for curvature areas;

[0071] The quaternion interpolation algorithm ensures smooth attitude transitions;

[0072] 2.3 Multi-coordinate system collaboration

[0073] Define the hub center as the origin and the radial reference axis as the X direction;

[0074] Transform the 8 sets of sub-plane trajectories to a unified workpiece coordinate system;

[0075] Output a JSON path file containing topological relationships, and the robot completes the marking of multiple consecutive segments.

[0076] Example 3: Multi-plane calibration of automotive sheet metal parts

[0077] 3.1 Multi-plane synchronous processing

[0078] Three principal planes are extracted simultaneously from the point cloud of the car door sheet metal: the outer surface, the window frame surface, and the reinforcing rib surface;

[0079] Euclidean clustering was used to separate different planar point sets, and PCA analysis was performed independently on each planar plane.

[0080] 3.2 Spatial Trajectory Planning

[0081] A rectangular trajectory is generated on the window frame surface, and a wavy boundary line is extracted from the reinforcing rib surface;

[0082] Calculate the interplane transition path using the cross product of normal vectors;

[0083] Increase sampling density by 20% at key inflection points to ensure label clarity;

[0084] 3.2 Industrial System Integration

[0085] Establish a coordinate system reference using the workpiece positioning pin holes;

[0086] The path file is transmitted to the six-axis robot controller via the Industrial Ethernet protocol;

[0087] The system automatically compensates for 2mm sheet metal assembly tolerances, achieving millimeter-level precision marking.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A point cloud processing and path planning method for automatic workpiece scribing, characterized in that: Includes the following steps: S1: Point Cloud Loading and Preprocessing: The 3D model of the workpiece is converted into a dense point cloud. The principal plane is extracted using a combination of Euclidean clustering, voxel downsampling, and random sampling consensus algorithms. The mathematical expression for the principal plane is: Where vector Represents the plane normal vector. d This is the plane offset; S2: Point cloud clustering and boundary optimization: The spatial indexing algorithm is used to retain the largest cluster, and the breadth-first search is used to merge neighboring point clusters to improve boundary continuity; S3: Principal Axis Analysis and Local Coordinate System Construction: Perform principal component analysis on the target plane point set to extract the first principal axis direction. Second principal axis direction: Construct a two-dimensional projection plane; S4: Convex Hull Fitting and Rectangular Boundary Generation: Generate the convex hull boundary of the point cloud in the local coordinate system, and optimize the envelope using the minimum bounding rectangle algorithm; S5: Trajectory Generation and Attitude Calculation: Calculating Rotation Quaternions Based on the Target Plane Normal Vector Q : in For the unit axis of rotation, The rotation angle is used to generate trajectory points by sampling at equal intervals along the rectangular boundary. S6: Coordinate System Transformation: Construct a transformation matrix by defining points A, B, and C in the workpiece coordinate system, where point A is the origin and point B is the coordinate system. X Point C is the point along the axis, and point C is the point along the normal direction. , , Transform the trajectory points from the scan coordinate system to the workpiece coordinate system: in R Let be a rotation matrix. T It is a translation vector; S7: Output standardized path file: will contain 3D location and quaternions The trajectory point sequence is formatted as a structured data file.

2. The point cloud processing and path planning method for automatic workpiece scribing according to claim 1, characterized in that: In S1, the 3D model is an STL format file, which is converted into an open3d.geometry.PointCloud structure using the Open3D library.

3. The point cloud processing and path planning method for automatic workpiece scribing according to claim 1, characterized in that: In S2, the spatial indexing algorithm uses cKDTree to implement nearest neighbor search, and the merging condition is that the Euclidean distance is less than 1 mm.

4. The point cloud processing and path planning method for automatic workpiece scribing according to claim 1, characterized in that: In S4, the convex hull boundary is generated using either the Graham scan method or the QuickHull algorithm.

5. The point cloud processing and path planning method for automatic workpiece scribing according to claim 1, characterized in that: In S5, the equal-spacing sampling interval is a fixed value of 5mm.

6. The point cloud processing and path planning method for automatic workpiece scribing according to claim 1, characterized in that: In S6, the matrix R The column vector is composed of Composition, translation vector T Let A be the coordinates of point A.

7. The point cloud processing and path planning method for automatic workpiece scribing according to claim 1, characterized in that: In S7, the structured data file is in JSON format and contains robot configuration code and execution parameter fields.

8. The point cloud processing and path planning method for automatic workpiece scribing according to claim 1, characterized in that: The RANSAC algorithm for extraction from the main plane has been iterated more than 1000 times, and the distance threshold is less than 3 times the average spacing of the point cloud.

9. An automatic workpiece scribing system, used to implement the point cloud processing and path planning method for automatic workpiece scribing as described in any one of claims 1 to 8, characterized in that: include: The point cloud processing module is used to perform point cloud loading, preprocessing, clustering and boundary optimization operations, and its output is connected to the path planning module. The path planning module receives the output data from the point cloud processing module and performs principal axis analysis, convex hull fitting, trajectory generation and coordinate system transformation operations. Its output is connected to the data output module. The data output module converts the trajectory data generated by the path planning module into a standardized file format.

10. The automatic workpiece scribing system according to claim 9, characterized in that: The data output module establishes a communication connection with the robotic arm control system via the industrial Ethernet protocol.