Injection mold processing method and system based on industrial robot

By using deep learning and fitting non-uniform rational B-spline curves, the grinding trajectory of injection molds is generated, which solves the problem that existing technologies cannot automatically generate grinding trajectories, and realizes automated grinding path planning and high-quality surface processing.

CN122336739APending Publication Date: 2026-07-03JIANGXI WANGLAI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGXI WANGLAI TECH CO LTD
Filing Date
2026-04-03
Publication Date
2026-07-03

Smart Images

  • Figure CN122336739A_ABST
    Figure CN122336739A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for processing injection molds based on industrial robots, relating to the field of robot processing technology. This application uses a deep learning model to identify and segment point cloud data of a 3D injection mold. The outline is calculated from the obtained annular structural region, and inflection points are identified and connected to construct a grinding curvature tree. The slicing density is adjusted according to curvature changes, enabling more refined grinding path planning even in complex areas. An annular tangent plane is obtained from the virtual curves in the grinding curvature tree. Discrete points are extracted from the annular tangent plane using a hybrid discrete point extraction method to obtain discrete trajectory points, ensuring the continuity and integrity of the injection mold grinding trajectory points. The discrete trajectory points are then sorted by polar angle to generate an ordered annular discrete trajectory point set. A non-uniform rational B-spline curve is used to fit the ordered annular discrete trajectory point set to generate an annular processing trajectory, planning the injection mold grinding path for the industrial robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of robotic processing, and in particular to a method and system for processing injection molds based on industrial robots. Background Technology

[0002] In recent years, traditional CNC machine tools have struggled to adapt to complex curvature variations, resulting in uneven machining accuracy; trajectory planning relies heavily on human experience, leading to low efficiency; insufficient point cloud data processing capabilities affect feature recognition accuracy; and discontinuous robot machining paths are prone to jitter. Furthermore, full-coverage trajectory planning for a single grinding area easily leads to localized repetitive grinding, restricting mold processing quality, and the need for frequent switching of machining parameters due to differences in geometric features during grinding disrupts the continuity of the process.

[0003] Currently, Chinese invention patent application CN202310175381.6 discloses a method for optimizing robot grinding trajectories based on digital twin and visual communication technologies. This method includes: generating a digital model of the equipment in the physical grinding unit; generating a digital model of the workpiece being processed from a standard workpiece; mapping the equipment information of the physical grinding unit to the twin environment model in real time using virtual-real synchronization technology; comparing the pose information of the workpiece to be processed with the pose information of the standard workpiece in the grinding unit to correct the robot's initial processing path; analyzing the robot's processing status in real time; determining whether to change the robot's real-time processing path based on the contact stress state at the grinding position; comparing the robot's equipment movements with the movements of the robot's digital model, enabling the robot to correct the grinding trajectory in real time according to the workpiece condition, improving the automation level of the polishing process, and reducing grinding errors. However, related technologies cannot achieve an equivalent replacement of manual teaching with automated trajectory generation, cannot automatically adjust the slicing density according to curvature changes, and cannot guarantee the continuity and integrity of the grinding trajectory points. Summary of the Invention

[0004] The technical problem solved by this invention is that related technologies cannot achieve an equivalent replacement for manual teaching by automatically generating injection mold grinding trajectories, cannot automatically adjust the slicing density according to curvature changes, and cannot guarantee the continuity and integrity of grinding trajectory points.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] A method for processing injection molds based on industrial robots includes the following steps:

[0007] Step S1: The point cloud data of the obtained 3D injection mold is identified and segmented using a deep learning model to obtain the annular structure region;

[0008] Step S2: Calculate the outline of the annular structure region, identify the inflection points by identifying the endpoints of the outline and connect them to construct a grinding bend tree, and obtain the annular tangent plane through the virtual curve in the grinding bend tree.

[0009] Step S3: Discrete points are extracted from the annular tangent plane using a hybrid discrete point extraction method to obtain discrete trajectory points. Based on the axis of rotation, the discrete trajectory points are sorted by polar angle to generate an ordered set of annular discrete trajectory points.

[0010] Step S4: Fit the ordered circular discrete trajectory point set using a non-uniform rational B-spline curve to generate a circular processing trajectory. Based on the circular processing trajectory, plan the injection mold grinding path for the industrial robot.

[0011] Preferably, step S1 specifically includes:

[0012] Step S11: Obtain the three-dimensional injection mold point cloud data, and preprocess the three-dimensional injection mold point cloud data, including noise reduction and downsampling;

[0013] Step S12: Use a deep learning model to identify and segment the preprocessed 3D injection mold point cloud data to obtain the annular structure region, and calculate the directional bounding box of the 3D injection mold point cloud data to obtain the rotation axis, which is defined as the normal vector of the projection plane.

[0014] Preferably, step S2 specifically includes:

[0015] Step S21: Calculate the axis-aligned bounding box of the annular structure region along the rotation axis direction, and use the minimum and maximum boundaries of the axis-aligned bounding box along the rotation axis direction as the start and end positions to obtain the total length of the slice;

[0016] Based on the tool size of the end effector and the preset trajectory coverage, the slice spacing is calculated. Based on the total slice length and the slice spacing, the number of slice planes is obtained. Starting from the starting position, slice planes are generated at equal intervals along the rotation axis with the slice spacing as the distance. The intersection line between the slice plane and the annular structure area is extracted to form the contour line.

[0017] Step S22: Traverse the endpoints on the contour line, identify multi-level inflection points by reversing the turning direction of the endpoints, and form segmented virtual curves by connecting the endpoints and the multi-level inflection points to obtain the polishing curved tree.

