Path texture driven 3D surface processing track generation method and device

By harmonizing potential field parameterization and image path fusion, the problems of continuity and attitude determinism in path planning of STL models are solved, realizing high degree of freedom and high precision 3D trajectory generation, which is suitable for robot grinding and carving scenarios.

CN120953481AActive Publication Date: 2025-11-14上海仰羿自动化工程有限公司 +1

Patent Information

Application Number
CN202510920994.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-11-14
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

Existing technologies make it difficult to directly map image paths onto STL models, resulting in path planning failing to achieve continuous and well-defined processing trajectories in unstructured or freeform surface models, especially lacking personalization and freedom in industrial 3D polishing and carving.

Method used

A multi-module approach is adopted, which includes harmonic potential field parameterization, image path mapping, trajectory smoothing optimization, and attitude solving. By fusing geometric parameterization and image path, a continuous and distortion-free 3D trajectory is generated, which is suitable for industrial grinding systems.

Benefits of technology

It achieves high degree of freedom and high precision mapping from image paths to 3D curved surfaces. The generated trajectories are suitable for robot grinding and engraving, ensuring processing stability and surface quality. It supports multiple industrial control formats and is adaptable to various complex surface processing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953481A_ABST
    Figure CN120953481A_ABST
Patent Text Reader

Abstract

The invention provides a path texture driven 3D surface processing track generation method and device, and the method comprises the steps: 1, obtaining the coordinates of three vertexes of a triangular patch and a first-order adjacency list of each vertex based on an STL model; step 2, constructing mapping from a curved surface path to a two-dimensional image path based on the vertex coordinates and the first-order adjacency list obtained in the step 1; 3, processing the path texture image to obtain a point sequence, and then reversely mapping the point sequence to the STL model based on mapping to obtain an initial track point set; and step 4, performing optimization processing on the initial track point set to generate a path point set. According to the method, the path texture image and the STL model serve as input, and the continuous track capable of being used for precision machining tasks such as industrial grinding is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machining trajectory generation technology, and particularly relates to a method and apparatus for generating 3D surface machining trajectories driven by path texture. Background Technology

[0002] As industrial manufacturing continues to evolve towards higher precision, flexibility, and intelligence, robots are increasingly being used in surface treatment, especially in processes such as grinding, deburring, precision engraving, and custom texturing of metal, composite materials, and 3D printed parts. This places ever-increasing demands on path planning. Traditional path planning methods primarily rely on solid CAD models, regular feature extraction, manual teaching, or regular mesh parameterization. These methods are highly dependent on the geometric topology of the input model and struggle to adapt to unstructured or free-form surface models, particularly scanned parts in STL format or reverse-engineered modeling data.

[0003] STL models express three-dimensional shapes in the form of a set of triangular facets, without explicit parameterization information. This data format is widely used in industrial 3D scanning, simulation, printing, rapid reverse engineering and other scenarios. However, when planning paths based on STL meshes, the following technical obstacles are often encountered: a. lack of surface parameter domain, traditional UV mapping is difficult to use directly; b. discontinuity between facets leads to path jumps, affecting trajectory continuity and processing stability; c. cannot directly express patterns, textures or path lines [1]. Existing technologies mostly use geodesic paths, shortest distance lines, principal curvature directions and other methods to generate paths. For example, some literature extracts toolpaths based on equidistant geodesic paths; some schemes use vector fields or anisotropic tensor fields to control trajectory directions. However, these methods usually cannot handle user-defined pattern paths, nor are they suitable for path input from two-dimensional texture maps or sketch designs, which limits the personalization and freedom of design.

[0004] In recent years, computer graphics has developed various methods for mapping image textures to surfaces, but most of these methods serve visual fields such as texture rendering and UV mapping, rather than industrial trajectory generation. Furthermore, challenges exist between image path extraction and 3D surface mapping, including dimensional inconsistencies, inaccurate centroid interpolation, and poor smoothness. There is also a lack of engineering systems that can accurately convert image lines into machining trajectories. Therefore, there is an urgent need for a method that automatically generates continuous, distortion-free, well-defined, and robot-executable 3D trajectories based on "path texture images + STL models," leveraging the design flexibility of image representation while overcoming the challenges of irregular STL surface modeling. Summary of the Invention

[0005] The purpose of this invention is to provide a method and apparatus for generating 3D surface machining trajectories driven by path texture. This method uses path texture images and STL models as input to generate continuous trajectories suitable for precision machining tasks such as industrial grinding. The technical solution adopted is as follows:

[0006] This invention was proposed to address this technical need. Its innovation lies in the integration of multiple modules, such as harmonic potential field parameterization, image path mapping, trajectory smoothing optimization, and attitude solving, to form a complete, universal, and applicable trajectory generation method for industrial grinding systems.

