Valve body polishing trajectory generation method and system based on cross-sectional profile line

By reducing the 3D point cloud to a 2D (Z, R) cross-sectional coordinate system, the grinding trajectory of the valve body is generated based on the cross-sectional contour line. This solves the problems of accuracy and continuity in the generation of 3D grinding trajectories for complex rotating parts, and achieves efficient and robust grinding trajectory generation.

CN123039871APending Publication Date: 2026-11-06Liupanshan Laboratory
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611439477.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Traditional methods suffer from low accuracy, poor continuity, poor robustness, and insufficient structural adaptability when generating 3D grinding trajectories for complex rotating parts. In particular, point cloud data quality issues are severe when dealing with complex structures and highly reflective surfaces, leading to unstable feature recognition and segmentation results.

Method used

A method based on cross-sectional contour lines is used to reduce the dimensionality of the 3D point cloud to a 2D (Z, R) cross-sectional coordinate system. The geometric features of the valve body are extracted through topological scanning and reconstruction to generate a high-precision and continuous grinding trajectory, including key corner point extraction, geometric segmentation and global collision verification.

Benefits of technology

It achieves efficient and accurate three-dimensional grinding trajectory generation, improves processing accuracy and continuity, enhances the robustness and structural adaptability of trajectory generation, and is suitable for rotary valve bodies of different specifications and structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123039871A_ABST
    Figure CN123039871A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for generating valve body grinding trajectories based on cross-sectional contour lines, relating to the field of grinding trajectory technology. The method includes: acquiring the original three-dimensional point cloud of the target valve body and converting it into a two-dimensional point cloud set; performing a first-stage scan based on the two-dimensional point cloud set to generate an end-face contour point set; when the first-stage scan position crosses the end-face edge, converting it to an axial scan of the inner hole to generate an inner hole wall contour point set, which is then merged with the end-face contour point set to obtain a cross-sectional contour point sequence; extracting and deduplicating key corner points based on the cross-sectional contour point sequence to obtain geometric segment lines; performing semantic label classification and correction based on the geometric segment lines to obtain a corrected global profile line; constructing a collision check window and calculating its geometric intersection with the corrected global profile line to obtain a geometric intersection point set; obtaining the effective processing range based on the geometric intersection point set and generating the grinding trajectory of the target valve body. This generates a non-interference, highly continuous three-dimensional processing trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of grinding trajectory technology, and more specifically to a method and system for generating valve body grinding trajectories based on cross-sectional contour lines. Background Technology

[0002] Automated grinding and polishing by industrial robots is a key process in modern manufacturing to achieve consistent surface quality of parts and improve production efficiency. In the automated machining of complex rotating parts such as valve bodies and pump bodies, the autonomous generation of high-quality machining trajectories is one of the core technologies for achieving consistent machining and intelligent operation. Traditional robot grinding trajectory generation methods typically rely on 3D point cloud data. Through local geometric feature analysis and feature region segmentation techniques such as surface normal estimation, curvature analysis, boundary extraction, and geometric model fitting, the target machining feature surface is identified and parameterized, thereby planning the tool posture and machining trajectory path.

[0003] However, the aforementioned methods have significant technical limitations when dealing with complex rotating parts. On the one hand, parts such as valve bodies and pump bodies vary significantly in terms of cavity distribution, surface transition forms, and machining area morphology. They are often accompanied by complex structural features such as deep cavities, internal holes, occluded areas, and highly reflective metal surfaces. This makes it difficult for traditional methods relying on fixed rule segmentation to establish a unified and stable machining area representation for parts with different structures, significantly reducing the accuracy of feature recognition and the stability of segmentation results. On the other hand, complex structures lead to severe viewpoint occlusion during visual scanning, and highly reflective surfaces are prone to optical interference such as laser scattering, multipath reflection, and specular reflection, resulting in quality problems such as local missing points, outlier noise, thickness drift, and topological discontinuities in the acquired point cloud. Under the combined effect of structural diversity and point cloud incompleteness, the accuracy of local geometric feature estimation, on which traditional methods rely, is greatly reduced, leading to misclassification, omissions, or blurred boundaries in feature region segmentation. Ultimately, the generated machining trajectory fails to meet the actual requirements of high-precision automated grinding in terms of accuracy, continuity, and structural adaptability.

[0004] Therefore, how to efficiently generate high-precision, highly continuous, robust, and structurally adaptable three-dimensional machining trajectories is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of the above problems, the present invention is proposed to provide a valve body grinding trajectory generation method and system based on cross-sectional contour lines to overcome or at least partially solve the above problems. It realizes a unified and stable characterization of the processing area of ​​parts with different structural forms, and thus efficiently generates a three-dimensional processing trajectory with high precision, high continuity and good robustness and structural adaptability.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, embodiments of the present invention provide a method for generating valve body grinding trajectories based on cross-sectional contour lines, including: Obtain the original 3D point cloud of the target valve body and convert it into a 2D point cloud set; Based on the two-dimensional point cloud, the first stage of scanning is performed step by step from the maximum outer diameter of the valve body toward the axis to generate the end face contour point set; When the scanning position of the first stage crosses the edge of the end face, it is converted to an axial scan of the inner hole, generating a set of inner hole wall contour points, which is then fused with the end face contour point set to obtain a cross-sectional contour point sequence. Based on the cross-sectional contour point sequence, key corner points are extracted and deduplicated to obtain geometric segment lines; Based on the geometric segmented lines, semantic label classification and correction are performed to obtain the corrected global profile line; Construct a collision check window and calculate its geometric intersection with the corrected global profile line to obtain a set of geometric intersection points; The effective processing range is obtained based on the set of geometric intersection points, and the grinding trajectory of the target valve body is generated.

[0008] The preferred method for obtaining a two-dimensional point cloud is as follows: Based on the original 3D point cloud, the rotation axis parameters, including the axis center coordinates and direction vectors, are determined, and a two-dimensional axial-radial coordinate system is constructed. The direction vector is taken as the Z-axis of the two-dimensional axial-radial coordinate system; Based on any target point in the original 3D point cloud, project it onto the Z-axis, and combine the axis center coordinates and the direction vector, calculate its relative distance along the Z-axis direction, which is used as the axial distance; Based on the axis coordinates, the direction vector, and the axial distance, the vertical distance from the target point to the Z-axis is calculated and used as the radial distance; The axial distance and the radial distance are used together to transform any target point in the original three-dimensional point cloud into a plane point in the two-dimensional axial-radial coordinate system, which is then used as the two-dimensional point cloud. All the transformed two-dimensional point clouds together constitute the two-dimensional point cloud set.

[0009] Preferably, a two-dimensional axial-radial coordinate system is constructed, specifically including: Based on the original three-dimensional point cloud, the point cloud data of the topmost preset thickness is selected along the Z-axis direction of the target valve body as the end face local point cloud; Based on the local point cloud of the end face, a plane fitting is performed to obtain the plane equation of the end face; Based on the equation of the end face plane, the plane normal vector is obtained and normalized to obtain the direction vector of the target valve body rotation axis; The local point cloud of the end face is projected onto a defined end face plane and converted into two-dimensional planar points; A pixel-based two-dimensional binary mask image is constructed based on the two-dimensional plane points, and an image contour search algorithm is executed to determine the inner circle contour by utilizing the topological hierarchical inclusion relationship between contours. Based on the contour points of the inner circle contour, a circle is fitted to obtain the center point and the radius of the circle, and then mapped back to three-dimensional space to obtain the spatial coordinates of the center point, which are used as the axis coordinates. The two-dimensional axial-radial coordinate system is constructed based on the direction vector and the axis coordinates.