[0018] Step S23: Obtain the starting point and ending point of the virtual curve, calculate the vector pointing from the starting point to the ending point, project the vector pointing from the starting point to the ending point onto a plane perpendicular to the rotation axis, normalize the projected vector to obtain the dominant tangential vector, perform a cross product between the rotation axis and the dominant tangential vector, normalize the cross product vector, and use the obtained unit vector as the normal vector direction of the annular tangential plane. Along the rotation axis direction, determine the spatial position coordinates of the annular tangential plane according to a preset slicing strategy.

[0019] A circular tangent plane is formed by the spatial position coordinates and the direction of the normal vector.

[0020] Preferably, traversing the points on the contour line, identifying multi-level inflection points based on changes in the turning direction of the points, and forming segmented virtual curves by connecting the endpoints and the multi-level inflection points, the specific steps for obtaining the polishing curved tree include:

[0021] The start and end points of the contour line are marked as level 0 endpoints, and the contour line is defined as a level 0 virtual curve. The level 0 virtual curve and other levels of virtual curves are processed recursively. The recursion specifically includes:

[0022] Traverse the points on the current level input virtual curve, identify the current level inflection point by reversing the turning direction of the point, connect the endpoints of the current level input virtual curve with the current level inflection point, and connect the adjacent inflection points of the current level to form the next level virtual curve;

[0023] When all points on the virtual curve of the current level input have been traversed, the virtual curve of the current level output is used as the virtual curve of the input to be traversed in the next level. When no new inflection point can be identified in the current input virtual curve, the traversal ends. The virtual curves, endpoints and inflection points of all levels output are obtained. The endpoints and inflection points of all levels are used as tree nodes and all virtual curves are used as edges of the tree to form a polished curved tree.

[0024] In this tree, level 0 endpoints form the root node, and inflection points of higher levels than level 0 form the child nodes.

[0025] Reversal of steering direction includes the local steering direction at the current point being opposite to the local steering direction at the previous point, and the absolute value of the cumulative steering angle of the curve segment where the current point is located exceeding 180 degrees.

[0026] Preferably, the discrete trajectory points are obtained by extracting discrete points from the annular tangent plane using a hybrid discrete point extraction method, specifically including:

[0027] Extract the inner edge point cloud and outer edge point cloud of the annular tangent plane, calculate the geometric center of the inner edge point cloud and outer edge point cloud, establish a polar coordinate system with the geometric center as the origin, transform the inner edge point cloud and outer edge point cloud to the polar coordinate system, and obtain the angle radius parameter space.

[0028] Within the angle interval of the angle radius parameter space, the maximum value of the extreme radius of the inner edge point cloud and the minimum value of the extreme radius of the outer edge point cloud are extracted respectively. The minimum value of the difference between the extreme radius of the inner edge and the extreme radius of the outer edge in all angle intervals is calculated, and a radius difference threshold is set, which is twice the minimum value.

[0029] Traverse each angle interval, determine the relationship between the difference between the inner edge radius and the outer edge radius of the angle interval and the radius difference threshold, obtain the trajectory points, and transform all trajectory points generated in the angle radius parameter space to Cartesian space to obtain a discrete trajectory point set.

[0030] Preferably, the relationship between the difference between the inner and outer edge radii within the angle interval and the radius difference threshold is determined, and the determination logic specifically includes:

[0031] When the difference between the inner edge radius and the outer edge radius is less than or equal to the radius difference threshold, the midpoint between the point with the maximum value of the inner edge radius and the point with the minimum value of the outer edge radius is taken as the trajectory point of the angle interval.

[0032] When the difference between the inner edge radius and the outer edge radius is greater than the radius difference threshold, the radius of the point with the maximum inner edge radius is expanded outward to half of the minimum radius difference, and the point obtained after expansion is used as the trajectory point of the angle interval.

[0033] Preferably, the polar angle sorting process specifically includes:

[0034] The intersection of the rotation axis and the projection plane perpendicular to the rotation axis is taken as the origin of the polar coordinates;

[0035] Within the projection plane, a fixed direction originating from the polar coordinate origin is selected as the polar angle reference direction. The angle between the position vector of each discrete trajectory point projected onto the projection plane and the polar angle reference direction is calculated, and the expression is as follows:

[0036] ;

[0037] in, The angle between the position vector of the discrete trajectory point projected onto the projection plane and the polar reference direction. The origin of polar coordinates, The polar reference direction For discrete trajectory points, To find the modulus formula, Let be the position vector of the discrete trajectory point after it is projected onto the projection plane. It is the dot product of the position vector and the angular reference direction;

[0038] Based on the size of the included angle, all the discrete trajectory points are sorted from smallest to largest to form an ordered circular set of discrete trajectory points.

[0039] Preferably, the process of generating a circular machining trajectory specifically includes:

[0040] The ordered circular discrete trajectory point set is defined as the control vertex of the non-uniform rational B-spline curve. The degree of the non-uniform rational B-spline curve is set to cubic, and a weight factor is assigned to each control vertex. The corresponding node vector is calculated and generated based on the spatial distribution of the control vertex using the chord length accumulation parameterization method.

[0041] Based on the control vertices, node vectors, weight factors, and curve order, the B-spline basis functions calculated using the de Boer-Cox recursive formula are used to calculate the curve, resulting in a non-uniform rational B-spline curve, which generates a circular machining trajectory. The mathematical expression of the non-uniform rational B-spline curve is as follows:

[0042] ;

[0043] in, As a weighting factor, To control the vertices, For the degree of the curve, For B-spline basis functions, To control the maximum index value of the vertex;

[0044] The first and last weighting factors in the weighting factors are greater than zero.