[0007] A path texture-driven 3D surface machining trajectory generation method is presented, which is based on geometric parameterization and image path fusion, and possesses high versatility and engineering applicability. For example... Figure 1 As shown, the method includes the following steps:

[0008] Step 1: STL model parsing and geometric preprocessing to obtain the coordinates of the three vertices of each triangle facet and the first-order adjacency list of each vertex i.

[0009] The input 3D model is in STL format and is denoted as a triangular mesh surface.

[0010] Each triangular facet T I = (v1, v2, v3), vertex i is the vertex number. I is the triangular facet number.

[0011] like Figure 2 The image shows a meshed surface model, specifically a triangular mesh surface.

[0012] The system performs the following preprocessing steps:

[0013] Step 1A: Normal correction to ensure that the normal vectors of all facets point outwards.

[0014] Calculate the normal vector n of the triangle facet by traversing the triangle facets. I = (v2-v1)×(v3-v1), and adjust the reverse face using topology checks.

[0015] Step 1B: Mesh smoothing.

[0016] The Taubin Smoothing or Laplacian Smoothing algorithms are used to reduce high-frequency noise and enhance the surface parameterization stability.

[0017] Step 1C: Adjacency construction.

[0018] Construct a first-order adjacency list of vertices for subsequent propagation fields. This forms a sparse adjacency graph structure.

[0019] Step 2: Based on the vertex coordinates obtained in Step 1, construct the mapping φ(p) from the surface path to the two-dimensional image path.

[0020] Where p is any point on the STL model.

[0021] To map 2D path texture maps to 3D surfaces To achieve this, a two-dimensional parametric coordinate system needs to be established on the curved surface, namely, the mapping φ(p).

[0022] To address this, two mutually orthogonal smooth potential fields are introduced. Essentially, assigning parametric coordinates (u,v) to any point p on the STL model maps the surface to the parametric domain [0,1]. 2 ,like Figure 3 As shown.

[0023] Among them, [0,1] 2 The number 2 in the image represents two-dimensional space. [0,1] represents the image domain for u-coordinates and the image domain for v-coordinates.

[0024] Any point p in the STL model refers to any point within the three-dimensional mesh enclosed by the triangular facets, on the boundary of the triangular facets.

[0025] The process of solving for the mapping φ is as follows:

[0026] Potential field construction → Solving linear equations → Gradient orthogonality → Parameter mapping

[0027] The specific steps include:

[0028] Step 2A: Construct the harmonic potential fields u(p) and v(p).

[0029] Step 2A0: Construct a sparse linear system as follows:

[0030] L·u=b

[0031] in:

[0032] u=(u1,u2,…,u n ) T The set of unknown scalar values ​​(harmonic potential values) for each vertex;

[0033] n is the number of vertices in the STL model; u i For elements in u;

[0034] Vertices in the STL model include two categories: internal vertices and boundary vertices.

[0035] When the surface is a closed surface, boundary points do not exist, such as Figure 2 As shown.

[0036] Otherwise, the boundary points are vertices on the outer edge of the surface, such as... Figure 3 As shown.

[0037] For the discrete Laplace–Beltrami operator, it is a symmetric positive definite sparse matrix;

[0038] This is the right-hand term, determined by the boundary conditions.

[0039] The process of solving u(p) is as follows:

[0040] Step 2A1: Laplace–Beltrami discretization of internal vertices.

[0041] For each internal vertex i, the following definition applies:

[0042]

[0043] in:

[0044] α ij ,β ij : represents the two opposite angles of the triangles corresponding to side (i,j), such as Figure 11 As shown;

[0045] L ii The sum of cotangent weights is used to measure the coupling strength between internal vertices i in the mesh.

[0046] L ij The negative of the cotangent weight;

[0047] The set of first-order adjacent vertices of internal vertex i;

[0048] w ij : cotangent weight, used to measure the coupling strength between internal vertex i and internal vertex j in the mesh.

[0049] Step 2A2: Introduce boundary conditions.

[0050] Define the boundary point set Γ0,Γ1, corresponding to the Dirichlet condition:

[0051]

[0052] So:

[0053] For boundary point i, set it directly:

[0054]

[0055] For an internal vertex i, then:

[0056] b i =0

[0057] Step 2A3: Complete expression of the matrix system.

[0058] Combining all vertices (internal and boundary points) yields the complete system:

[0059]

[0060] This system can efficiently solve for u using methods such as conjugate gradient (CG) and preconditioned conjugate gradient (PCG).

[0061] Where L is a symmetric positive definite sparse matrix, obtained from steps 2A1 to 2A2.

[0062] Step 2A4, Post-solution processing

[0063] Solve for all u i Then, the combination yields a scalar field:

[0064]

[0065] Similarly, the above method can be used to solve for all v(p). i Then, the combination yields a scalar field:

[0066]