[0010] The preferred method for obtaining the end face contour point set is as follows: The two-dimensional point cloud is divided into multiple radial differential intervals by dividing the radial distance from large to small according to a set first fixed step size; For all two-dimensional point clouds falling within the radial differential interval, construct a first density histogram along the Z-axis with a preset axial grid resolution; Based on the first density histogram, the axial span within the radial differential interval is discretized into multiple Z-axis grid buckets, and the number of point clouds falling into each Z-axis grid bucket is counted as the local point cloud density. Based on the local point cloud density, the Z-axis coordinates of the first successful hit on the target valve body end face surface along the Z-axis direction are obtained; Obtain the center distance between the radial micro-partitions currently being scanned, and combine it with the Z-axis coordinate to form the end face hit point; Traverse all the radial differential intervals and generate the end face contour point set based on all the end face hit points.

[0011] Preferably, the sequence of cross-sectional contour points is obtained, specifically including: When the first stage scan reaches a certain radial differential interval, if the local point cloud density corresponding to all Z-axis grid buckets along the Z-axis direction is less than the density threshold, it is determined that the scanning position has crossed the end face edge and entered the inner hole region. The Z coordinate of the previous valid end face hit point is used as the scanning transition point, and the first stage of scanning is immediately terminated, and the second stage of the inner hole axial scanning is automatically switched. Scan along the Z-axis with a set second fixed step size to divide multiple axial depth slices of the inner hole; For the two-dimensional point cloud falling within the axial depth slice of each of the inner holes, a second density histogram is established according to the radial distance from large to small with a preset R-axis grid resolution; Based on the second density histogram, the axial span within the axial depth slice of the inner hole is discretized into multiple R-axis grid buckets. The number of two-dimensional point clouds falling into each of the R-axis grid buckets is counted, and the smallest R-axis grid bucket that is greater than or equal to the density threshold is selected as the inner hole wall hit point at the current depth. When the number of two-dimensional point clouds of all the R-axis grid buckets in a certain inner hole axial depth slice is less than the density threshold, it is determined that the bottom of the inner hole has been reached, the scanning is stopped, the inner hole wall hit points obtained from each inner hole axial depth slice are collected, and the inner hole wall contour point set is generated. According to the actual scanning time sequence, the end face contour point set and the inner hole wall contour point set are connected end to end to splice them to obtain the contour point set. The set of contour points constitutes a complete and ordered sequence of cross-sectional contour points that describes the valve body from the uppermost end face to the inner wall.

[0012] Preferably, the geometric segmentation line is obtained, specifically including: The cross-sectional contour point sequence is divided into multiple contour point sequence segments; The line segment formed by the first and last two points of the current contour point sequence segment is used as the approximation baseline. Traverse all intermediate points within the current contour point sequence segment and calculate the vertical distance from each intermediate point to the approximation baseline; Select the midpoint corresponding to the maximum vertical distance as the candidate point; When the maximum vertical distance is greater than the distance threshold, the candidate point is taken as the key corner point, and the current segment is divided into two sub-sequences using the candidate point as the dividing point. The above solution process is repeated recursively. When the maximum vertical distance is less than or equal to the distance threshold, all intermediate points between the first and last endpoints of the current contour point sequence segment are removed. After the above recursive processing, only the starting point, the ending point, and all the key corner points are retained to obtain the key corner point sequence; Based on connecting any two adjacent points in the key corner point sequence end to end, a continuous geometric segmented line composed of multiple line segments is constructed. A slot swallowing algorithm is introduced to remove duplicates and merge segments in a continuous geometric segment line in a second step, resulting in the geometric segment line after deduplication and merging.

[0013] Preferably, the corrected global profile line is obtained, specifically including: Obtain the directional slope of each target line segment in the geometric segmented line in the two-dimensional axial-radial coordinate system; Set a slope determination threshold; Target line segments with a slope greater than the slope determination threshold are identified as end face feature segments, and end face semantic labels are added to the target line segments. Target line segments with a slope less than or equal to the slope determination threshold are identified as wall feature segments, and wall semantic labels are added to the target line segments. All the end face feature segments and the wall feature segments together form a geometric segmentation line with semantic labels; The discrete geometric segmented lines with semantic labels are connected end to end in sequence to reconstruct a continuous geometric polyline on a two-dimensional plane, which serves as the global profile line. Traverse all feature segments in the global profile line, and align the axial coordinates of all nodes in the end face feature segment to the average value of the axial coordinates of that segment; the wall feature segment retains its original geometric orientation completely, thus obtaining the corrected global profile line.

[0014] Preferably, the set of geometric intersection points is obtained, specifically including: Determine the spatial reference coordinates of the tool under its current evaluation state; At the current evaluation location, a local tangential difference vector is constructed based on the corrected global profile line; Based on the local tangential difference vector, orthogonal rotation and normalization are performed to obtain the scalar component of the projection of the unit normal vector on the radial R-axis. Based on the spatial reference coordinates and the projected scalar components, the radial coordinates of the ideal tool center point are obtained; The collision check window is constructed based on the radial coordinates of the ideal tool center point and the spatial reference coordinates; Obtain the geometric intersection of the collision check window and the corrected global profile line to obtain the geometric intersection point set.

[0015] Preferably, generating the grinding trajectory of the target valve body specifically includes: Using the radial coordinates of the ideal tool center point in the spatial reference coordinates as the boundary, all intersection points in the geometric intersection point set are divided into an inner intersection point set and an outer intersection point set; Extract the maximum radial coordinate of the inner intersection points based on the set of inner intersection points; Extract the minimum radial coordinates of the outer intersection points based on the set of outer intersection points; Based on the maximum radial coordinate and the tool radius envelope size, the inner safety lower bound is obtained; Based on the minimum radial coordinate and the tool radius envelope size, the outer safety upper bound is obtained; The effective processing range is obtained based on the inner lower safety boundary and the outer upper safety boundary; Based on the geometric segmented lines with semantic tags, and combined with the effective processing range, end face grinding trajectory and wall surface grinding trajectory are generated respectively, which together form the grinding trajectory of the target valve body.

[0016] In a second aspect, embodiments of the present invention provide a valve body grinding trajectory generation system based on cross-sectional contour lines, used to execute the valve body grinding trajectory generation method based on cross-sectional contour lines as described in any of the first aspects, including: a point cloud conversion module, a contour point set generation module, a contour point set fusion module, a key corner point merging module, a semantic classification correction module, an intersection point set acquisition module, and a grinding trajectory generation module; The point cloud conversion module is used to acquire the original three-dimensional point cloud of the target valve body and convert it into a two-dimensional point cloud set; The contour point set generation module is used to perform a first-stage scan from the maximum outer diameter of the valve body toward the axis based on the two-dimensional point cloud to generate the end face contour point set. The contour point set fusion module is used to convert the scanning position of the first stage to the inner hole axial scanning when it crosses the end face edge, generate the inner hole wall contour point set, and fuse it with the end face contour point set to obtain the cross-sectional contour point sequence. The key corner point merging module is used to extract and deduplicate key corner points based on the cross-sectional contour point sequence to obtain a geometric segment line. The semantic classification and correction module is used to classify and correct semantic labels based on the geometric segmentation line to obtain a corrected global profile line. The intersection point set acquisition module is used to construct a collision check window and calculate the geometric intersection with the corrected global profile line to obtain the geometric intersection point set; The grinding trajectory generation module is used to obtain the effective processing range based on the geometric intersection point set and generate the grinding trajectory of the target valve body.

[0017] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for generating valve body grinding trajectories based on cross-sectional contour lines. By utilizing the symmetry physical prior of the solid of revolution, the disordered 3D point cloud is reduced to a two-dimensional (Z, R) cross-sectional coordinate system, and topological scanning and reconstruction are performed. Precise corner point extraction, geometric segmentation, and global collision verification are then executed on the reduced cross-sectional line, ultimately generating a high-precision, highly continuous, and directly executable three-dimensional machining trajectory. It has the following beneficial effects: 1. High trajectory generation efficiency: By utilizing the geometric features of the valve body, a three-dimensional grinding trajectory can be directly constructed without the need for complex robot trajectory planning and multiple trajectory adjustments. This allows for the rapid generation of an executable grinding trajectory that meets the processing requirements, thereby satisfying the trajectory generation efficiency requirements of actual production operations.