[0045] Preferably, based on the circular machining trajectory, the injection mold grinding path of the industrial robot is planned:

[0046] Based on the circular machining trajectory, the first derivative of the circular machining trajectory curve at each path point is calculated to obtain the tool forward direction of the end effector;

[0047] Calculate the geometric normal vector of the surface of the annular structure region to obtain the tool axis of the end effector;

[0048] The cross product of the tool's forward direction and the tool's axial direction is used to obtain the tool radial direction of the end effector;

[0049] The tool's forward direction, radial direction, and axial direction are combined and spliced ​​to form the attitude matrix of the end effector at the path point.

[0050] An injection mold processing system based on an industrial robot includes a segmentation module, a parsing module, an extraction module, and a generation module.

[0051] The segmentation module is used to identify and segment the acquired 3D injection mold point cloud data through a deep learning model to obtain a ring-shaped structure region;

[0052] The parsing module is used to calculate the outline of the annular structure region, identify the inflection points by identifying the endpoints of the outline and connect them to construct a polishing bend tree, and obtain the annular tangent plane through the virtual curve in the polishing bend tree.

[0053] The extraction module is used to extract discrete points from the annular tangent plane using a hybrid discrete point extraction method to obtain discrete trajectory points. Based on the axis of rotation, the discrete trajectory points are sorted by polar angle to generate an ordered set of annular discrete trajectory points.

[0054] The generation module is used to fit the ordered circular discrete trajectory point set with a non-uniform rational B-spline curve to generate a circular processing trajectory, and based on the circular processing trajectory, to plan the injection mold grinding path of the industrial robot.

[0055] The beneficial effects of this invention are as follows: Employing an adaptive slicing method based on a grinding curvature tree, the slicing density can be automatically adjusted according to curvature changes, resulting in more refined grinding path planning in complex areas while ensuring processing efficiency in flat areas. Furthermore, the use of hybrid discrete point extraction technology effectively guarantees the continuity and integrity of the grinding trajectory points in the injection mold, avoiding jitter and pauses during processing. By fitting non-uniform rational B-spline curves to generate smooth and continuous grinding trajectories, the surface quality of the injection mold surface is improved, reducing the reliance on operator experience in traditional methods and achieving an equivalent replacement for manual teaching by automatically generating injection mold grinding trajectories. Attached Figure Description

[0056] Figure 1 This is a flowchart of an injection mold processing method based on an industrial robot, provided as an embodiment of the present invention. Detailed Implementation

[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0058] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for processing injection molds based on industrial robots is provided, comprising the following steps:

[0059] Step S1: The point cloud data of the obtained 3D injection mold is identified and segmented using a deep learning model to obtain the annular structure region;

[0060] Step S2: Calculate the outline of the annular structure region, identify the inflection points by identifying the endpoints of the outline and connect them to construct a polishing curved tree, and obtain the annular tangent plane by polishing the virtual curve in the curved tree.

[0061] Step S3: Discrete points are extracted from the annular tangent plane using a hybrid discrete point extraction method to obtain discrete trajectory points. Based on the axis of rotation, the discrete trajectory points are sorted by polar angle to generate an ordered set of annular discrete trajectory points.

[0062] Step S4: Fit the ordered circular discrete trajectory point set with a non-uniform rational B-spline curve to generate a circular processing trajectory. Based on the circular processing trajectory, plan the injection mold grinding path of the industrial robot.

[0063] This invention employs an adaptive slicing method based on a grinding curvature tree, which automatically adjusts the slicing density according to curvature changes. This results in more refined grinding path planning in complex areas while ensuring processing efficiency in flat areas. Furthermore, the use of hybrid discrete point extraction technology effectively guarantees the continuity and integrity of the grinding trajectory points in the injection mold, avoiding jitter and pauses during processing. By fitting non-uniform rational B-spline curves, a smooth and continuous grinding trajectory is generated, improving the surface quality of the injection mold surface and reducing the reliance on operator experience compared to traditional methods. This achieves an equivalent replacement for manual teaching by automatically generating the injection mold grinding trajectory.

[0064] In specific implementation, step S1 includes:

[0065] Step S11: Obtain the point cloud data of the 3D injection mold and preprocess the point cloud data of the 3D injection mold. The preprocessing includes noise reduction and downsampling.

[0066] Step S12: Use a deep learning model to identify and segment the preprocessed 3D injection mold point cloud data to obtain the annular structure region, and calculate the directional bounding box of the 3D injection mold point cloud data to obtain the rotation axis, which is defined as the normal vector of the projection plane.

[0067] It should be noted that the preprocessing of the 3D injection mold point cloud data specifically includes: denoising using statistical filtering algorithms; calculating the average distance between each point in the point cloud and its K nearest neighbors; calculating the global mean and standard deviation of all average distances in the entire point cloud; setting a distance threshold; and removing all points whose average distance exceeds this threshold as outliers. Furthermore, voxel mesh downsampling is used to reduce data redundancy by enclosing the entire point cloud with a 3D voxel mesh. Within each non-empty voxel mesh, the centroid of all points in the 3D voxel mesh is used to replace all points within that mesh.

[0068] The calculation of the orientation bounding box of point cloud data to obtain the axis of rotation specifically includes: performing principal component analysis on the point cloud of the annular structure region and calculating its orientation bounding box. The three principal direction vectors of the orientation bounding box correspond to the shortest axis, the intermediate axis, and the longest axis, respectively. The direction of the longest axis is identified and defined as the orientation vector of the axis of rotation of the annular structure.