[0067] This is used to construct a two-dimensional parameter mapping φ(p)=(u(p),v(p)).

[0068] Step 2B: Orthogonalization process to construct a two-dimensional parameter field.

[0069] Step 2B1: Gradient orthogonalization (making u(p) and v(p) orthogonal coordinates).

[0070] The gradient field obtained from the preliminary calculation Perform orthographic projection correction:

[0071]

[0072] This step corrects the gradient on a patch-by-patch basis at the patch level and reconstructs the updated v(p) through gradient reintegration.

[0073] Step 2B2: Normalize the mapping domain.

[0074] To ultimately map to the image domain [0,1] 2u(p) and v(p) need to be normalized:

[0075]

[0076] The final output yields a continuous mapping function:

[0077] φ(p)=(u(p),v(p))∈[0,1] 2

[0078] Points on each triangular facet The corresponding image domain coordinates (u,v) are used for subsequent path texture map inverse mapping and trajectory generation.

[0079] Step 3: Process the path texture image to obtain a point sequence, then reverse-map the point sequence onto the STL model based on the mapping. The set of points on the STL model that are reverse-mapped from the point sequence is the initial trajectory point set.

[0080] Step 3A: Process the path texture image to obtain a sequence of several equally spaced points in the path texture image.

[0081] The second input of this invention is a path texture image. Defined in [0,1] 2 A two-dimensional image of the region. The black lines in the image represent predefined "processing path regions," such as... Figure 4 As shown.

[0082] The system first extracts the path boundary and centerline within the image domain, using the following image processing workflow:

[0083] Step 3A1: Grayscale conversion and binarization;

[0084] Step 3A2: Canny edge detection extracts the main contour, i.e., extracts the path boundary;

[0085] Step 3A3: Use the findContours or skeletonize algorithm in OpenCV to extract the centerline.

[0086] Note that this invention is not limited to the contour extraction method used in this invention.

[0087] Step 3A4: Resample the center line into a sequence of equally spaced points. N is the number of sampling points.

[0088] Step 3B: Reverse map the points in the equally spaced point sequence onto the curved surface to obtain the initial trajectory point set.

[0089] The system uses reverse mapping Map these points back onto the surface.