[0018] 2. High trajectory generation accuracy: The trajectory points are constructed based on the actual cross-sectional contour of the valve body, so that the generated grinding trajectory can fit the target machining surface well, improve the matching degree between the grinding trajectory and the actual surface shape of the valve body, and thus ensure the machining accuracy of the grinding trajectory.

[0019] 3. Good trajectory continuity: Based on the continuous geometric features of the valve body cross-sectional profile, the trajectory can be constructed in one go, generating a continuous grinding trajectory covering the valve body end face to the inner surface. The robotic arm is guided to perform grinding sequentially according to the generation order of the trajectory points, reducing the trajectory switching and connection process between different processing areas, which is conducive to achieving continuous and stable grinding operations.

[0020] 4. Good robustness of trajectory generation: By performing cross-sectional processing and topological reconstruction on the 3D point cloud of the valve body, even if there are local defects in the acquired 3D point cloud, the grinding trajectory can still be generated based on the preserved geometric contour features, reducing the impact of local defects in the point cloud on the trajectory generation result and improving the adaptability of the trajectory generation process to changes in the actual point cloud quality.

[0021] 5. Good structural adaptability: The trajectory generation process is constructed based on the valve body cross-sectional profile and the geometric features of the rotating body. It does not depend on specific valve body structural parameters or fixed trajectory templates. It can adapt to rotating valve bodies of different specifications and structural forms, realizing automatic generation of grinding trajectories and flexible grinding operations. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0023] Figure 1 This is a flowchart of a valve body grinding trajectory generation method based on cross-sectional contour lines provided in an embodiment of the present invention.

[0024] Figure 2 This is a schematic diagram of the key corner points extracted by the RDP algorithm provided in this embodiment of the invention.

[0025] Figure 3 This is a schematic diagram of ordered geometric segmented lines with semantic labels provided in an embodiment of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] Example 1 like Figure 1 As shown, this embodiment of the invention discloses a valve body grinding trajectory generation method based on cross-sectional contour lines, including the following steps. For ease of description, these steps are numbered S1 to S7, which are not used to limit the sequential relationship between the various steps of this invention: S1 acquires the original 3D point cloud of the target valve body and converts it into a 2D point cloud set.

[0028] Furthermore, this invention is only applicable to parts of the rotating body type; for any rotating body, its complete three-dimensional shape can be uniquely determined by rotating the cross-sectional profile (generatrix) around the axis of rotation for one revolution. Based on this prior, the problem of machining the point cloud of any complex three-dimensional rotating body can be reduced to the problem of extracting and processing the geometric form of its two-dimensional cross-sectional profile.

[0029] Regardless of the number of steps or the depth of the inner hole of the target part, as long as the part is a body of revolution, its cross-sectional profile in the (Z,R) plane will be a polygonal line consisting of alternating horizontal segments (end face) and vertical / sloping segments (wall). The algorithm does not need to identify the part type; it only needs to read and process the geometry of this polygonal line to generate a complete trajectory covering all machining areas of the part.

[0030] Furthermore, the method for obtaining the two-dimensional point cloud is as follows: Based on the original 3D point cloud, the rotation axis parameters, including the axis center coordinates and direction vectors, are determined, and a 2D axial-radial coordinate system is constructed. The direction vector is used as the Z-axis of the two-dimensional axial-radial coordinate system; Based on any target point in the original 3D point cloud, project it onto the Z-axis, and combine the axis center coordinates and direction vector to calculate its relative distance along the Z-axis direction, which is used as the axial distance; Based on the axis coordinates, direction vector, and axial distance, calculate the perpendicular distance from the target point to the Z-axis, which is then used as the radial distance; Axial and radial distances are used together to transform any target point in the original 3D point cloud into a planar point in a 2D axial-radial coordinate system, which is then used as a 2D point cloud. All the transformed 2D point clouds together form a 2D point cloud set.

[0031] Furthermore, a two-dimensional axial-radial coordinate system is constructed, specifically including: Based on the original 3D point cloud, select the point cloud data of the topmost preset thickness along the Z-axis direction of the target valve body as the local point cloud of the end face; RANSAC plane fitting is performed based on the local point cloud of the end face to obtain the plane equation of the end face; The plane normal vector is obtained by solving the plane equation of the end face and then normalized to obtain the direction vector of the target valve body rotation axis; Project the local point cloud of the end face onto a defined end face plane and convert it into two-dimensional planar points; A pixel-based two-dimensional binary mask image is constructed based on two-dimensional planar points, and an image contour search algorithm is executed to determine the inner circle contour by utilizing the topological hierarchical inclusion relationship between contours. Based on the contour points of the inner circle contour, a circle is fitted to obtain the center point and the radius of the circle, and then mapped back to three-dimensional space to obtain the spatial coordinates of the center point, which are used as the axis coordinates. A two-dimensional axial-radial coordinate system is constructed based on the direction vector and the axis coordinate.

[0032] In this embodiment, the original three-dimensional point cloud of the target valve body has been pre-unified to the robot base coordinate system through hand-eye conversion.

[0033] Specifically, since the target valve body is placed vertically in the tooling, its end face must be located at the top of the entire point cloud. Based on the original three-dimensional point cloud, the point cloud data of the top with a preset thickness is extracted along the Z-axis direction of the target valve body to ensure that the number of point cloud points meets the threshold. In this embodiment, the threshold is set to 100, thereby extracting the local point cloud of the end face as the direct input for subsequent fitting.

[0034] Specifically, based on the axis coordinates of the target valve body's rotation axis. With direction vector , construct local A two-dimensional axial-radial coordinate system, wherein, They represent The coordinate components in the X, Y, and Z axes of the original three-dimensional point cloud coordinate system.

[0035] Specifically, based on the determined rotation axis parameters, the algorithm projects and transforms the original 3D point cloud in the original Cartesian coordinate system to a planar 2D metric space. The specific process is as follows: With direction vector As a two-dimensional axial-radial coordinate system Axis (axial direction); Any target point in the original 3D point cloud Project to Z Axis, and combined with axis coordinates and direction vector Calculate their relative distance along the Z-axis, as the axial distance. Z : ; Based on axis coordinates Direction vector and axial distance Calculate the perpendicular distance from the target point to the Z-axis, and use it as the radial distance. R : ; Through the above transformation, any target point in the original 3D point cloud... Convert to Plane points in a two-dimensional axial-radial coordinate system .

[0036] Specifically, the aforementioned coordinate transformation mathematically conceals the differences in azimuth angles of rotation around the axis at each point, using a full-circle point cloud... The high overlap on the plane automatically fills in the missing parts of the local scan and suppresses random noise, and finally extracts the true two-dimensional axial-radial point cloud of the valve body under the two-dimensional plane, that is, the two-dimensional point cloud.

[0037] S2 is based on a two-dimensional point cloud and performs a first-stage scan from the maximum outer diameter of the valve body toward the axis to generate a set of end face contour points.

[0038] Furthermore, the method for obtaining the end face contour point set is as follows: The two-dimensional point cloud is divided into equal intervals according to the radial distance from large to small by a set first fixed step size, resulting in multiple radial differential intervals; For all two-dimensional point clouds falling within the current radial differential interval, construct a first density histogram along the Z-axis with a preset axial grid resolution; Based on the first density histogram, the axial span within the radial differential interval is discretized into multiple Z-axis grid buckets, and the number of point clouds falling into each Z-axis grid bucket is counted as the local point cloud density. Based on the local point cloud density, the Z-axis coordinates of the first successful hit on the target valve body end face surface along the Z-axis direction are obtained; Obtain the center distance between the radial micro-parts of the current scan, and combine it with the Z-axis coordinate to form the end face hit point; Traverse all radial differential intervals and generate a set of end face contour points based on all end face hit points.