[0069] The specific steps for identifying and segmenting the preprocessed 3D injection mold point cloud using a deep learning model include: converting the point cloud coordinates into feature vectors through an embedding layer; calculating the global dependencies between points through the self-attention mechanism in the encoder; capturing the closed distribution features of the ring structure; enhancing edge discrimination capabilities by combining a local feature extraction module; and segmenting the ring structure region by upsampling the decoder and outputting the semantic label of each point from the classification head.

[0070] The calculation of the orientation bounding box of the 3D injection mold point cloud data to obtain the rotation axis specifically includes: firstly, calculating the covariance matrix of the point cloud of the annular structure region and performing eigenvalue decomposition to obtain three mutually orthogonal eigenvectors. The eigenvector corresponding to the largest eigenvalue represents the direction in which the point cloud distribution is most concentrated, and it is defined as the direction of the longest axis of the orientation bounding box, which is the direction of the rotation axis.

[0071] The projection plane is determined by a base point and a normal vector. Defining the direction vector of the rotation axis directly as the normal vector of the projection plane means that the projection plane is perpendicular to the rotation axis. When sorting discrete trajectory points by polar angle based on the rotation axis, the intersection of the rotation axis and the projection plane perpendicular to the rotation axis is defined as the origin of polar coordinates. This results in a projection plane that passes through the origin of polar coordinates and has the rotation axis as its normal vector.

[0072] In specific implementation, step S2 includes:

[0073] Step S21: Calculate the axis-aligned bounding box of the annular structure region along the rotation axis direction, and use the minimum and maximum boundaries of the axis-aligned bounding box along the rotation axis direction as the start and end positions to obtain the total length of the slice;

[0074] Based on the tool size of the end effector and the preset trajectory coverage, the slice spacing is calculated. Based on the total slice length and the slice spacing, the number of slice planes is obtained. Starting from the starting position, slice planes are generated at equal intervals along the rotation axis with the slice spacing as the distance. The intersection line between the slice plane and the annular structure area is extracted to form the contour line.

[0075] Step S22: Traverse the endpoints on the contour line, identify multi-level inflection points by reversing the turning direction of the endpoints, and form segmented virtual curves by connecting the endpoints and multi-level inflection points to obtain the polishing curved tree.

[0076] Step S23: Obtain the starting point and ending point of the virtual curve, calculate the vector pointing from the starting point to the ending point, project the vector pointing from the starting point to the ending point onto a plane perpendicular to the rotation axis, normalize the projected vector to obtain the dominant tangential vector, perform a cross product between the rotation axis and the dominant tangential vector, normalize the cross product vector, and use the obtained unit vector as the normal vector direction of the annular tangential plane. Along the rotation axis direction, determine the spatial position coordinates of the annular tangential plane according to the preset slicing strategy.

[0077] A circular tangent plane is formed by the spatial position coordinates and the direction of the normal vector.

[0078] It should be noted that the tool size of the end effector and the preset trajectory coverage rate refer to determining the spacing between adjacent slice planes based on the effective working width of the physical tool performing the specific task and the overlap ratio of adjacent paths set in the process requirements. The tool size determines the maximum coverage width of a single path, while the trajectory coverage rate clarifies the degree of overlap between adjacent paths. The calculation relationship is: slice spacing equals tool size multiplied by one minus trajectory coverage rate.

[0079] Extract the intersection line between the slice plane and the ring structure region to form a contour line set. Find all point cloud data whose spatial distance from the slice plane is less than a set threshold to form a neighboring point set. Orthogonally project each point in the neighboring point set onto the current slice plane to obtain a series of two-dimensional projection points. Sort and connect the two-dimensional projection points to form one or more closed contour lines. Collect the contour lines of all slice planes to form a contour line set.

[0080] The preset slicing strategy is to automatically reduce the slice spacing in areas with shallow node depth and high bending strength in the curved tree, and to automatically increase the slice spacing in areas with deep node depth and low bending strength in the curved tree.

[0081] Based on the axis of rotation and the virtual curve in the grinding bend tree, the dominant tangential vector of the contour line in this region is calculated. The specific process is as follows: select a high-level virtual curve from the grinding bend tree, obtain the coordinates of the start point and end point of the virtual curve in three-dimensional space, calculate the direction vector from the start point to the end point, project this direction vector onto a plane perpendicular to the axis of rotation, and normalize the vector obtained after projection to finally obtain the dominant tangential vector.

[0082] In practice, the points on the contour line are traversed, and multi-level inflection points are identified based on changes in the turning direction of the points. By connecting the endpoints and multi-level inflection points, segmented virtual curves are formed, resulting in the polishing of the curved tree. Specifically, this includes:

[0083] The start and end points of the contour line are marked as level 0 endpoints, and the contour line is defined as a level 0 virtual curve. The level 0 virtual curve and other levels of virtual curves are then processed recursively. The recursion specifically includes:

[0084] Traverse the points on the current level input virtual curve, identify the current level inflection point by reversing the turning direction of the point, connect the endpoints of the current level input virtual curve with the current level inflection point, and connect the adjacent inflection points of the current level to form the next level virtual curve;

[0085] When all points on the virtual curve of the current level input have been traversed, the virtual curve of the current level output is used as the virtual curve of the input to be traversed in the next level. When no new inflection point can be identified in the current input virtual curve, the traversal ends. The virtual curves, endpoints and inflection points of all levels output are obtained. The endpoints and inflection points of all levels are used as tree nodes and all virtual curves are used as edges of the tree to form a polished curved tree.

[0086] In this tree, level 0 endpoints form the root node, and inflection points of higher levels than level 0 form the child nodes.

[0087] Reversal of steering direction includes the local steering direction at the current point being opposite to the local steering direction at the previous point, and the absolute value of the cumulative steering angle of the curve segment where the current point is located exceeding 180 degrees.