[0090] For each (u k ,v k Traverse the triangular faces, find the mesh that makes them fall into the parametric triangle, and calculate the corresponding centroid coefficient:

[0091] p k =λ1v1+λ2v2+λ3v3,

[0092] where(λ1,λ2,λ3)from barycentricinterpolation

[0093] This allows us to obtain the initial set of trajectory points on the curved surface.

[0094] In summary, step 3B specifically includes the following steps:

[0095] Step 3B1: Reverse map the points in the equally spaced point sequence into a three-dimensional point p. k0 .

[0096] At this time, the three-dimensional point p k0 It may exist outside the surface of the STL model or on the surface of the STL model.

[0097] In an STL model, the outer surface refers to the left or right side of the triangular patch, i.e., the positive or negative direction of the patch's normal.

[0098] Step 3B2, based on 3D point p k0 Traverse the triangular facets to find the 3D point p. k0 The triangular facet that falls in.

[0099] If the three-dimensional point p k0 If it exists on the surface of the STL model, its triangular facet can be identified by the software.

[0100] For example, a three-dimensional point p k0 If a point p exists outside the surface of the STL model, the software will identify it. k0 The triangular facet that falls in.

[0101] 3D point p k0 The falling triangular face has vertex coordinates v. i .

[0102] 3D point p k0 The falling triangular facet, 3D point p k0 The projection distance along the normal direction of the surface is the smallest.

[0103] The method for obtaining the projection distance is a current technology.

[0104] Step 3B3: For the triangular facet obtained in step 3B2, apply existing technology (such as facet normal projection method) to obtain the weights (λ1, λ2, λ3) corresponding to the vertices of the triangular facet.

[0105] Step 3B4: Apply interpolation to the triangular patch obtained in step 3B2 to calculate the 3D point p. k0 The corresponding p k .

[0106] p k =λ1v1+λ2v2+λ3v3,

[0107] Input λ1,λ2,λ3, v1, v2, v3, output p k .

[0108] In summary, regarding the mapping φ(p):

[0109]

[0110] Step 4: 3D path smoothing and continuous curve generation.

[0111] To generate an executable trajectory, path points (trajectory points) p must be specified. k Smoothing and curve reconstruction are performed. The system employs a two-stage optimization process, with the following steps:

[0112] Step 4A: Smooth the three-point parabola (noise reduction).

[0113]

[0114] It can effectively eliminate high-frequency noise while preserving key geometric features.

[0115] Step 4B: Curvature minimization optimization.

[0116] Using the second-order difference of the path points as an approximate curvature term, construct the energy function:

[0117]

[0118] By minimizing this energy, the path can be made as smooth as possible while preserving its original shape, avoiding abrupt changes in the robot's trajectory. This allows for the acquisition of a smooth set of trajectory points on the curved surface. That is, the set of path points

[0119] Step 5: Calculate the trajectory attitude and output it.

[0120] For each path point q k The system calculates the tangent vector t. k With normal vector n k ,like Figure 5 As shown:

[0121] Tangential vector (machining direction):

[0122]

[0123] Normal vector (contact direction): The normal vector of the triangular facet containing the point.

[0124] The final trajectory is recorded as follows:

[0125]

[0126] Step 6: Output in the specified format.

[0127] This invention can derive various data formats from the final trajectory record and STL, including the following formats:

[0128] CSV / TXT: This is a universal path point file format that can be widely used in various systems and devices to enable the sharing and exchange of path data.

[0129] KRL / RAPID: These two formats are standard formats for executable code in industrial robots. They can be directly read and executed by industrial robots to achieve automated control.

[0130] G-code: This is a code format adapted for CNC path control. It can be directly read and executed by CNC machine tools, thereby achieving precise path control.

[0131] Geometric STL: This is a format that embeds path regions as striped grooves, which can be read and executed by simulation software to achieve path simulation and verification. For example... Figure 6 As shown. The triangular facet is in Figure 6 The triangle facets are not shown in the image, but can be displayed by zooming in on the STL model in the software.

[0132] This invention provides a path texture-driven 3D surface processing trajectory generation device. The device adopts a modular design and consists of six main functional modules, which respectively perform functions such as STL mesh processing, parameter field construction, image path analysis, image-to-surface mapping, path curve reconstruction, and attitude trajectory output. Figure 7 As shown, the functions and implementation methods of each module are as follows:

[0133] 1. Preprocessing module.

[0134] The main function of this module is to standardize the geometry of the input STL format model to adapt it to subsequent parameter field calculation and trajectory mapping tasks.

[0135] The module first reads the STL file and extracts the set of triangle faces.

[0136] Subsequently, the system automatically detects whether the normals of the facets are consistent, and completes the unification by reversing the normals or rearranging the vertex order.

[0137] To improve mesh quality and computational stability, this module performs geometric smoothing on the model, commonly using methods such as Taubin Smoothing or Laplacian smoothing algorithms. Simultaneously, the system constructs the adjacency structure and topological information for each vertex, which is used for subsequent potential field construction and interpolation operations.

[0138] 2. Parameter field calculation module.

[0139] This module constructs two continuous scalar functions u(p) and v(p) on the STL mesh surface, forming a two-dimensional parametric coordinate system for subsequent mapping from image paths to surface paths. The module solves the following harmonic potential equation by discretizing the Laplace–Beltrami operator and applies Dirichlet boundary conditions at the boundaries or seed points. After obtaining the preliminary solution, gradient orthogonalization is performed on the v field to satisfy local... Constraints. Ultimately, the module outputs a continuous curve from the surface. To the unit square region [0,1] 2 The bidirectional mapping function φ(p) = (u(p), v(p)) is used for subsequent image path back projection.

[0140] 3. Path texture map processing module.

[0141] The path texture map processing module is responsible for analyzing and extracting path information from two-dimensional images.

[0142] This module supports input grayscale images, black-and-white binary images, or color images containing path encoding, with dimensions normalized to [0,1]. 2 within the area.

[0143] The system first performs edge detection (such as Sobel or Canny), contour extraction, and centerline extraction on the image to obtain the main path line (centerline) in the path image.

[0144] Then, a curve resampling algorithm (such as uniform spacing sampling or curvature-weighted sampling) is used to discretize the extracted path curve (centerline) into a series of image path points.

[0145] These points are defined in the image parameter domain and provide coordinate input for subsequent positioning on the surface.

[0146] 4. Image-Surface Mapping Module.

[0147] The function of this module is to extract the path points (u) from the two-dimensional image. k ,v k Accurately map the path points onto the STL mesh surface to construct a three-dimensional path point sequence.

[0148] First, the system constructs a mapping φ based on the parameter field. -1 (u,v) reverses the mapping of image path points back onto the surface.

[0149] For precise positioning, the module searches for the triangular facet containing the point in the parameter domain, and then uses the centroid interpolation formula:

[0150] p k =λ1v i +λ2v j +λ3v k

[0151] Obtain the three-dimensional point p k0 The three-dimensional spatial position p on the STL model k .

[0152] The final output is a set of surface path points that maintains the same topology as the image path. This serves as the basis for subsequent trajectory reconstruction.

[0153] 5. Curve Reconstruction and Optimization Module

[0154] This module is responsible for reconstructing discrete 3D path points into continuous, smooth machining trajectory curves.

[0155] To eliminate jagged edges and oscillations caused by image noise and interpolation errors, the module first performs multiple three-point parabolic smoothing operations on the point sequence:

[0156]

[0157] While ensuring path geometric consistency, improve the C-axis of the curve. 1 Continuity. Subsequently, the module introduces an optimization model based on curvature energy, defining the following objective function:

[0158]

[0159] By using numerical optimization techniques to make subtle adjustments to the path point positions, the overall curvature is minimized, thereby improving the processability and stability of the trajectory in high curvature regions.

[0160] Trajectory and attitude output module

[0161] This module converts the smoothed path curve into trajectory data that can be executed by a robot or CNC machine. The module processes each path point p... k Calculate its tangent vector:

[0162]

[0163] And combine it with the normal vector of the triangular face it is located in, or use a weighted average of adjacent faces to obtain the smoothed normal vector n. k .

[0164] The tangential and normal directions together determine the direction and orientation of the robot tool's center point.

[0165] Finally, the module outputs the trajectory data in various industrial control formats, such as:

[0166] • KRL program segments for KUKA robots, in formats including PTP / LINEAR point sequences;

[0167] • RAPID format for ABB robots;

[0168] • G-code trajectory files, used for CNC equipment;

[0169] • General CSV point cloud format, used for simulation or secondary processing.

[0170] The module also supports generating textured STL files with geometric shapes, embedding paths as surface grooves or ridges into the model for visualization or print verification.

[0171] The six modules mentioned above together constitute a complete "path texture-driven 3D surface trajectory generation device," which is highly modular, scalable, and adaptable to multiple input formats and multiple output control platforms. The entire device supports an integrated workflow from image-based path design to robot trajectory execution, and is suitable for various intelligent manufacturing scenarios such as industrial grinding, engraving, and patterning.

[0172] Compared with the prior art, the advantages of the present invention are:

[0173] This invention combines image path representation capabilities with 3D STL model processing capabilities to construct a trajectory generation scheme with high degrees of freedom, high precision, and strong versatility, exhibiting significant technical advantages in scenarios such as flexible manufacturing, robotic polishing, and customized engraving. Specifically, this is reflected in the following aspects:

[0174] 1. This invention solves the core problem that STL models cannot directly support path definition and mapping. It eliminates the need for CAD parametric models and traditional UV unwrapping. Instead, it constructs a harmonic potential field coordinate system to directly establish a controllable two-dimensional parameter domain on the triangular mesh surface, thereby achieving mapping between texture maps and three-dimensional surfaces. This method overcomes the dependence of existing path generation algorithms on surface parameterization, significantly expanding the application scope of STL models in path planning.

[0175] 2. Supports users to freely define processing trajectories using image paths, enhancing interaction and customization capabilities. This invention uses image paths as the input interface, allowing users to directly define processing path patterns through drawing software, AI-assisted generation, or external design drafts. It boasts advantages such as high design freedom, intuitive expression, and convenient operation, making it particularly suitable for flexible manufacturing scenarios such as customized pattern processing and personalized decorative pattern polishing.

[0176] 3. Minimal trajectory distortion and high curvature continuity ensure processing stability and surface quality. Through harmonic potential field construction, orthogonal parameterization, path contour extraction, and subsequent curvature optimization, the trajectory generated by this invention exhibits excellent geometric smoothness and local consistency, avoiding issues such as path bends and abrupt changes. This ensures the robot maintains stable posture during high-speed or constant-force grinding modes, significantly improving processing accuracy and surface quality.

[0177] 4. Clear attitude output, compatible with industrial robots and CNC equipment. During trajectory generation, the tangent and normal vectors of each path point are calculated simultaneously to form spatial attitude data, meeting the attitude control requirements of six-axis robot grinding heads or multi-degree-of-freedom CNC tools. It supports outputting multiple industrial control command formats such as KRL, RAPID, and G-code, and has excellent platform compatibility.

[0178] 5. The processing workflow is automated and computationally efficient, making it suitable for batch deployment. This invention employs sparse linear system solving and local interpolation techniques, resulting in fast trajectory generation. The processing time for a typical model (millions of faces) is no more than 10 seconds. The entire process requires no manual teaching, manual splicing, or trajectory reconstruction, providing real-time performance and high efficiency for engineering applications.

[0179] 6. The technical architecture is universal and can be extended to various complex surface processing scenarios. This method is applicable to multiple process types such as grinding, engraving, laser ablation, spraying, and sandblasting, and is widely used in complex surface processing tasks such as automotive parts, customized ornaments, cultural and creative carvings, aerospace composites, and orthopedic implants. The technical architecture is open, and the algorithm can be embedded in various CAM / offline programming systems, providing a universal solution for free-form surface trajectory generation in intelligent manufacturing. Attached Figure Description

[0180] Figure 1 Flowchart of a method for generating 3D surface machining trajectories driven by path texture;

[0181] Figure 2 This is a schematic diagram of a triangular facet in an STL model.

[0182] Figure 3 This is a schematic diagram of the projection of two mutually orthogonal smooth potential fields;

[0183] Figure 4A schematic diagram of the centerline extracted from a path texture image;

[0184] Figure 5 This is a schematic diagram of the machining trajectory;

[0185] Figure 6 This is a schematic diagram of surface processing after applying path textures.

[0186] Figure 7 Architecture diagram of a 3D surface processing trajectory generation device driven by path texture;

[0187] Figure 8 This refers to the path texture image in this embodiment;

[0188] Figure 9 This is a 3D digital model of a car engine hood, specifically an STL model of the car engine hood.

[0189] Figure 10 This is the visualization effect of the path texture in the digital model in this embodiment;

[0190] Figure 11 A schematic diagram for constructing cotangent weights;

[0191] Figure 12 This refers to the code corresponding to step 2A;

[0192] Figure 13 This is the normalized u from step 2A. Detailed Implementation

[0193] The path texture-driven 3D surface processing trajectory generation method and apparatus of the present invention will be described in more detail below with reference to the schematic diagrams, which illustrate preferred embodiments of the invention. It should be understood that those skilled in the art can modify the invention described herein while still achieving the advantageous effects of the invention. Therefore, the following description should be understood as being of general knowledge to those skilled in the art and is not intended to limit the invention.

[0194] This embodiment is designed for practical industrial scenarios. It uses user-defined pattern path texture images and the STL 3D model to be processed as input to generate continuous trajectory data that can be directly used in a six-axis industrial robot force-controlled grinding system. The entire process requires no CAD modeling and is suitable for complex workpieces such as irregular surfaces, reverse-modeled parts, and freeform surfaces.

[0195] I. Input Preparation.

[0196] a) Path texture image