[0039] Specifically, S1 transforms and fully folds the original 3D point cloud into a 2D point cloud set containing the full circumference geometry of the valve body. This step will be based on this two-dimensional point cloud. ,along ZRThe two orthogonal directions (axial and radial) of the two-dimensional axial-radial coordinate system radial Two-stage adaptive scanning is performed to extract the continuous cross-sectional contour lines of the fitting end face and the inner hole wall from the discrete point cloud.

[0040] The scanning process uses "density hit" rather than "statistical mean" as the surface detection criterion. That is, it determines whether the object surface is touched by the point cloud density in a local area, so as to effectively eliminate the interference of outlier noise and internal voids.

[0041] Specifically, the first stage: radial scanning of the end face ( From the outside in, density hits (directional surface) Based on two-dimensional point cloud From the maximum outer diameter of the valve body towards the axis ( Scan step by step (from largest to smallest): With the set first fixed step size radial The axis is from the outside to the inside ( (From largest to smallest) Two-dimensional point cloud By dividing the space into equal intervals, multiple radial differential intervals are obtained: ; in, Indicates the first A radially differentiated interval is divided; This represents the maximum radial boundary radius of a two-dimensional point cloud; This indicates the system's preset fixed radial scan step size; A non-negative integer, representing the index counter for radial step differential ( ); For those falling within the current radial differential interval All two-dimensional point clouds within, along the axis Orientation, with a preset axial grid resolution Construct the first density histogram; Based on the first density histogram, the axial span within the current radial differential interval is discretized into multiple values. Axis mesh buckets (Bins), and count the number of bins falling into each bin. Number of 2D point clouds within the axis grid bucket As a local point cloud density: ; in, Indicates radial distance place, along The direction successfully hit the valve body end face surface for the first time. Axis coordinates; Indicates the center distance between the radial micro-partitions of the current scan; Indicates along the axial direction The grid buckets are established in a specific direction, and their neighborhood width is equal to the grid resolution. ; Indicates falling into The number of two-dimensional point clouds within the axis grid bucket, i.e., the local point cloud density; This represents the density threshold used to identify real entities and is used to filter out isolated noise. Traverse all radial differential intervals, collect the end face hit points, and generate the end face radial profile point set. .

[0042] Specifically, in this embodiment, .

[0043] S3 When the scanning position of the first stage crosses the edge of the end face, it is converted to an axial scan of the inner hole, generating a set of inner hole wall contour points, which is then merged with the end face contour point set to obtain a sequence of cross-sectional contour points.

[0044] Furthermore, the sequence of cross-sectional contour points is obtained, specifically including: When the first stage scan reaches a certain radial differential interval, if the local point cloud density corresponding to all Z-axis grid buckets along the Z-axis direction is less than the density threshold, it is determined that the scan position has crossed the end face edge and entered the inner hole region. The Z coordinate of the previous valid end face hit point is obtained as the scanning transition point, and the first stage of scanning is immediately terminated, and the second stage of internal hole axial scanning is automatically switched. Scan along the Z-axis with a set second fixed step size to divide multiple axial depth slices of the inner hole; For the two-dimensional point cloud falling within the axial depth slice of each inner hole, a second density histogram is established according to the radial distance from large to small with a preset R-axis grid resolution; Based on the second density histogram, the axial span within the axial depth slice of the inner hole is discretized into multiple R-axis grid buckets. The number of two-dimensional point clouds falling into each R-axis grid bucket is counted, and the smallest R-axis grid bucket with a density threshold greater than or equal to the density threshold is selected as the inner hole wall hit point at the current depth. When the number of two-dimensional point clouds of all R-axis grid buckets in a certain inner hole axial depth slice is less than the density threshold, it is determined that the bottom of the inner hole has been reached, the scanning is stopped, the inner hole wall hit points obtained from each inner hole axial depth slice are collected, and the inner hole wall contour point set is generated. According to the actual scanning time sequence, the end face contour point set and the inner hole wall contour point set are connected end to end to splice them to obtain the contour point set; The set of profile points constitutes a complete and ordered sequence of cross-sectional profile points that describes the uppermost end face of the valve body to the inner wall.

[0045] Specifically, the method of this invention includes an adaptive stage switching mechanism based on density loss: Real-time monitoring during the first phase of scanning The surface hit status in the direction enables automatic topology switching from the end face to the inner hole: When the first stage scan reaches a certain radial differential interval At that time, along Traverse all directions Z Neither the axis mesh buckets nor the local point cloud density can be satisfied. That is, along The direction could no longer detect the solid surface, indicating that the scanning position had crossed the edge of the end face and entered the inner hole area; Record the last valid end face hit point Coordinates are the scanning transition points The first stage of scanning is terminated, and the system automatically switches to the second stage of axial scanning of the inner hole.

[0046] Specifically, the second stage: axial scanning of the inner hole ( From shallow to deep, density hits the mark. R direction wall) Based on the scan transition points recorded in the first stage Starting from the valve body axial direction, scan gradually from shallow to deep: With the set second fixed step size along Axial scanning was used to obtain multiple axial depth slices of the inner hole. That is, in two dimensions upper edge of the plane Axis-divided strip point cloud subset: ; in, This indicates the transition point from scanning. to the depth of the inner hole Depth slice of the next scan; For the axial depth of each inner hole Two-dimensional point cloud within, along radial direction Direction with R-axis grid resolution Construct a second density histogram. Based on the second density histogram, the axial span within the axial depth slice of the inner hole is discretized into multiple R-axis grid buckets. Count the number of 2D point clouds falling into each R-axis grid bucket. Select a value greater than or equal to the density threshold. The smallest R-axis mesh bucket, i.e., the inner solid wall closest to the rotation axis, is used as the hit point of the inner hole wall at the current depth: ; in, Indicates axial depth The radial distance from the inner hole wall surface closest to the axis of rotation; Indicates the center of the current axial depth slice Axis coordinates; Indicates radial direction The directional grid bucket microstatistical neighborhood has a neighborhood width equal to the grid resolution. ; Indicates falling into The number of 2D point clouds within the axis grid bucket; When the number of 2D point clouds of all R-axis mesh buckets within a slice at a certain axial depth of an inner hole is less than the density threshold When the bottom of the inner hole is reached, the scan stops. The inner hole wall hit points obtained from each axial depth slice are collected to generate an inner hole wall contour point set. .

[0047] Specifically, based on the acquired end face contour point set With the inner hole wall profile point set Perform topology fusion: The end face contour point set is arranged according to the actual scanning time sequence. With the inner hole wall profile point set Connect the ends directly and splice them together: ; The final output contour point set It includes both the end face hit point and the inner hole wall hit point; Due to the adoption of adaptive switching and sequential stitching mechanisms, the contour point set... This forms a complete and ordered sequence of cross-sectional profile points that describe the uppermost end face of the valve body to the inner wall, naturally maintaining the topological continuity of the geometric structure.

[0048] S4 extracts and deduplicates key corner points based on the cross-sectional contour point sequence to obtain geometric segment lines.

[0049] Furthermore, the geometric segmentation lines are obtained, specifically including: The cross-sectional contour point sequence is divided into multiple contour point sequence segments; The line segment formed by the first and last two points of the current contour point sequence segment is used as the approximation baseline. Iterate through all intermediate points within the current contour point sequence segment and calculate the vertical distance from each intermediate point to the approximate baseline; Select the midpoint corresponding to the maximum vertical distance as the candidate point; When the maximum vertical distance is greater than the distance threshold, the candidate point is taken as the key corner point, and the current segment is divided into two sub-sequences with the candidate point as the dividing point. The above solution process is repeated recursively. When the maximum vertical distance is less than or equal to the distance threshold, remove all intermediate points between the first and last endpoints of the current contour point sequence segment; After the above recursive processing, only the starting point, the ending point, and all the key corner points are retained, resulting in the key corner point sequence; Based on connecting any two adjacent points in the key corner point sequence end to end, a continuous geometric segmented line composed of multiple line segments is constructed. A slot swallowing algorithm is introduced to remove duplicates and merge segments in a continuous geometric segment line, resulting in a deduplicated and merged geometric segment line.

[0050] Specifically, after obtaining a continuous and ordered sequence of cross-sectional contour points, since the original point cloud has a high density and contains redundant details, it is necessary to extract key corner points and remove duplicates from the point sequence in order to extract segmented lines that can accurately describe the geometric features of the valve body cross-section.

[0051] Specifically, this invention uses the Ramer-Douglas-Peucker (RDP) algorithm to approximate high-density ordered contour point sequences into polygons: Data transfer logic: Traverse the point sequence along the topological order Calculate the perpendicular distance from the discrete point to the line connecting the previous and next points. Retain key inflection points (corner points) that are above the distance threshold, and remove redundant data points in flat areas. Output a very small number of key corner point sequences.

[0052] Specifically, the implementation logic of the RDP algorithm is as follows: Based on the current contour point sequence segment to be processed, extract its first and last endpoints. and Line segments As an approximation baseline; Iterate through all intermediate points within the current contour point sequence segment. Using the formula for the perpendicular distance from a point to a line, the distance from each intermediate point to the approximate baseline is calculated. vertical distance : ; in, Indicates the first Midpoint to baseline segment The vertical geometric distance; and These represent the start and end points of the current contour point sequence segment, respectively. Planar coordinates in a coordinate system; Indicates the number of segments within the current segment. The intermediate points to be evaluated are at Planar coordinates in a coordinate system; Represent the first endpoint, the last endpoint, and the first endpoint, respectively. The midpoints along the axial direction ( The coordinate components of the axis; Represent the first endpoint, the last endpoint, and the first endpoint, respectively. The midpoints are along the radial direction ( The coordinate components of the axis.

[0053] In the front contour point sequence segment, the midpoint with the largest vertical distance is identified as a candidate point. Its maximum distance is expressed as .

[0054] Introduce a preset distance threshold : like : Indicate candidate points The geometric transition at this point is significant, making it a contour feature corner point that cannot be ignored. Mark the key corners as those that must be retained, and use the key corners Divide the current segment into segments using the dividing point as the boundary. and The above solution process is repeated recursively for two subsequences.

[0055] like This indicates that all intermediate points within the current segment are extremely close to a straight line. This area is flat and can be directly removed. and All intermediate redundant points.

[0056] After the above global recursive processing, the algorithm finally retains only the start point, the end point, and all key corner points that meet the threshold conditions, and outputs a minimal key corner point sequence.

[0057] Specifically, such as Figure 2 As shown, these are the key corner points extracted by the RDP algorithm of this invention. The gray scattered points in the background are the projections of the original point cloud of the valve body onto the target area. The results are presented in a two-dimensional axial-radial coordinate system; the red dots represent key corner points retained by the RDP algorithm recursively, and the red broken lines connect these corner points. As can be seen from the comparison, the algorithm of this invention significantly reduces redundant points while accurately capturing key geometric inflection points such as valve body steps.

[0058] Specifically, based on the acquired key corner sequence By connecting adjacent corner points end to end in sequence, a continuous geometric segmented line composed of multiple line segments can be constructed; where any two adjacent corner points and A line segment formed by connecting these segments is defined as a geometric segment. ( ).

[0059] Specifically, to address potential areas physically inaccessible to the tool or minor fluctuation noise after corner point extraction, a slot merging algorithm is introduced to deduplicate and merge segments. A geometric segment is considered a redundant slot if and only if it simultaneously meets the following two conditions: (1) Geometric width limitation: The radial width of the geometric segment is less than the tool diameter, i.e. The tool cannot physically enter; in the formula, Indicates the radial width of the segment. The physical radius of the cutting tool; (2) Topological enclosing feature: The endpoints of adjacent segments on both sides of the geometric segment are higher than the bottom of the segment, and in the axial direction It forms an inwardly concave U-shaped enclosure structure in the direction of the direction; Processing logic: Geometric segments identified as redundant slots are directly merged into the previous adjacent geometric segment, unnecessary minor undulations and useless nodes are removed, and finally the deduplicated and merged geometric segment lines are obtained.

[0060] S5 performs semantic label classification and correction based on geometric segmentation lines to obtain corrected global profile lines.

[0061] Furthermore, the corrected global profile line is obtained, specifically including: Obtain the directional slope of each target line segment in the geometric segmentation line in the two-dimensional axial-radial coordinate system; Set a slope determination threshold; Target line segments with a directional slope greater than the slope determination threshold are identified as end face feature segments, and end face semantic labels are added to the target line segments. Target line segments with a directional slope less than or equal to the slope determination threshold are identified as wall feature segments, and wall semantic labels are added to the target line segments. All end face feature segments and wall feature segments together form a geometric segmentation line with semantic labels; The discrete geometric segmented lines with semantic labels are connected end to end in sequence to reconstruct a continuous geometric polyline on a two-dimensional plane, which serves as the global profile line. Traverse all feature segments in the global profile line, and align the axial coordinates of all nodes in the end face feature segment to the average value of the axial coordinates of that segment; the wall feature segment retains its original geometric orientation completely, thus obtaining the corrected global profile line.

[0062] Specifically, in order to achieve automated trajectory planning for different feature regions, it is necessary to perform semantic label classification on each geometric segment line to determine whether it belongs to "end face segment line" or "wall segment line". The classification process is based on piecewise lines in two dimensions. The geometric slope in the coordinate system is determined by the following logical steps: For any geometric segmentation line obtained Take its starting coordinates coordinates of the endpoint Calculate the directional slope of the line segment in the ZR two-dimensional axial-radial coordinate system. Or with axial direction Inclination angle of the axis : .

[0063] Specifically, based on the geometric features of the valve body machining, the end face is usually perpendicular to the axis of rotation: Significant changes The slope tends to infinity; and the wall is usually parallel to the axis of rotation. Significant changes The slope approaches 0. A slope threshold is set. Assign semantic tags according to the following rules: End-face segment: If That is, the line segment is mainly along the radial direction. If extended, the line segment is determined to be an end-face feature segment; Wall Segment: If That is, the line segment is mainly along the axial direction. If extended, the line segment is determined to be a feature segment of the wall.

[0064] Specifically, after obtaining the geometric segmentation lines with semantic labels (end face / wall surface), in order to generate a robot grinding trajectory that can cover the grinding area without interfering or colliding with non-processed walls, this invention proposes a grinding trajectory generation algorithm that combines geometric semantic correction and dynamic bilateral safety interval constraints: Global profile reconstruction: Discrete geometric segmented lines with semantic labels are sequentially connected end-to-end to reconstruct a single line in two dimensions. A continuous geometric polyline on a plane, i.e. a continuous two-dimensional polyline based on vector topology, is denoted as a global profile line. The arc length interpolation operator based on LineString enables equidistant resampling of the entire contour, providing a basis for accurately calculating the local tangent elements of the surface. and normal direction factor Lay the foundation for data.

[0065] Endface semantic level correction: Traversing the global profile lines For all feature segments, and for segments labeled "end face", force the axial coordinates of all its nodes to be... Unified alignment for this paragraph The average value of the coordinates is rigidly corrected to an absolute horizontal line segment; for "wall" segments, their original geometric orientation is completely preserved.

[0066] The physical meaning of correction: Due to the influence of measurement noise, the extracted end face usually has... The slight tilt angle. If not corrected, in subsequent intersection calculations, this slight tilt angle will be misjudged by the algorithm as a "wall obstacle" blocking the lateral movement of the tool, resulting in a large number of false positives (false alarms) of collision obstruction.

[0067] Specifically, such as Figure 3 As shown, the geometric segment lines formed by adjacent key corner points and their semantic classification are displayed. The blue and green line segments represent different geometric semantic labels, with blue indicating a plane and green indicating a curved surface. The number labels [0] to [9] in the yellow square indicate the topological connection order of each geometric segment line along the contour.

[0068] S6 constructs a collision check window and calculates the geometric intersection with the corrected global profile line to obtain the set of geometric intersection points.

[0069] Furthermore, the set of geometric intersection points is obtained, specifically including: Determine the spatial reference coordinates of the tool under its current evaluation state; At the current evaluation location, a local tangential difference vector is constructed based on the corrected global profile line; Based on the local tangential difference vector, orthogonal rotation and normalization are performed to obtain the scalar component of the projection of the unit normal vector on the radial R-axis. Based on the spatial reference coordinates and projected scalar components, the radial coordinates of the ideal tool center point are obtained; A collision check window is constructed based on the radial coordinates of the ideal tool center point and the spatial reference coordinates. Obtain the geometric intersection of the collision check window and the corrected global profile line to get the set of geometric intersection points.

[0070] Specifically, in order to assess whether the tool will interfere with the surrounding walls when grinding at a specific location, a tool side collision check window is introduced for solution.

[0071] Specifically, when performing collision verification and trajectory evaluation on the workpiece contour sampling points, the spatial reference coordinates of the tool under the current evaluation state are first determined. ,in, The evaluation height is represented by the axial height coordinate of the current sampling point. ; The radial coordinates of the ideal tool center point are: the nominal radial coordinates of the tool center point TCP in an ideal, interference-free state.

[0072] Specifically, due to the extracted global profile lines If the tool center point (TCP) is directly positioned on the section line, given the actual physical outer boundary of the workpiece, the tool body, with its physical radius, will intrude into the workpiece, causing severe collisions. Therefore, an anti-interference allowance must be reserved based on the tool envelope dimensions.

[0073] Suppose that at the current evaluation location, the data is represented by a profile line segment or adjacent discrete sampling points. to The constructed local tangential difference vector is : ; ; in, and They represent the first line on the outline. The and the first The adjacent discrete sampling points are Coordinates in a coordinate system; Indicates the sampling point point to The local tangential difference vector; Indicates the distance between adjacent sampling points along the axial direction ( The coordinate increment of the axis; Indicates the radial distance between adjacent sampling points ( The coordinate increment (radius increment) of the axis. They represent the first With the The axial coordinates of each sampling point; They represent the first With the The radial coordinates of each sampling point.

[0074] Specifically, the local tangential difference vector is orthogonally rotated and normalized to obtain the unit normal vector in the radial direction. Projected scalar components on the axis : ; in, This is a numerical stability protection item.

[0075] This formula essentially utilizes the coordinate difference between the endpoints of a line segment ( The tilt angle of the current local micro-element was quickly determined, and the TCP anti-interference relief of the tool center point was determined radially. The direction of action on the axis.

[0076] Specifically, to ensure that the tool surface is tangent to the contour and the tool body does not intrude into the wall, the tool center point TCP is recessed along the normal direction to allow for a radial offset. This yields the radial coordinates of the ideal tool center point TCP, i.e., the radial coordinates of the ideal tool center point. : ; ; in, These represent the radial and axial coordinates of the current sampling point, respectively. Indicates the radial direction of the current local unit normal vector. The sign of the signed projection component on the axis determines the radial intrusion prevention retreat. The direction of action on the axis; Indicates the physical radius of the cutting tool.

[0077] Specifically, using the ideal tool TCP coordinates Based on this, collision detection windows are constructed only in areas on the side of the tool where interference is likely to occur, avoiding the normal grinding contact area at the bottom of the tool. : ; in, This represents the lateral half-width of the inspection window; in this embodiment, the value is taken as the tool radius envelope size. Additional safety margin ,Right now ; and These represent the lower and upper boundaries of the inspection window relative to the TCP height of the tool center point, respectively. This is intended to eliminate the normal cutting contact surface at the bottom of the tool.

[0078] Specifically, calculate the collision check window. With correction of global profile lines The geometric intersections yield the set of geometric intersection points. : ; This intersection contains the set of all potential interference obstacles within the window detection range. Extract the intersection. radial coordinates of each obstacle point Based on its radial position relative to the ideal tool center point TCP, it is divided into inner obstacles ( ) and outer obstacles ( ).

[0079] S7 obtains the effective processing range based on the geometric intersection point set and generates the grinding trajectory of the target valve body.

[0080] Furthermore, the grinding trajectory of the target valve body is generated, specifically including: Using the radial coordinates of the ideal tool center point in the spatial reference coordinates as the boundary, all intersection points in the geometric intersection point set are divided into an inner intersection point set and an outer intersection point set; Extract the maximum radial coordinate of the inner intersection points based on the inner intersection point set; Extract the minimum radial coordinates of the outer intersection points based on the outer intersection point set; The inner safety lower bound is obtained based on the maximum radial coordinate and the tool radius envelope size; The outer safety upper bound is obtained based on the minimum radial coordinate and the tool radius envelope size; Based on the inner lower safety limit and the outer upper safety limit, the effective processing range is obtained; Based on geometric segmented lines with semantic labels, and combined with the effective processing range, end face grinding trajectory and wall surface grinding trajectory are generated respectively, which together form the grinding trajectory of the target valve body.

[0081] Specifically, for the calculated set of geometric intersection points radial coordinates of the ideal tool center point Use it as the boundary to connect all intersections. Divided into inner intersection set Intersection set with the outer side : ; ; Extract the maximum radial coordinates of the inner intersection points respectively Minimum radial coordinate of the intersection with the outer side : ; ; Combining tool radius envelope size Based on the distribution of obstacles on both sides of the tool center point TCP, the lower bound of each safety zone is determined. With the upper realm The calculation rules and output safety interval are as follows: (1) Obstacles exist on both sides (the cutting tool is restricted and clamped between the inner and outer side walls): Inner safety lower bound: ; Outer safety upper boundary: ; Output safe range: .

[0082] (2) Obstacles exist only on the inner side (limited only by the inner wall, with no obstruction on the outer side): Inner safety lower bound: ; Outer safety upper boundary: (No restrictions); Output safe range: .

[0083] (3) Obstacles exist only on the outer side (limited only by the outer wall, with no obstruction on the inner side): Inner safety lower bound: (No restrictions); Outer safety upper boundary: ; Output safe range: .

[0084] (4) No obstructions on either side (completely free area, such as an open end face): Inner safety lower bound: (No restrictions); Outer safety upper boundary: (No restrictions); Output safe range: .

[0085] (5) Obstacle crosses reference point (the tool TCP has been invaded by the wall, skip this point): Lower inner safety limit: —; Outer safety upper limit: —; Output safe range: (empty set).

[0086] Specifically, when the intersection result of the safe interval is unrestricted, that is, when... This is most common on open end faces. The algorithm introduces the physical boundary and overhang of the polished area as a fallback constraint to prevent the generation of invalid trajectories that are infinitely large or have missed edges. For the physical inner diameter of the processing section and physical outer diameter Allows the tool edge to overhang by a small amount (default value) (Exceeding the physical edge to ensure the workpiece edges are fully ground.) Corrected effective machining area. The calculation is as follows: ; ; in, and These represent the upper and lower limits of the final achievable safe radius after constraints; and These represent the physical inner radius and physical outer radius of the current grinding section on the workpiece geometry, respectively; This indicates the allowable overhang distance of the tool edge beyond the physical boundary, used to ensure the quality of edge grinding; and The geometric safety upper and lower bounds obtained above are, if are or Then it has no binding effect.

[0087] Specifically, based on semantic tag classification, the effective processing range is... Applying different processing strategies, two types of paths are generated: end face grinding paths and wall surface grinding paths. (1) Generation of concentric circle grinding trajectory on end face Applicable to: Processing sections labeled "end face".

[0088] Axial machining height on a fixed end face First, based on the physical radius of the cutting tool overlap with preset rate Calculate the effective grinding step length of a single tool :

[0089] Combined end face effective processing range Radial span, adaptive planning of concentric circle grinding circles : ; Subsequently, Uniformly discrete generation within the range Locus of concentric circles: ; like Then take the radius of the center single circle. ; Regarding the first Circle concentric circles, drive the tool along the circumferential angle Rotate to generate the corresponding three-dimensional closed circular trajectory: ; in, Indicates the axial reference height of the end face machining feature segment; Indicates the physical radius of the grinding tool; This indicates the preset grinding overlap rate between adjacent tracks; This indicates the effective grinding step size after considering the overlap rate. This represents the number of concentric ring grinding revolutions adaptively planned based on the radial span of the end face and the effective grinding step length. It is a rounding function; Indicates the first The radius of the concentric circle trajectory is planned and refined. This indicates the reference axis coordinates of the target valve body rotation axis determined in the preceding steps; This represents the unit direction vector of the target valve body rotation axis determined in the preceding steps (i.e., In coordinate system (Space orientation of the axis) Indicates perpendicular to the axis of rotation A set of mutually orthogonal unit basis vectors within the cross section (satisfying...) ), used to construct a local two-dimensional orthogonal plane of the slice section; Indicates the circumferential rotation angle ( ).

[0090] (2) Generation of wall surface contour offset grinding trajectory Applicable to: Processing sections labeled "wall".

[0091] Generation logic: Arc length along the original contour line of the wall Perform uniform resampling to obtain the original wall points. Calculate the normal vector at that point. And apply a depth offset along the normal direction. If the radial position of the target after offset exceeds the safe range, it will be forcibly clamped within the safe range: ; ; in, The parameter representing the cumulative arc length of the wall outline; These represent the original radial and axial coordinates of the wall obtained from resampling; , These represent the axial and radial coordinates of the final TCP target grinding trajectory point after applying the depth offset and correcting for the collision safety window; This indicates the depth offset of the grinding tool along the normal direction of the wall surface, i.e., the grinding depth. These represent the radial directions of the wall normal vector. and axial The components on; The interval clamping function is defined as follows: This ensures that the generated wall trajectory can be hit by the blade without ever crossing the boundary and colliding.

[0092] Determining the target polishing point for TCP After that, with coordinate system Axis (i.e., direction vector) Using as a reference, it is rotated around the axis along the circumferential angle. Rotate and unfold to generate the corresponding spatial closed three-dimensional circular grinding trajectory. :

[0093] in, This indicates the reference axis coordinates of the target valve body rotation axis determined in the preceding steps; This represents the unit direction vector of the target valve body rotation axis determined in the preceding steps (i.e., In coordinate system (Space orientation of the axis) Indicates perpendicular to the axis of rotation A set of mutually orthogonal unit basis vectors within the cross section (satisfying...) ), used to construct a local two-dimensional orthogonal plane of the slice section; Indicates the circumferential rotation angle ( The driving tool rotates around the axis to generate a closed three-dimensional circular trajectory.

[0094] When accumulating arc length parameters Iterate through each discrete point obtained from the aforementioned resampling. At that time, the formula outputs the three-dimensional circular trajectory of rotation under the height and radius of each layer, which is finally spliced ​​to form a multi-layer spatial grinding trajectory set covering the entire wall processing area.

[0095] Example 2 Based on the same inventive concept, this invention also provides a valve body grinding trajectory generation system based on cross-sectional contour lines, including: a point cloud conversion module, a contour point set generation module, a contour point set fusion module, a key corner point merging module, a semantic classification correction module, an intersection point set acquisition module, and a grinding trajectory generation module. The point cloud conversion module is used to acquire the original three-dimensional point cloud of the target valve body and convert it into a two-dimensional point cloud set; The contour point set generation module is used to perform a first-stage scan from the maximum outer diameter of the valve body toward the axis based on a two-dimensional point cloud to generate the end face contour point set. The contour point set fusion module is used to convert the scanning position of the first stage to the inner hole axial scan when it crosses the end face edge, generate the inner hole wall contour point set, and fuse it with the end face contour point set to obtain the cross-sectional contour point sequence. The key corner point merging module is used to extract and deduplicate key corner points based on the cross-sectional contour point sequence to obtain geometric segment lines. The semantic classification and correction module is used to classify and correct semantic labels based on geometric segment lines, and obtain the corrected global profile line. The intersection point set acquisition module is used to construct a collision check window and calculate the geometric intersection with the corrected global profile line to obtain the geometric intersection point set; The grinding trajectory generation module is used to obtain the effective processing range based on the geometric intersection point set and generate the grinding trajectory of the target valve body.

[0096] Furthermore, in this embodiment, the functional implementation methods of each functional module correspond one-to-one with the methods described above, and will not be repeated here.

[0097] Example 3 Based on the same inventive concept, the present invention also provides an electronic device, which includes a processor and a memory. The memory stores instructions, which are loaded and executed by the processor to implement the valve body grinding trajectory generation method based on cross-sectional contour lines as in Embodiment 1.

[0098] Based on the same inventive concept, the present invention also provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When the processor executes the program stored in the memory, it is able to implement the valve body grinding trajectory generation method based on the cross-sectional contour line as in Example 1.

[0099] The electronic device may include a processor, a communications interface, a memory, and a communication bus, wherein the processor, communications interface, and memory communicate with each other via the communication bus. The processor can call logical instructions in the memory to execute the valve body grinding trajectory generation method based on cross-sectional contour lines in Embodiment 1.

[0100] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0101] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating valve body grinding trajectory based on cross-sectional contour lines, characterized in that, include: Obtain the original 3D point cloud of the target valve body and convert it into a 2D point cloud set; Based on the two-dimensional point cloud, the first stage of scanning is performed step by step from the maximum outer diameter of the valve body toward the axis to generate the end face contour point set; When the scanning position of the first stage crosses the edge of the end face, it is converted to an axial scan of the inner hole, generating a set of inner hole wall contour points, which is then fused with the set of end face contour points to obtain a sequence of cross-sectional contour points. Based on the cross-sectional contour point sequence, key corner points are extracted and deduplicated to obtain geometric segment lines; Based on the geometric segmented lines, semantic label classification and correction are performed to obtain the corrected global profile lines; Construct a collision check window and calculate its geometric intersection with the corrected global profile line to obtain a set of geometric intersection points; The effective processing range is obtained based on the set of geometric intersection points, and the grinding trajectory of the target valve body is generated.

2. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 1, characterized in that, The method for obtaining a two-dimensional point cloud is as follows: Based on the original 3D point cloud, the rotation axis parameters, including the axis center coordinates and direction vectors, are determined, and a two-dimensional axial-radial coordinate system is constructed. The direction vector is taken as the Z-axis of the two-dimensional axial-radial coordinate system; Based on any target point in the original 3D point cloud, project it onto the Z-axis, and combine the axis center coordinates and the direction vector, calculate its relative distance along the Z-axis direction, which is used as the axial distance; Based on the axis coordinates, the direction vector, and the axial distance, the vertical distance from the target point to the Z-axis is calculated and used as the radial distance; The axial distance and the radial distance are used together to transform any target point in the original three-dimensional point cloud into a plane point in the two-dimensional axial-radial coordinate system, which is then used as the two-dimensional point cloud. All the transformed two-dimensional point clouds together constitute the two-dimensional point cloud set.

3. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 2, characterized in that, Constructing a two-dimensional axial-radial coordinate system specifically includes: Based on the original three-dimensional point cloud, the point cloud data of the topmost preset thickness is selected along the Z-axis direction of the target valve body as the end face local point cloud; Based on the local point cloud of the end face, a plane fitting is performed to obtain the plane equation of the end face; Based on the equation of the end face plane, the plane normal vector is obtained and normalized to obtain the direction vector of the target valve body rotation axis; The local point cloud of the end face is projected onto a defined end face plane and converted into two-dimensional planar points; A pixel-based two-dimensional binary mask image is constructed based on the two-dimensional plane points, and an image contour search algorithm is executed to determine the inner circle contour by utilizing the topological hierarchical inclusion relationship between contours. Based on the contour points of the inner circle contour, a circle is fitted to obtain the center point and the radius of the circle, and then mapped back to three-dimensional space to obtain the spatial coordinates of the center point, which are used as the axis coordinates. The two-dimensional axial-radial coordinate system is constructed based on the direction vector and the axis coordinates.

4. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 3, characterized in that, The method for obtaining the end face contour point set is as follows: The two-dimensional point cloud is divided into multiple radial differential intervals by dividing the radial distance from large to small with a set first fixed step size; For all two-dimensional point clouds falling within the radial differential interval, construct a first density histogram along the Z-axis with a preset axial grid resolution; Based on the first density histogram, the axial span within the radial differential interval is discretized into multiple Z-axis grid buckets, and the number of point clouds falling into each Z-axis grid bucket is counted as the local point cloud density. Based on the local point cloud density, the Z-axis coordinates of the first successful hit on the target valve body end face surface along the Z-axis direction are obtained; Obtain the center distance between the radial micro-partitions currently being scanned, and combine it with the Z-axis coordinate to form the end face hit point; Traverse all the radial differential intervals and generate the end face contour point set based on all the end face hit points.

5. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 4, characterized in that, The sequence of cross-sectional contour points is obtained, specifically including: When the first stage scan reaches a certain radial differential interval, if the local point cloud density corresponding to all Z-axis grid buckets along the Z-axis direction is less than the density threshold, it is determined that the scanning position has crossed the end face edge and entered the inner hole region. The Z coordinate of the previous valid end face hit point is used as the scanning transition point, and the first stage of scanning is immediately terminated, and the second stage of the inner hole axial scanning is automatically switched. Scan along the Z-axis with a set second fixed step size to divide multiple axial depth slices of the inner hole; For the two-dimensional point cloud falling within the axial depth slice of each of the inner holes, a second density histogram is established according to the radial distance from large to small with a preset R-axis grid resolution; Based on the second density histogram, the axial span within the axial depth slice of the inner hole is discretized into multiple R-axis grid buckets. The number of two-dimensional point clouds falling into each of the R-axis grid buckets is counted, and the smallest R-axis grid bucket that is greater than or equal to the density threshold is selected as the inner hole wall hit point at the current depth. When the number of two-dimensional point clouds of all the R-axis grid buckets in a certain inner hole axial depth slice is less than the density threshold, it is determined that the bottom of the inner hole has been reached, the scanning is stopped, the inner hole wall hit points obtained from each inner hole axial depth slice are collected, and the inner hole wall contour point set is generated. According to the actual scanning time sequence, the end face contour point set and the inner hole wall contour point set are connected end to end to splice them to obtain the contour point set. The set of contour points constitutes a complete and ordered sequence of cross-sectional contour points that describes the valve body from the uppermost end face to the inner wall.

6. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 5, characterized in that, The geometric segmentation line is obtained, specifically including: The cross-sectional contour point sequence is divided into multiple contour point sequence segments; The line segment formed by the first and last two points of the current contour point sequence segment is used as the approximation baseline. Traverse all intermediate points within the current contour point sequence segment and calculate the vertical distance from each intermediate point to the approximation baseline; Select the midpoint corresponding to the maximum vertical distance as the candidate point; When the maximum vertical distance is greater than the distance threshold, the candidate point is taken as the key corner point, and the current segment is divided into two sub-sequences using the candidate point as the dividing point. The above solution process is repeated recursively. When the maximum vertical distance is less than or equal to the distance threshold, all intermediate points between the first and last endpoints of the current contour point sequence segment are removed. After the above recursive processing, only the starting point, the ending point, and all the key corner points are retained to obtain the key corner point sequence; Based on connecting any two adjacent points in the key corner point sequence end to end, a continuous geometric segmented line composed of multiple line segments is constructed. A slot swallowing algorithm is introduced to remove duplicates and merge segments in a continuous geometric segment line in a second step, resulting in the geometric segment line after deduplication and merging.

7. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 6, characterized in that, The corrected global profile line is obtained, specifically including: Obtain the directional slope of each target line segment in the geometric segmented line in the two-dimensional axial-radial coordinate system; Set a slope determination threshold; Target line segments with a slope greater than the slope determination threshold are identified as end face feature segments, and end face semantic labels are added to the target line segments. Target line segments with a slope less than or equal to the slope determination threshold are identified as wall feature segments, and wall semantic labels are added to the target line segments. All the end face feature segments and the wall feature segments together form a geometric segmentation line with semantic labels; The discrete geometric segmented lines with semantic labels are connected end to end in sequence to reconstruct a continuous geometric polyline on a two-dimensional plane, which serves as the global profile line. Traverse all feature segments in the global profile line, and align the axial coordinates of all nodes in the end face feature segment to the average value of the axial coordinates of that segment; the wall feature segment retains its original geometric orientation completely, thus obtaining the corrected global profile line.

8. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 7, characterized in that, The set of geometric intersection points is obtained, specifically including: Determine the spatial reference coordinates of the tool under its current evaluation state; At the current evaluation location, a local tangential difference vector is constructed based on the corrected global profile line; Based on the local tangential difference vector, orthogonal rotation and normalization are performed to obtain the scalar component of the projection of the unit normal vector on the radial R-axis. Based on the spatial reference coordinates and the projected scalar components, the radial coordinates of the ideal tool center point are obtained; The collision check window is constructed based on the radial coordinates of the ideal tool center point and the spatial reference coordinates; Obtain the geometric intersection of the collision check window and the corrected global profile line to obtain the geometric intersection point set.

9. The valve body grinding trajectory generation method based on cross-sectional contour lines as described in claim 8, characterized in that, Generating the grinding trajectory of the target valve body specifically includes: Using the radial coordinates of the ideal tool center point in the spatial reference coordinates as the boundary, all intersection points in the geometric intersection point set are divided into an inner intersection point set and an outer intersection point set; Extract the maximum radial coordinate of the inner intersection points based on the set of inner intersection points; Extract the minimum radial coordinates of the outer intersection points based on the set of outer intersection points; Based on the maximum radial coordinate and the tool radius envelope size, the inner safety lower bound is obtained; Based on the minimum radial coordinate and the tool radius envelope size, the outer safety upper bound is obtained; The effective processing range is obtained based on the inner lower safety boundary and the outer upper safety boundary; Based on the geometric segmented lines with semantic tags, and combined with the effective processing range, end face grinding trajectory and wall surface grinding trajectory are generated respectively, which together form the grinding trajectory of the target valve body.

10. A valve body grinding trajectory generation system based on cross-sectional contour lines, used to execute the valve body grinding trajectory generation method based on cross-sectional contour lines as described in any one of claims 1-9, characterized in that, include: The module includes a point cloud conversion module, a contour point set generation module, a contour point set fusion module, a key corner point merging module, a semantic classification and correction module, an intersection point set acquisition module, and a polishing trajectory generation module. The point cloud conversion module is used to acquire the original three-dimensional point cloud of the target valve body and convert it into a two-dimensional point cloud set; The contour point set generation module is used to perform a first-stage scan from the maximum outer diameter of the valve body toward the axis based on the two-dimensional point cloud to generate the end face contour point set. The contour point set fusion module is used to convert the scanning position of the first stage to the inner hole axial scanning when it crosses the end face edge, generate the inner hole wall contour point set, and fuse it with the end face contour point set to obtain the cross-sectional contour point sequence. The key corner point merging module is used to extract and deduplicate key corner points based on the cross-sectional contour point sequence to obtain a geometric segment line. The semantic classification and correction module is used to classify and correct semantic labels based on the geometric segmentation line to obtain a corrected global profile line. The intersection point set acquisition module is used to construct a collision check window and calculate the geometric intersection with the corrected global profile line to obtain the geometric intersection point set; The grinding trajectory generation module is used to obtain the effective processing range based on the geometric intersection point set and generate the grinding trajectory of the target valve body.