[0088] It should be noted that the recursive process involves traversing all discrete points along the contour line and calculating the turning direction of each point. When a reversal of the turning direction of a point is detected, the point is marked as a Level 1 inflection point. All adjacent Level 1 inflection points and Level 1 inflection points are connected to Level 0 endpoints to form segmented Level 1 virtual curves. Each segment of the Level 1 virtual curve represents an independent Level 1 bending feature.

[0089] Each segment of the Level 1 virtual curve is used as a new input contour line. The traversal and recognition process of step S312 is repeated. The turning direction reversal points identified in the process are marked as Level 2 inflection points. Connect adjacent Level 2 inflection points and the endpoints of the Level 2 inflection points and the Level 1 virtual curves to form segmented Level 2 virtual curves.

[0090] Continue using each level 2 virtual curve as input, repeat the identification and connection process of steps S312 and S313, and recursively construct level 3, level 4 and up to level K virtual curves and inflection points until no new inflection points can be identified in a certain level of virtual curve.

[0091] By recursively identifying the reversal points of contour turning directions and constructing a grinding curvature tree, and dynamically adjusting the slice spacing based on the node depth and curvature intensity in the grinding curvature tree, the path is automatically densified in areas of drastic curvature change to ensure processing accuracy, while the path is sparsed in gentle areas to improve efficiency. This achieves hierarchical deconstruction and structured representation of complex circular contours. Compared with traditional methods based on uniform slicing or fixed parameters, it can adaptively analyze based on the actual geometric features of the contour: by identifying multi-level inflection points, complex contours are decomposed into curvature units of different levels, establishing a complete topological description from macroscopic contours to microscopic features. This not only endows the contours provided by point cloud segmentation with accurate geometric semantics, but also provides direct data support for adaptive slicing strategies.

[0092] In specific implementation, the discrete trajectory points are obtained by extracting discrete points from the annular tangent plane using a hybrid discrete point extraction method, specifically including:

[0093] Extract the inner and outer edge point clouds of the annular tangent plane, calculate the geometric center of the inner and outer edge point clouds, establish a polar coordinate system with the geometric center as the origin, transform the inner and outer edge point clouds to the polar coordinate system, and obtain the angle radius parameter space.

[0094] Within the angle interval of the angle radius parameter space, extract the maximum value of the extreme radius of the inner edge point cloud and the minimum value of the extreme radius of the outer edge point cloud respectively. Calculate the minimum value of the difference between the extreme radius of the inner edge and the extreme radius of the outer edge in all angle intervals, and set a radius difference threshold, which is twice the minimum value.

[0095] Traverse each angle interval, determine the relationship between the difference between the inner edge radius and the outer edge radius of the angle interval and the radius difference threshold, obtain the trajectory points, and transform all trajectory points generated in the angle radius parameter space to Cartesian space to obtain a discrete trajectory point set.

[0096] It should be noted that, compared with traditional methods that simply extract the center line or offset contour, this application introduces an adaptive judgment of the annular region width. By dynamically comparing the radial distances of the inner and outer edges in the polar coordinate parameter space, and setting an adaptive threshold based on twice the minimum gap, the narrow and wide regions of the annular structure are distinguished. This overcomes the inherent defect of traditional methods where, when the width of the annular structure is uneven, the trajectory points may be too close to one side edge or even interfere with the contour. High-density trajectory point calibration is performed on the generated abrupt change areas, ensuring that the surface finish requirements are met after polishing, without damaging the original surface curvature characteristics of the injection mold.

[0097] This method, through dynamic judgment and adaptive strategies, generates a trajectory point set that closely matches the actual geometric centerline of the ring structure, avoiding under-machining or over-cutting problems caused by trajectory misalignment. It can also handle various irregular shapes, bringing it from an ideal model to engineering practice. By setting a dynamic threshold related to point cloud features, it ensures stable and reliable trajectory points can be extracted under different workpieces and point cloud densities, significantly improving the consistency of grinding quality.

[0098] Transforming all trajectory points generated in the angle radius parameter space to Cartesian space specifically involves: for each trajectory point in the parameter space, calculating its Cartesian coordinates on the two-dimensional projection plane based on its polar coordinates using a coordinate transformation expression. The coordinate transformation expression is as follows:

[0099] ;

[0100] in, Polar radius, It is the polar angle.

[0101] In specific implementation, the relationship between the difference between the inner and outer edge polar radii within the angle interval and the radius difference threshold is determined. The determination logic specifically includes:

[0102] When the difference between the inner edge radius and the outer edge radius is less than or equal to the radius difference threshold, the midpoint between the point with the maximum value of the inner edge radius and the point with the minimum value of the outer edge radius is taken as the trajectory point of the angle interval.

[0103] When the difference between the inner edge radius and the outer edge radius is greater than the radius difference threshold, the radius of the point with the maximum inner edge radius is expanded outward to half of the minimum radius difference, and the point obtained after expansion is taken as the trajectory point of the angle interval.

[0104] It should be noted that, based on the judgment, when the difference between the inner and outer radii is less than or equal to a threshold, it indicates that the annular region corresponding to that angle interval is relatively narrow or has a uniform thickness. In this case, taking the midpoint between the inner and outer edge points as the trajectory point is the most direct and effective method, ensuring that the generated trajectory accurately follows the geometric center line of the annular region. This guarantees that in these regions, the tool can process at the most ideal position, avoiding over-cutting or under-cutting on one side due to trajectory deviation.

[0105] When the difference between the inner and outer radii exceeds a threshold, it indicates that the angular range may correspond to an open, wide area or a deep groove. If the midpoint is still taken at this point, the trajectory point may be suspended far from the actual material surface, causing the tool to be unable to effectively contact the workpiece at this location, resulting in missed machining.