[0197] Users design and refine path patterns using hand-drawing, Photoshop, or SVG vector software, generating a grayscale image with dimensions W×H. The domain is a unit square [0,1]. 2 .

[0198] like Figure 8 An image with a grayscale value of 0 (black) indicates the path that needs to be polished, and a grayscale value of 255 (white) indicates the background.

[0199] b. Three-dimensional STL model.

[0200] The surface shape of the workpiece is provided using an STL triangular mesh model, denoted as . Each triangle T i = (v1, v2, v3), like Figure 9 As shown, the STL model of the car engine hood is generated based on the car engine hood workpiece.

[0201] Triangular facets in Figure 9 The triangle facets are not shown in the image, but can be displayed by zooming in on the STL model in the software.

[0202] II. Construction of the parametric coordinate field.

[0203] To map image paths from (u,v) space to a 3D surface A pair of continuous, smooth, orthogonal parameter fields u(p) and v(p) need to be constructed on the surface of the STL model. The specific steps are as follows:

[0204] a. Construct the discrete Laplace-Beltrami equation:

[0205] A sparse matrix system is constructed using the discrete Laplace formula with weights of cotα+cotβ, i.e., the discrete Laplace-Beltrami equation is constructed.

[0206] b. Set boundary conditions:

[0207] Select a set of seed points Γ at the edge of the model or in the start and end areas of the grinding process. u ,make Another group Γ' u ,make