[0106] The outward expansion operation specifically includes: keeping the polar angle of the point with the maximum value of the inner edge polar radius unchanged in the polar coordinate system, increasing its polar radius value by half of the minimum value of the polar radius difference, thereby obtaining the polar coordinates of the expanded trajectory point.

[0107] In practice, the polar angle sorting process specifically includes:

[0108] The point where the axis of rotation intersects with the projection plane perpendicular to the axis of rotation is taken as the origin of the polar coordinates;

[0109] Within the projection plane, a fixed direction originating from the polar coordinate origin is selected as the polar reference direction. The angle between the position vector of each discrete trajectory point projected onto the projection plane and the polar reference direction is calculated using the following expression:

[0110] ;

[0111] in, Let be the angle between the position vector of the discrete trajectory point projected onto the projection plane and the polar reference direction. The origin of polar coordinates, The polar reference direction For discrete trajectory points, To find the modulus formula, Let be the position vector of the discrete trajectory point after it is projected onto the projection plane. It is the dot product of the position vector and the angular reference direction;

[0112] Based on the size of the included angle, all discrete trajectory points are sorted from smallest to largest to form an ordered circular set of discrete trajectory points.

[0113] It should be noted that by mapping three-dimensional discrete points to a two-dimensional plane through polar coordinate transformation and sorting them by polar angle, the unidirectional continuous ordered point set generated by this process ensures the geometric correctness of the subsequent non-uniform rational B-spline curve fitting, guarantees the closure and motion continuity of the robot's processing trajectory, and effectively avoids the problems of cross-over and abrupt changes in direction of the processing path.

[0114] In practice, the process of generating a circular machining trajectory includes:

[0115] The ordered circular discrete trajectory point set is defined as the control vertex of the non-uniform rational B-spline curve. The degree of the non-uniform rational B-spline curve is set to cubic, and a weight factor is assigned to each control vertex. The corresponding node vector is calculated and generated based on the spatial distribution of the control vertex using the chord length accumulation parameterization method.

[0116] Based on the control vertices, node vectors, weight factors, and curve degree, the B-spline basis function calculated using the de Boer-Cox recursive formula is used to calculate the curve, resulting in a non-uniform rational B-spline curve, which generates a circular machining trajectory. The mathematical expression of the non-uniform rational B-spline curve is:

[0117] ;

[0118] in, As a weighting factor, To control the vertices, For the degree of the curve, For B-spline basis functions, To control the maximum index value of the vertex;

[0119] The first and last weighting factors in the weighting factors are greater than zero.

[0120] It should be noted that, in order to ensure that the denominator of the rational B-spline curve is not zero, while maintaining the convex hull property and preventing the curve from degenerating into a single point due to the weight factor, a constraint condition for the weight factor is set. The constraint condition is that the first weight factor and the last weight factor in the weight factor are greater than zero.

[0121] Curve calculations are performed using the B-spline basis functions obtained through the de Boer-Cox recursive formula. The B-spline basis functions are defined by the nodal vectors, and their calculation expression is:

[0122] ;

[0123] in, Let the curve be of degree, when When the value is 0, the standardized B-spline basis function has a value of 1 on the node interval [ui, ui+1], otherwise it has a value of 0, and the node vector is... , .

[0124] By fitting an ordered discrete trajectory point set to a cubic rational B-spline curve, the generated circular machining trajectory mathematically guarantees the continuity of the second derivative. This means that as the robot's end effector moves along this trajectory, its position, velocity, and acceleration are all continuously changing, fundamentally eliminating jitter, impact, and abrupt changes during motion. This is crucial for high-precision grinding processes in injection molds, effectively avoiding surface chatter caused by discontinuous acceleration and significantly improving the robot's motion stability and service life.

[0125] In practice, the grinding path for the injection mold of the industrial robot is planned based on the circular processing trajectory:

[0126] Based on the circular machining trajectory, the first derivative of the circular machining trajectory curve at each path point is calculated to obtain the tool forward direction of the end effector;

[0127] Calculate the geometric normal vector of the surface of the annular structure region to obtain the tool axis of the end effector;

[0128] The cross product of the tool's forward direction and the tool's axial direction is used to obtain the tool radial direction of the end effector.

[0129] The tool's forward direction, radial direction, and axial direction are combined and spliced ​​to form the attitude matrix of the end effector at the path point.

[0130] It should be noted that, based on the circular machining trajectory, calculating the first derivative of the circular machining trajectory curve at each path point to obtain the tool forward direction of the end effector specifically includes: for the circular machining trajectory, at the parameter value corresponding to the path point, taking the first derivative of the curve function to obtain the tangent vector at that point, normalizing this tangent vector, and obtaining the direction is the tool forward direction, i.e., the X-axis.

[0131] Calculating the geometric normal vector of the surface of the annular structure region to obtain the tool axis of the end effector specifically includes: searching for the K nearest neighbors of the path point in the 3D point cloud of the annular structure region to form a local neighborhood point set; performing principal component analysis on the local point set to obtain three eigenvectors; the eigenvector corresponding to the minimum eigenvalue represents the direction of the minimum change of the local surface, i.e., the normal vector estimate of the path point; and defining the opposite direction of this external geometric normal vector as the tool axis, i.e., the Z-axis, according to the machining requirements.

[0132] The tool's radial direction is the Y-axis. Through three mutually perpendicular unit vectors, the robot's end effector's attitude matrix at each path point is formed, precisely controlling the robot's injection mold grinding path and tool orientation in three-dimensional space.