[0208] Finally, the discrete Laplace-Beltrami equations are solved.

[0209] Similarly, set the set of boundary points for the v field.

[0210] c. Perform gradient projection orthogonalization on the initial solution of the v field:

[0211]

[0212] d. Obtain the parametric mapping function from the three-dimensional surface to the two-dimensional image domain:

[0213] φ(p)=(u(p),v(p))∈[0,1] 2

[0214] like Figure 12 The image shows the code corresponding to steps a through c;

[0215] like Figure 13 As shown, the normalized output u = (u1, u2, ..., u...) n ) T .

[0216] III. Image path extraction and mapping to 3D surface.

[0217] In the image domain [0,1] 2 The image processing flow is executed above:

[0218] Image binarization (threshold <128 is identified as a path);

[0219] The centerline is obtained using contour tracking or skeleton extraction methods (such as the Zhang-Suen algorithm);

[0220] Resample the centerline into a sequence of equally spaced points.

[0221] For each two-dimensional path point (u k ,v k Find the facet containing the point in the triangular mesh parameter domain, and perform barycentric interpolation to calculate the corresponding 3D coordinates.

[0222] p k =λ1v1+λ2v2+λ3v3

[0223] Where λ is the centroid coefficient of the point in the parametric triangle.

[0224] IV. Path point smoothing and trajectory curve construction.

[0225] To ensure a smooth and continuous grinding path and natural posture transitions for the robot, the initial point sequence obtained in step three is processed as follows:

[0226] Three-point smoothing (repeat 2-3 times):

[0227]

[0228] Curvature optimization:

[0229] Minimize the curvature energy function:

[0230]

[0231] Fine-tune the path point positions to make the trajectory more suitable for the speed and force feedback control of force-controlled grinding.

[0232] V. Attitude Calculation and Trajectory Output.

[0233] For each path point p k Calculate the following two attitude vectors:

[0234] Tangent vector (robot motion direction)

[0235]

[0236] Normal vector (robot grinding direction)

[0237] If p k Falling on the triangular face T i Take the normal direction of that face;

[0238] Alternatively, a weighted average of the normal values ​​at the surrounding vertices can be used to enhance continuity.

[0239] After combination, the complete trajectory point attitude triplet is obtained:

[0240] (p k ,t k ,n k )

[0241] The final output trajectory data is in a format supported by industrial robots, such as a KUKA KRL script file or a CSV file, in the format: [X,Y,Z,TX,TY,TZ,NX,NY,NZ]. Figure 10 As shown, this is a visualization of the 3D texture effect of the trajectory.

[0242] VI. Example of robot execution.

[0243] On the KUKAKR6 R900 robot platform, the above trajectory was loaded and a constant normal grinding force (25N) was configured, with speed control in linear mode (40mm / s). The robot executed the path according to the sequence of trajectory points and postures, completing the grinding task of the required pattern on the target STL surface (workpiece, i.e., car engine hood).

[0244] The robot executes a path based on the sequence of trajectory points and poses. The construction steps are as follows:

[0245] 1. Construct a graph for all trajectory points;

[0246] 2. Then search for the start and end points of the line segment (degree 1).

[0247] 3. Sort all pixels using the shortest path (from start to finish).

[0248] 4. Mapping the pixel sequence to the corresponding 3D sequence yields the trajectory points and posture sequence executed by the robot.

[0249] Actual results show that the path is continuous, without jump points, and the posture is smooth. The polishing pattern accurately reproduces the original texture map path, with clear edges, natural corner transitions, and the surface roughness is reduced from 1.6μm to 0.6μm.

[0250] This invention uses path texture images and STL models as input, and through a series of mathematical mappings, image processing, geometric analysis, and optimization algorithms, generates continuous trajectories that can be used for precision machining tasks such as industrial grinding. Figure 1 As shown, the overall process is based on a method of geometric parameterization and image path fusion, which has high versatility and engineering applicability.

[0251] This implementation method, based on the concept of image path design and 3D surface fusion, achieves automatic generation of robot execution trajectories from 2D images. The system is simple to implement, highly versatile, and suitable for typical application scenarios such as customized pattern processing, reverse model polishing, and complex surface art carving. This method simultaneously supports image control, STL input, and robot output, making it an important technical solution for achieving flexibility and high precision in industrial intelligent polishing.

[0252] The application areas of this invention are as follows:

[0253] 1. Personalized polishing and decorative texture processing of automotive parts.

[0254] Scenario description: Apply brushed, frosted, or decorative patterns to parts such as car engine hoods, door shells, and B-pillar trim panels according to customer designs.

[0255] Advantages of this invention: Patterns (such as parallel lines, ripples, and totem symbols) can be directly defined from images without CAD modeling and can be fitted onto freeform surfaces to output continuous trajectories;

[0256] Typical process: Robot force-controlled grinding + wire drawing trajectory + surface Ra value control.

[0257] 2. Post-processing of 3D printed parts: delamination and functional texture polishing.

[0258] Scenario Description: Perform surface treatment on plastic or metal parts formed by 3D printing such as FDM / SLA to eliminate delamination lines and apply guiding textures (such as fluid channels and heat dissipation structures);

[0259] Advantages of this invention: It can directly process unmodeled STL printed parts, and customize the direction of functional textures through image textures, improving processing efficiency and surface quality; "unmodeled" refers to scenarios without a digital model, where laser or blue light reverse engineering is not available. This may be because the customer has not provided a digital model, or the cost of reverse engineering is high.

[0260] Typical process: Image texture control path + robotic flexible force control grinding head.

[0261] 3. Polishing of the surface microstructure of medical implants and biological devices.

[0262] Scenario description: Engraving surface microgrooves and patterns on orthopedic implants (such as acetabular cups and spinal plates) or dental devices to induce osseointegration or prevent slippage;

[0263] Advantages of this invention: It supports attaching medical images and surface micro-texture patterns to STL models (derived from CT reconstruction) to generate complex but highly consistent trajectories;

[0264] Typical process: Robot micro-track engraving + high-precision attitude control + biomedical polishing.

[0265] 4. Cultural and creative art carving and digital handcraft reconstruction.

[0266] Scene description: After digitizing artworks such as sculptures, ceramics, and jade, hand-painted strokes, totem patterns, and personalized signatures are reproduced on their surfaces.

[0267] Advantages of this invention: It supports image input paths, fits complex free-form surfaces, automatically generates artistic trajectories, and can replace traditional hand carving.

[0268] Typical process: CNC micro-carving + engraving texture path mapping + ST surface compatibility.

[0269] 5. Polishing the surface texture of consumer electronics casings.

[0270] Scenario description: Applying conductive mesh patterns, grip-resistant textures, or visual decorative patterns to the plastic or metal casings of laptops, mobile phones, wearable devices, etc.

[0271] Advantages of this invention: By controlling the path distribution through pattern texture maps, visually consistent and periodically accurate high-repeatability trajectory processing can be achieved.

[0272] Typical process: multi-degree-of-freedom grinding / etching + image-controlled trajectory generation + surface functionality enhancement.

[0273] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the scope of protection of the present invention.

Claims

1. A method for generating 3D surface processing trajectories driven by path texture, characterized in that, Includes the following steps: Step 1: Based on the STL model, obtain the coordinates of the three vertices of the triangle facet, and the coordinates of each vertex. First-order adjacency list ; Step 2: Based on the vertex coordinates and first-order adjacency list obtained in Step 1 Construct a mapping from surface path to 2D image path. ; Step 3: Process the path texture image to obtain the point sequence, and then based on the mapping... The point sequence is reverse-mapped to the STL model to obtain the initial trajectory point set; Step 4: Optimize the initial trajectory point set to generate the path point set.

2. The path texture-driven 3D surface processing trajectory generation method according to claim 1, characterized in that, Step 2 specifically includes the following steps: Step 2A: Constructing the harmonic potential field The construction of a harmonic potential field Harmony and coordination of the situation The method is the same, constructing a harmonic potential field. The steps include: Step 2A0: Construct a structure containing vertices unknown scalar value sparse linear systems; Step 2A1: Laplace–Beltrami discretization of internal vertices; Step 2A2: Introduce boundary conditions; Step 2A3: Obtain the complete expression of the system and solve it; Step 2A4, after solving all Combining these yields a scalar field; Step 2B: Orthogonalization.

3. The path texture-driven 3D surface processing trajectory generation method according to claim 1, characterized in that, Step 3 specifically includes the following steps: Step 3A: Process the path texture image to obtain a sequence of several equally spaced points in the path texture image. ; The number of sampling points; Step 3B: Reverse map the points in the equally spaced point sequence onto the curved surface to obtain the initial trajectory point set. .

4. The path texture-driven 3D surface processing trajectory generation method according to claim 2, characterized in that, Step 3B specifically includes the following steps: Step 3B1: Reverse map the points in the equally spaced point sequence into three-dimensional points. ; Step 3B2, Based on 3D points Traverse the triangular facets to find the 3D point The falling triangular facet; Step 3B3: Based on the triangular facets obtained in Step 3B2, obtain the weights corresponding to the vertices of the triangular facets. ); Step 3B4: Apply interpolation to the triangular facets obtained in Step 3B2 to calculate the 3D points. Corresponding .

5. The path texture-driven 3D surface machining trajectory generation method according to claim 1, characterized in that, Step 4 specifically includes the following steps: Step 4A: Smoothing the three-point parabola; Step 4B: Construct an energy function and perform curvature minimization optimization with the goal of minimizing energy; The energy function is: ; in, -Trajectory points in the initial trajectory point set.

6. The path texture-driven 3D surface machining trajectory generation method according to claim 1, characterized in that, Step 4 is followed by the following steps: Step 5: Calculate the tangent vector and normal vector for each path point.

7. A path texture-driven 3D surface machining trajectory generation apparatus, used to implement the path texture-driven 3D surface machining trajectory generation method according to any one of claims 1 to 6, characterized in that, include: The preprocessing module reads the STL file and extracts the set of triangle faces and the first-order adjacency matrix of each vertex; The parameter field calculation module reads the vertex coordinates and first-order adjacency list obtained in step 1. Output the mapping from the surface path to the 2D image path. To the image-to-surface mapping module; The path texture map processing module extracts the center line of the path texture map and discretizes it into a series of image path points. The image-surface mapping module is used to reverse map image path points onto the STL model; The module includes a curve reconstruction and optimization module, which is used to convert discrete 3D path points into executable machining trajectory curves.

Citation Information

Patent Citations

  • Line laser scanning-based sand blasting robot automatic path generation method

    CN105354880A

  • Three-dimensional cycloid-like polishing locus generation method for feeding along cutting path

    CN107369127A

  • Parameter mapping-based measurement planning method for complex curved surface

    CN108682043A

  • Curved surface discrete point cloud model girdling tool path generation method based on harmonic mapping

    CN110516388A

  • Texture mapping method and system, computer and readable storage medium

    CN114708375A

Cited By

  • Curved surface engraving adaptive path planning method based on feature extraction

    CN121613816A