[0133] Example 2 is another embodiment of the present invention. This embodiment differs from the first embodiment in that it provides an injection mold processing system based on an industrial robot, including a segmentation module, a parsing module, an extraction module, and a generation module.

[0134] The segmentation module is used to identify and segment the acquired 3D injection mold point cloud data through a deep learning model to obtain the annular structure region;

[0135] The parsing module is used to calculate the outline of the annular structure region, identify the inflection points by identifying the endpoints of the outline and connect them to construct a polishing curved tree, and obtain the annular tangent plane by the virtual curve in the polishing curved tree.

[0136] The extraction module is used to extract discrete points from the annular tangent plane using a hybrid discrete point extraction method to obtain discrete trajectory points. Based on the axis of rotation, the discrete trajectory points are sorted by polar angle to generate an ordered set of annular discrete trajectory points.

[0137] The generation module is used to fit an ordered circular discrete trajectory point set with a non-uniform rational B-spline curve to generate a circular machining trajectory. Based on the circular machining trajectory, the grinding path of the injection mold of the industrial robot is planned.

[0138] This invention employs an adaptive slicing method based on a grinding curvature tree, which automatically adjusts the slicing density according to curvature changes. This results in more refined grinding path planning in complex areas while ensuring processing efficiency in flat areas. Furthermore, the use of hybrid discrete point extraction technology effectively guarantees the continuity and integrity of the grinding trajectory points in the injection mold, avoiding jitter and pauses during processing. By fitting non-uniform rational B-spline curves, a smooth and continuous grinding trajectory is generated, improving the surface quality of the injection mold surface and reducing the reliance on operator experience compared to traditional methods. This achieves an equivalent replacement for manual teaching by automatically generating the injection mold grinding trajectory.

[0139] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

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

Claims

1. A method for processing injection molds based on industrial robots, characterized in that, Includes the following steps: Step S1: The point cloud data of the obtained 3D injection mold is identified and segmented using a deep learning model to obtain the annular structure region; Step S2: Calculate the outline of the annular structure region, identify the inflection points by identifying the endpoints of the outline and connect them to construct a grinding bend tree, and obtain the annular tangent plane through the virtual curve in the grinding bend tree. Step S3: Discrete points are extracted from the annular tangent plane using a hybrid discrete point extraction method to obtain discrete trajectory points. Based on the axis of rotation, the discrete trajectory points are sorted by polar angle to generate an ordered set of annular discrete trajectory points. Step S4: Fit the ordered circular discrete trajectory point set using a non-uniform rational B-spline curve to generate a circular processing trajectory. Based on the circular processing trajectory, plan the injection mold grinding path for the industrial robot.

2. The injection mold processing method based on an industrial robot as described in claim 1, characterized in that, Step S1 specifically includes: Step S11: Obtain the three-dimensional injection mold point cloud data, and preprocess the three-dimensional injection mold point cloud data, including noise reduction and downsampling; Step S12: Use a deep learning model to identify and segment the preprocessed 3D injection mold point cloud data to obtain the annular structure region, and calculate the directional bounding box of the 3D injection mold point cloud data to obtain the rotation axis, which is defined as the normal vector of the projection plane.

3. The injection mold processing method based on an industrial robot as described in claim 2, characterized in that, Step S2 specifically includes: Step S21: Calculate the axis-aligned bounding box of the annular structure region along the rotation axis direction, and use the minimum and maximum boundaries of the axis-aligned bounding box along the rotation axis direction as the start and end positions to obtain the total length of the slice; Based on the tool size of the end effector and the preset trajectory coverage, the slice spacing is calculated. Based on the total slice length and the slice spacing, the number of slice planes is obtained. Starting from the starting position, slice planes are generated at equal intervals along the rotation axis with the slice spacing as the distance. The intersection line between the slice plane and the annular structure area is extracted to form the contour line. Step S22: Traverse the endpoints on the contour line, identify multi-level inflection points by reversing the turning direction of the endpoints, and form segmented virtual curves by connecting the endpoints and the multi-level inflection points to obtain the polishing curved tree. Step S23: Obtain the starting point and ending point of the virtual curve, calculate the vector pointing from the starting point to the ending point, project the vector pointing from the starting point to the ending point onto a plane perpendicular to the rotation axis, normalize the projected vector to obtain the dominant tangential vector, perform a cross product between the rotation axis and the dominant tangential vector, normalize the cross product vector, and use the obtained unit vector as the normal vector direction of the annular tangential plane. Along the rotation axis direction, determine the spatial position coordinates of the annular tangential plane according to the preset slicing strategy. A circular tangent plane is formed by the spatial position coordinates and the direction of the normal vector.

4. The injection mold processing method based on an industrial robot as described in claim 3, characterized in that, Traversing the points on the contour line, identifying multi-level inflection points based on changes in the turning direction of the points, and forming segmented virtual curves by connecting the endpoints and the multi-level inflection points, the specific process of obtaining the polishing curved tree includes: The start and end points of the contour line are marked as level 0 endpoints, and the contour line is defined as a level 0 virtual curve. The level 0 virtual curve and other levels of virtual curves are processed recursively. The recursion specifically includes: Traverse the points on the current level input virtual curve, identify the current level inflection point by reversing the turning direction of the point, connect the endpoints of the current level input virtual curve with the current level inflection point, and connect the adjacent inflection points of the current level to form the next level virtual curve; When all points on the virtual curve of the current level input have been traversed, the virtual curve of the current level output is used as the virtual curve of the input to be traversed in the next level. When no new inflection point can be identified in the current input virtual curve, the traversal ends. The virtual curves, endpoints and inflection points of all levels output are obtained. The endpoints and inflection points of all levels are used as tree nodes and all virtual curves are used as edges of the tree to form a polished curved tree. In this tree, level 0 endpoints form the root node, and inflection points of higher levels than level 0 form the child nodes. Reversal of steering direction includes the local steering direction at the current point being opposite to the local steering direction at the previous point, and the absolute value of the cumulative steering angle of the curve segment where the current point is located exceeding 180 degrees.

5. The injection mold processing method based on an industrial robot as described in claim 4, characterized in that, The discrete trajectory points are obtained by extracting discrete points from the annular tangent plane using a hybrid discrete point extraction method, specifically including: Extract the inner edge point cloud and outer edge point cloud of the annular tangent plane, calculate the geometric center of the inner edge point cloud and outer edge point cloud, establish a polar coordinate system with the geometric center as the origin, transform the inner edge point cloud and outer edge point cloud to the polar coordinate system, and obtain the angle radius parameter space. Within the angle interval of the angle radius parameter space, the maximum value of the extreme radius of the inner edge point cloud and the minimum value of the extreme radius of the outer edge point cloud are extracted respectively. The minimum value of the difference between the extreme radius of the inner edge and the extreme radius of the outer edge in all angle intervals is calculated, and a radius difference threshold is set, which is twice the minimum value. Traverse each angle interval, determine the relationship between the difference between the inner edge radius and the outer edge radius of the angle interval and the radius difference threshold, obtain the trajectory points, and transform all trajectory points generated in the angle radius parameter space to Cartesian space to obtain a discrete trajectory point set.

6. The injection mold processing method based on an industrial robot as described in claim 5, characterized in that, The relationship between the difference between the inner and outer edge radii within the angular interval and the radius difference threshold is determined. The determination logic specifically includes: When the difference between the inner edge radius and the outer edge radius is less than or equal to the radius difference threshold, the midpoint between the point with the maximum value of the inner edge radius and the point with the minimum value of the outer edge radius is taken as the trajectory point of the angle interval. When the difference between the inner edge radius and the outer edge radius is greater than the radius difference threshold, the radius of the point with the maximum inner edge radius is expanded outward to half of the minimum radius difference, and the point obtained after expansion is used as the trajectory point of the angle interval.

7. The injection mold processing method based on an industrial robot as described in claim 6, characterized in that, The polar angle sorting process specifically includes: The intersection of the rotation axis and the projection plane perpendicular to the rotation axis is taken as the origin of the polar coordinates; Within the projection plane, a fixed direction originating from the polar coordinate origin is selected as the polar angle reference direction. The angle between the position vector of each discrete trajectory point projected onto the projection plane and the polar angle reference direction is calculated, and the expression is as follows: ; in, The angle between the position vector of the discrete trajectory point projected onto the projection plane and the polar reference direction. The origin of polar coordinates, The polar reference direction For discrete trajectory points, To find the modulus formula, Let be the position vector of the discrete trajectory point after it is projected onto the projection plane. It is the dot product of the position vector and the angular reference direction; Based on the size of the included angle, all the discrete trajectory points are sorted from smallest to largest to form an ordered circular set of discrete trajectory points.

8. The injection mold processing method based on an industrial robot as described in claim 7, characterized in that, The process of generating a circular machining trajectory specifically includes: The ordered circular discrete trajectory point set is defined as the control vertex of the non-uniform rational B-spline curve. The degree of the non-uniform rational B-spline curve is set to cubic, and a weight factor is assigned to each control vertex. The corresponding node vector is calculated and generated based on the spatial distribution of the control vertex using the chord length accumulation parameterization method. Based on the control vertices, node vectors, weight factors, and curve order, the B-spline basis functions calculated using the de Boer-Cox recursive formula are used to calculate the curve, resulting in a non-uniform rational B-spline curve, which generates a circular machining trajectory. The mathematical expression of the non-uniform rational B-spline curve is as follows: ; in, As a weighting factor, To control the vertices, For the degree of the curve, For B-spline basis functions, To control the maximum index value of the vertex; The first and last weighting factors in the weighting factors are greater than zero.

9. The injection mold processing method based on an industrial robot as described in claim 8, characterized in that, Based on the aforementioned circular machining trajectory, the injection mold grinding path of the industrial robot is planned: Based on the circular machining trajectory, the first derivative of the circular machining trajectory curve at each path point is calculated to obtain the tool forward direction of the end effector; Calculate the geometric normal vector of the surface of the annular structure region to obtain the tool axis of the end effector; The cross product of the tool's forward direction and the tool's axial direction is used to obtain the tool radial direction of the end effector; The tool's forward direction, radial direction, and axial direction are combined and spliced ​​to form the attitude matrix of the end effector at the path point.

10. An injection mold processing system based on an industrial robot, characterized in that, It includes a segmentation module, a parsing module, an extraction module, and a generation module: The segmentation module is used to identify and segment the acquired 3D injection mold point cloud data through a deep learning model to obtain a ring-shaped structure region; The parsing module is used to calculate the outline of the annular structure region, identify the inflection points by identifying the endpoints of the outline and connect them to construct a polishing bend tree, and obtain the annular tangent plane through the virtual curve in the polishing bend tree. The extraction module is used to extract discrete points from the annular tangent plane using a hybrid discrete point extraction method to obtain discrete trajectory points. Based on the axis of rotation, the discrete trajectory points are sorted by polar angle to generate an ordered set of annular discrete trajectory points. The generation module is used to fit the ordered circular discrete trajectory point set with a non-uniform rational B-spline curve to generate a circular processing trajectory, and based on the circular processing trajectory, to plan the injection mold grinding path of the industrial robot.