A vision-based method for polishing the parting line of castings
Through reverse modeling and path planning technology, a new mold line model is generated and the grinding parameters are dynamically adjusted, which solves the problems of large positioning errors and insufficient real-time collaboration capabilities in the existing system during the grinding of the casting mold line, and achieves high-precision and efficient casting grinding effects.
Patent Information
- Application Number
- CN202510704774.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-05-29
AI Technical Summary
The existing automated grinding system has problems in grinding the mold line of castings, such as large positioning errors, lack of real-time collaboration capabilities, and inability to dynamically perceive the geometric characteristics of castings, resulting in insufficient grinding accuracy and efficiency, especially when processing complex curved surfaces.
By obtaining the template surface point cloud of the standard casting for reverse modeling, combining coarse matching and fine matching techniques, a new mold line model is generated. The path is planned based on the machining allowance, and polishing is performed using one, two or multiple milling methods. The polishing parameters are dynamically adjusted to adapt to the deformation of the casting.
It improves the accuracy and efficiency of casting parting line grinding, can deal with the warping deformation of castings caused by material shrinkage or mold wear, reduce positioning errors, avoid tool posture and surface normal matching deviation, and improve the grinding quality of complex surfaces.
Smart Images

Figure CN120228601B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the intersection field of mechanical manufacturing automation and intelligent manufacturing, and specifically relates to a vision-based casting parting line polishing method. Background Art
[0002] Castings are core components in modern industries such as automotive, aerospace, and shipbuilding. Their surface quality directly impacts assembly precision and service performance. However, inherent issues in the casting process, such as burrs, parting line (parting surface) defects, and surface roughness, necessitate precision polishing. Traditional manual polishing, which relies on operator experience, suffers from low efficiency, poor consistency, and potential safety hazards, making it difficult to meet the demands of large-scale production in modern industry.
[0003] While existing automated polishing systems have partially replaced manual labor, they still face multiple technical bottlenecks. First, most systems use two-dimensional visual positioning, which is limited by the principle of planar imaging and cannot accurately reconstruct the three-dimensional topography of complex curved surfaces. This results in positioning errors often exceeding 0.2mm, making it difficult to adapt to the polishing requirements of high-precision parts. Second, the system's modular design leads to data silos, with scanning, recognition, path planning, and other links operating independently and lacking real-time collaboration capabilities. This makes it difficult to cope with the 0.1-0.5mm warping deformation of castings caused by material shrinkage or mold wear. Third, traditional five-axis robots rely on preset trajectories to perform polishing tasks and cannot dynamically perceive the actual geometric features of castings (such as sudden changes in curvature, grooves, protrusions, etc.). This leads to deviations in the matching between the tool posture and the surface normal, affecting the surface treatment quality. In addition, the problem of insufficient adaptive ability for complex surfaces is particularly prominent. In fixed trajectory mode, the system cannot adjust the polishing parameters in real time according to the local topography, resulting in frequent overcutting or underprocessing of edge areas. Summary of the Invention
[0004] The purpose of the present invention is to propose a vision-based casting parting line grinding method, which can improve the parting line grinding accuracy, grinding quality and grinding efficiency, and is also applicable to complex curved surfaces.
[0005] The present invention is achieved through the following technical solutions:
[0006] A vision-based casting parting line grinding method comprises the following steps:
[0007] Step S1: obtaining a template surface point cloud of a standard casting that has completed parting line grinding, performing reverse modeling on the template surface point cloud to obtain a first template point cloud, and obtaining a measured surface point cloud of the casting to be ground as a first measured point cloud;
[0008] Step S2: performing coarse matching and fine matching on the first template point cloud in sequence according to the characteristic relationship between the first template point cloud and the first measurement point cloud, and converting the original parting line model into a new parting line model according to the transformation relationship corresponding to the coarse matching and the fine matching, wherein the original parting line model includes a teaching trajectory and its neighborhood point cloud, the teaching trajectory being formed in the first template point cloud by manual teaching, and the new parting line model includes a template trajectory converted from the teaching trajectory;
[0009] Step S3: Obtain the points in the new parting line model that are closest to each point on the template trajectory. For each point with the closest distance, obtain the point in its neighborhood with the largest vertical distance to the plane where the new parting line model is located. Form a path planning point cloud from all the points with the largest distances. Use the vertical distance corresponding to each point in the machining trajectory as the machining allowance of the point.
[0010] Step S4: traverse all planning points in the path planning point cloud according to the processing direction, select the processing method according to the processing allowance corresponding to each planning point, and generate the final processing trajectory. The processing methods include single milling, secondary milling or multiple milling. The single milling adopts the fast tool feeding mode, the secondary milling adopts rough processing and fine processing in sequence, and the multiple milling adopts layered processing.
[0011] Furthermore, in step S1, the standard casting is placed on a programmable turntable, and the programmable turntable is rotated at a set angle. i Obtain the original point cloud of the standard casting after rotation , according to the formula All collected original point clouds are fused to obtain the template surface point cloud ,in, Indicates continuous multiplication, Indicates the i The rotation matrix corresponding to the rotation is Indicates the i The angle of rotation, T ( d i ) represents the translation matrix, Located in the turntable coordinate system.
[0012] Furthermore, in step S1, the reverse modeling specifically includes the following steps:
[0013] Step S11: Construct Poisson equation , the adaptive octree grid discretization strategy is used to solve the Poisson equation and obtain the implicit function ,in, is the Laplace operator, v is the normal vector field that expands the normal vector set of the template surface point cloud to the three-dimensional space by moving least squares method, is the gradient operator;
[0014] Step S12, initial grid extraction: dynamically adjust the grid size according to the point cloud density of the template surface point cloud. The extracted initial grid size is expressed as , where x represents the normal vector of any point in three-dimensional space, d max Indicates the maximum grid size set, β represents the proportionality coefficient, ρ (x) represents the point cloud density;
[0015] Step S13: Non-uniform grid subdivision: According to the subdivision criteria Dynamically divide the subdivision level to Loop segmentation is performed in the area, and the number of subdivisions Limit to ,in, represents the local curvature of the mesh vertex, G represents the gradient norm of the grid, represents the maximum local curvature of all vertices in the mesh, G max represents the maximum gradient norm of all vertices in the mesh, Indicates the subdivision threshold that is set. Indicates the preset maximum fixed point density, d current Indicates the current vertex density;
[0016] Step S14, adaptive Laplacian smoothing: the mesh vertex p after subdivision i Iteratively update the position to obtain the first template point cloud, the k The formula for +1 iteration is ,in, λ To control the step size of the smoothing strength, Indicates p i Neighborhood, p j represents a point in the neighborhood, w ij Represents the adaptive weight.
[0017] Furthermore, the step S2 specifically includes the following steps:
[0018] Step S21: Based on the extracted first template point cloud M and the first measured point cloud T The feature points or feature descriptors are calculated by singular value decomposition to calculate the first transformation matrix H 1={ R 1, t 1}, according to the formula Point cloud of the first template M Perform rough matching to obtain the second template point cloud ;
[0019] Step S22: From the template point cloud Identify the original parting line model M line The corresponding point cloud set, the first measured point cloud T The part corresponding to the point cloud set is removed to obtain the second measured point cloud T 1. Use the iterative closest point algorithm to transform the second template point cloud With the second measurement point cloud T 1 Perform precise matching to obtain the third template point cloud, and generate the second transformation matrix in this process H 2={ R 2, t 2};
[0020] Step S23: According to the formula The original parting line model M line Convert to middle parting line model M lineSrc and the middle parting line model M lineSrc The outliers in the statistic filter are statistically filtered to obtain the new parting line model ,in, R 1. R 2 represent the rotation matrices of the coarse matching and fine matching processes, t 1. t 2 represent the translation matrices of the coarse matching and fine matching processes respectively.
[0021] Furthermore, obtaining the machining allowance in step S3 includes the following steps:
[0022] Step S31: According to the formula Get the new parting line model The first m Track points p m The nearest point q m_nearest ;
[0023] Step S32: The equation of the plane where the new parting line model is located is: ,point q m_nearest Points in the neighborhood q near =( q x , q y , q z ) to the plane is ,point q near The projection point on this plane q proj for , select the point with the largest vertical distance in the neighborhood as the highest point q max , the path planning point cloud is formed by each highest point, the highest point q max The corresponding projection point q proj The distance between the two points is the machining allowance of the point ,in, is the normal vector of the plane where the new parting line model is located, is the reference point on the plane.
[0024] Furthermore, in step S4, selecting a processing method according to the processing allowance corresponding to each trajectory point specifically includes:
[0025] like , select one milling; if , select two milling; if , select multiple milling, where, T 1 and T 2 is a user-adjustable parameter with selection ranges of 2-4mm and 4-6mm.
[0026] Furthermore, in step S4, the layered processing is to decompose the processing task into multiple levels, each layer according to a predetermined thickness. h Milling is done step by step, and cooling time is arranged after each milling. The processing parameters for each layer are ,in, F 3l Indicates feed speed, S 3l Indicates the spindle speed, l Indicates the number of processing layers, △ F Indicates feed speed adjustment amount, △ S Indicates the spindle speed adjustment amount.
[0027] Furthermore, in step S4, generating the final processing trajectory specifically includes:
[0028] Step S41: Initialize a set for storing the final generated paragraphs and a collection representing the currently processed paragraph ;
[0029] Step S42: traverse all planning points in the path planning point cloud according to the processing direction. i Planning points Tr i'The machining allowance and the previous planning point Tr i'-1 If the machining allowance is the same, the planning point Tr i'-1 Add to the set S, that is, S=S∪{ Tr i'-1}; If the current set S is empty or the current planning point Tr i' The machining allowance and the previous planning point Tr i'-1 If the machining allowance is different, the current set S is merged into the set Segs and the planning point Tr i'-1 Add to the new set S, that is, Segs=Segs∪{S}, S={ Tr i'-1}; After the traversal is completed, if the current segment set S is not empty, the set S is added to the set Segs, and the final processing trajectory is the final set Segs.
[0030] Furthermore, in step S23, the middle parting line model M lineSrc The outliers in the matrix are statistically filtered to obtain the new parting line model. Specifically include:
[0031] Step S231: The middle parting line model M lineSrc The m ' points, according to the formula Calculate the point to its k The average distance between the nearest neighbors , and according to the formula and Calculate the global average distance separately and standard deviation ,in, for the reason k 'A neighborhood formed by the nearest neighbors, For the k 'A neighbor, Indicates the distance. M Represents the middle parting line model M lineSrc the number of midpoints;
[0032] Step S232: Satisfy The points are outliers, and the outliers are filtered to obtain the new parting line model ,in, The threshold is a multiple of the distance from the mean.
[0033] Furthermore, in step S1, iAfter the rotation, the binocular 3D camera is used to collect the point cloud of the standard casting. , using the formula The point cloud in the camera coordinate system Convert to the turntable coordinate system to get the original point cloud ,in, is the known turntable calibration matrix.
[0034] The present invention has the following beneficial effects:
[0035] 1. The present invention first obtains the template surface point cloud of the standard casting that has completed the parting line grinding, performs reverse modeling on the template surface point cloud to obtain a first template point cloud, obtains the measured surface point cloud of the casting to be ground as the first measured point cloud, then performs coarse matching and fine matching on the first template point cloud in turn according to the characteristic relationship between the first template point cloud and the first measured point cloud, converts the original parting line model into a new parting line model according to the transformation relationship corresponding to the coarse matching and the fine matching, and then obtains the points in the new parting line model that are closest to each track point of the template track, and for each point with the closest distance, obtains the point with the largest vertical distance to the plane where the new parting line model is located in its neighborhood, and calculates the distance from all points. The largest point forms a path planning point cloud, and the vertical distance corresponding to each point in the processing trajectory is used as the processing allowance of the point. Finally, all planning points in the path planning point cloud are traversed according to the processing direction. The processing method is selected according to the processing allowance corresponding to each planning point and the final processing trajectory is generated. It can more accurately reconstruct the three-dimensional morphology of the casting surface, thereby reducing positioning errors. It has strong real-time collaboration capabilities and can cope with 0.1-0.5mm warping deformation of castings caused by material shrinkage or mold wear. It pays attention to the processing allowance to dynamically perceive the actual geometric characteristics of the casting, avoids deviations in tool posture and surface normal matching, and ultimately improves the grinding accuracy, grinding quality and grinding efficiency of the casting parting line. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The present invention will be further described in detail below with reference to the accompanying drawings.
[0037] Figure 1 Flowchart of the present invention.
[0038] Figure 2 This is a schematic diagram of the first template point cloud for reverse modeling in the present invention.
[0039] Figure 3 This is a schematic diagram of the second template point cloud of the present invention.
[0040] Figure 4 This is a schematic diagram of the second measurement point cloud of the present invention.
[0041] Figure 5 This is a schematic diagram of the third template point cloud of the present invention.
[0042] Figure 6 It is a processing flow chart of the present invention. DETAILED DESCRIPTION
[0043] like Figure 1 As shown in FIG, the vision-based casting parting line grinding method includes the following steps:
[0044] Step S1: obtaining a template surface point cloud of a standard casting that has completed parting line grinding, performing reverse modeling on the template surface point cloud to obtain a first template point cloud, and obtaining a measured surface point cloud of the casting to be ground as a first measured point cloud;
[0045] In this embodiment, the casting is placed on the turntable of the programmable turntable, a binocular 3D camera is used to photograph the casting, and a working five-axis robot is used to polish the parting line of the casting. The turntable of the programmable turntable is calibrated using existing technology, such as the calibration method disclosed in patent CN202411983146.2. The hand-eye calibration of the five-axis robot and the turntable adopts the eye-to-hand eye-in-hand calibration mode, and the equation is established through the checkerboard calibration board. Solving the Hand-Eye Matrix ,in, The homogeneous transformation matrix from the robot's end coordinate system to the base coordinate system is a known quantity and can be calculated in real time through the robot's forward kinematics model. Represents the homogeneous transformation matrix from the camera coordinate system to the robot end coordinate system, which is an unknown quantity. The homogeneous transformation matrix from the camera coordinate system to the robot base coordinate system is a known quantity and can be calculated using images of the checkerboard calibration plate at multiple poses and the robot pose data.
[0046] Standard castings are set on a programmable turntable, each time at a set angle Rotary programmable turntable, i After the rotation, the binocular 3D camera is used to collect the point cloud of the standard casting. , using the formula The point cloud in the camera coordinate system Convert to the turntable coordinate system to get the original point cloud ,in, For the known turntable calibration matrix, according to the formula Perform multi-view fusion on all collected original point clouds to obtain template surface point cloud ,in, Indicates continuous multiplication, transforming each point cloud to the position of the first point cloud, Indicates the i The rotation matrix corresponding to the rotation is Indicates the i The angle of rotation, T (d i ) indicates the i The translation matrix corresponding to the rotation (i.e., the translation compensation), Located in the turntable coordinate system.
[0047] The process of acquiring the first measurement point cloud is the same as the process of acquiring the first template point cloud.
[0048] Because the data obtained from multi-view fusion may have slight pose errors, in order to reduce the error, the fused template surface point cloud is precisely aligned using the neighbor matching algorithm. The number of iterations of the neighbor matching algorithm is set to 300 times, the convergence threshold is 0.01mm, and the error in the point cloud overlapping area is less than 0.1mm.
[0049] Inverse modeling uses improved Poisson reconstruction, which can speed up the efficiency of reverse reconstruction and improve the reconstruction effect. It specifically includes the following steps:
[0050] Step S11: Construct Poisson equation , the adaptive octree grid discretization strategy is used to solve the Poisson equation and obtain the implicit function ,in, is the Laplace operator, v is the normal vector field that expands the normal vector set of the template surface point cloud to the three-dimensional space by moving least squares method, is the gradient operator;
[0051] The adaptive octree grid discretization strategy is an existing technology for solving the Poisson equation. In this embodiment, the maximum depth is set to 10 layers, and the point cloud density threshold is 0.1 points / mm². The grid is only encrypted near the point cloud to reduce the waste of computing resources. The normal vector confidence weight is also introduced. , to optimize the robustness of the solution in the noise area, P represents the template surface point cloud set, Represents the distance from the spatial point x to the nearest point cloud point, To adjust the parameters;
[0052] Step S12: Using the improved Marching Cubes algorithm to extract the implicit function Extract the initial triangular mesh and enable high-precision interpolation in the area where the gradient modulus is greater than the threshold. Specifically, the initial mesh extraction: dynamically adjust the mesh size according to the point cloud density of the template surface point cloud. The extracted initial mesh size is expressed as , avoid holes or fragmentation by preserving the topology criterion, where x represents the normal vector of any point in three-dimensional space, d max Indicates the maximum grid size set, β represents the proportionality coefficient, ρ (x) represents the point cloud density;
[0053] Step S13: Non-uniform grid subdivision: According to the subdivision criteria Dynamically divide the subdivision levels, A larger value indicates that a higher level of subdivision is required. Loop segmentation is performed in the area, and the number of subdivisions Limit to ,in, represents the local curvature of the mesh vertex, G represents the gradient norm of the grid, represents the maximum local curvature of all vertices in the mesh, G max represents the maximum gradient norm of all vertices in the mesh, Indicates the subdivision threshold, whose specific value is dynamically adjusted according to the complexity of the grid. Indicates the preset maximum fixed point density, d current Indicates the current vertex density;
[0054] Loop subdivision is an existing recursive subdivision surface algorithm for triangular meshes. Its core goal is to generate continuous and smooth surfaces by iteratively subdividing the mesh and adjusting the vertex positions while preserving the topological structure and characteristics of the original mesh.
[0055] Step S14, adaptive Laplacian smoothing: the mesh vertex p after subdivision i Iteratively update the position to obtain the first template point cloud, the k The formula for +1 iteration is , the vertices involved in smoothing satisfy the normal angle After smoothing, the sharp edge angle deviation is ≤1.5°, which is better than the 3.2° of the traditional method. To control the step size of the smoothing strength, it is necessary to adjust it according to the stability of the grid. Indicates p i Neighborhood, p j represents a point in the neighborhood, represents the adaptive weight, and Represents the mesh vertex p i and p j The local curvature of is the curvature difference tolerance threshold, Controls the weight decay speed. The greater the curvature difference, the smaller the weight.
[0056] The first template point cloud obtained by reverse modeling is as follows Figure 2 As shown in the figure, the reconstruction quality and computational efficiency of complex geometries are significantly improved while maintaining sharp features.
[0057] Step S2: performing coarse matching and fine matching on the first template point cloud in sequence according to the characteristic relationship between the first template point cloud and the first measurement point cloud, and converting the original parting line model into a new parting line model according to the transformation relationship corresponding to the coarse matching and the fine matching, wherein the original parting line model includes a teaching trajectory and its neighborhood point cloud, the teaching trajectory being formed in the first template point cloud by manual teaching, and the new parting line model includes a template trajectory converted from the teaching trajectory;
[0058] The specific steps include:
[0059] Step S21: Based on the extracted first template point cloud M and the first measured point cloud T The feature points or feature descriptors are calculated by singular value decomposition to calculate the first transformation matrix H 1={ R 1, t 1}, according to the formula For the first template point cloud M Perform rough matching to obtain the second template point cloud ; Feature points refer to points in the point cloud with significant geometric or statistical characteristics (such as corner points, edge points, and high curvature points). Feature descriptors refer to vectors that describe the geometric properties of the local neighborhood of feature points (such as normal distribution and curvature histogram). In this embodiment, the feature descriptors are generated by calculating the geometric statistics of the local neighborhood of the point cloud (such as normal angle and distance distribution) by using the FPFH (Fast Point Feature Histograms) algorithm. This process is a prior art, and the process of calculating the first transformation matrix by singular value decomposition is also a prior art. The second template point cloud is as follows: Figure 3 As shown; the rough matching makes the first template point cloud M and the first measured point cloud T Align as much as possible on a large scale to lay the foundation for subsequent more detailed processing;
[0060] Step S22: From the template point cloud Identify the original parting line model M line The corresponding point cloud set, the first measured point cloud T The part corresponding to the point cloud set is removed, and the result is as follows Figure 4 The second measured point cloud shown T 1. Use the existing iterative closest point algorithm to transform the second template point cloud With the second measurement point cloud T 1 performs precise matching and obtains Figure 5 The third template point cloud shown in the process generates the second transformation matrix H 2={ R 2, t2}, through precise matching, the local consistency between models can be significantly improved;
[0061] Step S23: According to the formula The original parting line model M line Convert to middle parting line model M lineSrc and the middle parting line model M lineSrc The outliers in the statistic filter are statistically filtered to obtain the new parting line model ,in, R 1. R 2 represent the rotation matrices of the coarse matching and fine matching processes, t 1. t 2 represents the translation matrix of the coarse matching and fine matching process respectively;
[0062] Among them, the middle parting line model M lineSrc The outliers in the statistic filter are statistically filtered to obtain the new parting line model Specifically include:
[0063] Step S231: The middle parting line model M lineSrc The m ' points, according to the formula Calculate the point to its k The average distance between the nearest neighbors , and according to the formula and Calculate the global average distance separately and standard deviation ,in, for the reason k 'A neighborhood formed by the nearest neighbors, For the k 'A neighbor, Indicates the distance. Represents the middle parting line model M lineSrc the number of midpoints;
[0064] Step S232: Satisfy The points are outliers, and the outliers are filtered to obtain the new parting line model ,in, The threshold is a multiple of the distance from the mean.
[0065] Step S3: Obtain the points in the new parting line model that are closest to each point on the template trajectory. For each point with the closest distance, obtain the point in its neighborhood with the largest vertical distance to the plane where the new parting line model is located. Form a path planning point cloud from all the points with the largest distances. Use the vertical distance corresponding to each point in the machining trajectory as the machining allowance of the point.
[0066] Obtaining machining allowance specifically includes the following steps:
[0067] Step S31: According to the formula Get the new parting line model The first m Track points p m The nearest point q m_nearest , Express request p m and q m The Euclidean distance between
[0068] Step S32: The equation of the plane where the new parting line model is located is: ,point q m_nearest Points in the neighborhood q near =( q x , q y , q z ) to the plane is ,point q near The projection point on this plane q proj for , select point q m_nearest The point with the largest vertical distance in the neighborhood is taken as the highest point q max , by the new parting line model The highest point of the point closest to each track point of the template track forms the path planning point cloud, and the path planning point cloud is converted from the turntable coordinate system to the camera coordinate system and then to the robot coordinate system. q max The corresponding projection point q proj The distance between the two points is the machining allowance of the point ,in, is the normal vector of the plane where the new parting line model is located, is the reference point on the plane, pointq m_nearest The radius of the neighborhood is 5 to 10 mm. The process of obtaining the equation of the plane where the new parting line model is located is the existing technology.
[0069] Step S4: traverse all planned points in the path planning point cloud according to the processing direction, select a processing method based on the processing allowance corresponding to each planning point, and generate a final processing trajectory. The processing methods include single milling, double milling, or multiple milling. Single milling adopts a fast tool feeding mode, double milling adopts roughing and finishing in sequence, and multiple milling adopts layered processing;
[0070] Specifically, generating the final processing trajectory includes the following steps:
[0071] Step S41: Initialize a set for storing the final generated paragraphs and a collection representing the currently processed paragraph ;
[0072] Step S42: traverse all planning points in the path planning point cloud according to the processing direction. i Planning points Tr i' The machining allowance and the previous planning point Tr i'-1 If the machining allowance is the same, the planning point Tr i'-1 Add to the set S, that is, S=S∪{ Tr i'-1}; If the current set S is empty or the current planning point Tr i' The machining allowance and the previous planning point Tr i'-1 If the machining allowance is different, the current set S is merged into the set Segs and the planning point Tr i'-1 Add to the new set S, that is, Segs=Segs∪{S}, S={ Tr i'-1}; After the traversal is completed, if the current segment set S is not empty, the set S is added to the set Segs, and the final processing trajectory is the final set Segs. The final processing trajectory is converted into G code to accurately guide the five-axis robot to perform the predetermined processing task.
[0073] For processing methods:
[0074] like , select one milling, use fast tool mode, feed speed F 1=1000mm / min, spindle speed S1=8000rpm, directly adopting fast tool mode or shortest path algorithm to plan the path, thus ensuring an efficient and direct machining process, reducing unnecessary tool movement and improving machining efficiency;
[0075] like , choose two milling steps, divided into roughing and finishing. First perform roughing to remove most of the material, and then adjust to finishing mode to complete the final shaping. This can ensure machining accuracy and surface quality while reducing workpiece stress. The roughing parameters are: feed rate F 2a =800mm / min, spindle speed S 2a =6000rpm; finishing parameters: F 2b =1200mm / min, S 2b =10000rpm;
[0076] like , select multiple milling, adopt layered processing strategy, layered processing is to decompose the processing task into multiple levels, each layer according to the predetermined thickness h =1mm step-by-step milling, arrange cooling time after each milling, and the processing parameters for each layer are ,in, F 3l Indicates feed speed, S 3l Indicates the spindle speed, l Indicates the number of processing layers, F base is the initial feed speed, S base is the initial spindle speed, △ F Indicates feed speed adjustment amount, △ S Indicates the spindle speed adjustment amount.
[0077] in, T 1 and T 2 are user-adjustable parameters, with default values of 3mm and 5mm respectively.
[0078] Before generating G code, the machining trajectory needs to be further optimized, such as removing redundant paths and eliminating repeated or unnecessary movements; considering tool radius compensation, adjusting the path according to the tool size, and ensuring that no collision or overcutting occurs.
[0079] Generate corresponding G-code blocks for different machining allowances. Set the corresponding machining parameters (such as feed rate and spindle speed) at the beginning of each segment and restore the default values or prepare the parameters for the next segment at the end.
[0080] Specific processing procedures such as Figure 6 shown.
[0081] The above description is merely a preferred embodiment of the present invention and therefore cannot be used to limit the scope of the present invention. In other words, equivalent changes and modifications made according to the scope of the patent application and the contents of the specification should still fall within the scope of the patent of the present invention.
Claims
1. A vision-based casting parting line grinding method, characterized by: The steps include: Step S1: obtaining a template surface point cloud of a standard casting that has completed parting line grinding, performing reverse modeling on the template surface point cloud to obtain a first template point cloud, and obtaining a measured surface point cloud of the casting to be ground as a first measured point cloud; Step S2: performing coarse matching and fine matching on the first template point cloud in sequence according to the characteristic relationship between the first template point cloud and the first measurement point cloud, and converting the original parting line model into a new parting line model according to the transformation relationship corresponding to the coarse matching and the fine matching, wherein the original parting line model includes a teaching trajectory and its neighborhood point cloud, the teaching trajectory being formed in the first template point cloud by manual teaching, and the new parting line model includes a template trajectory converted from the teaching trajectory; Step S3: Obtain the points in the new parting line model that are closest to each point on the template trajectory. For each point with the closest distance, obtain the point in its neighborhood with the largest vertical distance to the plane where the new parting line model is located. Form a path planning point cloud from all the points with the largest distances. Use the vertical distance corresponding to each point in the machining trajectory as the machining allowance of the point. Step S4: traverse all planned points in the path planning point cloud according to the processing direction, select a processing method based on the processing allowance corresponding to each planning point, and generate a final processing trajectory. The processing methods include single milling, double milling, or multiple milling. Single milling adopts a fast tool feeding mode, double milling adopts roughing and finishing in sequence, and multiple milling adopts layered processing; In step S1, the standard casting is placed on a programmable turntable, and the programmable turntable is rotated at a set angle. i Obtain the original point cloud of the standard casting after rotation , according to the formula All collected original point clouds are fused to obtain the template surface point cloud ,in, Indicates continuous multiplication, Indicates the i The rotation matrix corresponding to the rotation is Indicates the i The angle of rotation, T ( d i ) represents the translation matrix, Located in the turntable coordinate system; In step S1, the reverse modeling specifically includes the following steps: Step S11: Construct Poisson equation , the adaptive octree grid discretization strategy is used to solve the Poisson equation and obtain the implicit function ,in, is the Laplace operator, v is the normal vector field that expands the normal vector set of the template surface point cloud to the three-dimensional space by moving least squares method, is the gradient operator; Step S12, initial grid extraction: dynamically adjust the grid size according to the point cloud density of the template surface point cloud. The extracted initial grid size is expressed as , where x represents the normal vector of any point in three-dimensional space, d max Indicates the maximum grid size set, β represents the proportionality coefficient, ρ (x) represents the point cloud density; Step S13: Non-uniform grid subdivision: According to the subdivision criteria Dynamically divide the subdivision level to Loop segmentation is performed in the area, and the number of subdivisions Limit to ,in, represents the local curvature of the mesh vertex, G represents the gradient norm of the grid, represents the maximum local curvature of all vertices in the mesh, G max represents the maximum gradient norm of all vertices in the mesh, Indicates the subdivision threshold that is set. Indicates the preset maximum fixed point density, d current Indicates the current vertex density; Step S14, adaptive Laplacian smoothing: the mesh vertex p after subdivision i Iteratively update the position to obtain the first template point cloud, the k The formula for +1 iteration is ,in, λ To control the step size of the smoothing strength, Indicates p i Neighborhood, p j represents a point in the neighborhood, w ij Represents the adaptive weight.
2. The method for polishing the parting line of a casting based on vision according to claim 1, characterized in that: The step S2 specifically includes the following steps: Step S21: Based on the extracted first template point cloud M and the first measured point cloud T The feature points or feature descriptors are calculated by singular value decomposition to calculate the first transformation matrix H 1={ R 1, t 1}, according to the formula Point cloud of the first template M Perform rough matching to obtain the second template point cloud ; Step S22: From the template point cloud Identify the original parting line model M line The corresponding point cloud set, the first measured point cloud T The part corresponding to the point cloud set is removed to obtain the second measured point cloud T 1. Use the iterative closest point algorithm to transform the second template point cloud With the second measurement point cloud T 1 Perform precise matching to obtain the third template point cloud, and generate the second transformation matrix in this process H 2={ R 2, t 2}; Step S23: According to the formula The original parting line model M line Convert to middle parting line model M lineSrc and the middle parting line model M lineSrc The outliers in the matrix are statistically filtered to obtain the new parting line model. ,in, R 1. R 2 represent the rotation matrices of the coarse matching and fine matching processes, t 1. t 2 represent the translation matrices of the coarse matching and fine matching processes respectively.
3. The method for polishing the parting line of a casting based on vision according to claim 2, characterized in that: Acquiring the machining allowance in step S3 includes the following steps: Step S31: According to the formula Get the new parting line model The first m Track points p m The nearest point q m_nearest ; Step S32: The equation of the plane where the new parting line model is located is: ,point q m_nearest Points in the neighborhood q near =( q x , q y , q z ) to the plane is ,point q near The projection point on this plane q proj for , select the point with the largest vertical distance in the neighborhood as the highest point q max , the path planning point cloud is formed by each highest point, the highest point q max The corresponding projection point q proj The distance between the two points is the machining allowance of the point ,in, is the normal vector of the plane where the new parting line model is located, is the reference point on the plane.
4. The method for polishing the parting line of a casting based on vision according to claim 3, characterized in that: In step S4, selecting a processing method according to the processing allowance corresponding to each trajectory point specifically includes: like , select one milling; if , select two milling; if , select multiple milling, where, T 1 and T 2 is a user-adjustable parameter with selection ranges of 2-4mm and 4-6mm.
5. The method for polishing the parting line of a casting based on vision according to claim 4, characterized in that: In step S4, the layered processing is to decompose the processing task into multiple levels, and each layer is processed according to a predetermined thickness. h Milling is done step by step, and cooling time is arranged after each milling. The processing parameters for each layer are ,in, F 3l Indicates feed speed, S 3l Indicates the spindle speed, l Indicates the number of processing layers, △ F Indicates the feed speed adjustment amount, △ S Indicates the spindle speed adjustment amount.
6. The method for polishing the parting line of a casting based on vision according to claim 5, characterized in that: In step S4, generating the final processing trajectory specifically includes: Step S41: Initialize a set for storing the final generated paragraphs and a collection representing the currently processed paragraph ; Step S42: traverse all planning points in the path planning point cloud according to the processing direction. i Planning points Tr i' The machining allowance and the previous planning point Tr i'-1 If the machining allowance is the same, the planning point Tr i'-1 Add to the set S, that is, S=S∪{ Tr i'-1 }; If the current set S is empty or the current planning point Tr i' The machining allowance and the previous planning point Tr i'-1 If the machining allowance is different, the current set S is merged into the set Segs and the planning point Tr i'-1 Add to the new set S, that is, Segs=Segs∪{S}, S={ Tr i'-1 }; After the traversal is completed, if the current segment set S is not empty, the set S is added to the set Segs, and the final processing trajectory is the final set Segs.
7. A vision-based casting parting line grinding method according to any one of claims 2 to 6, characterized in that: In step S23, the middle parting line model M lineSrc The outliers in the matrix are statistically filtered to obtain the new parting line model. Specifically include: Step S231: The middle parting line model M lineSrc The m ' points, according to the formula Calculate the point to its k The average distance between the nearest neighbors , and according to the formula and Calculate the global average distance separately and standard deviation ,in, for the reason k 'A neighborhood formed by the nearest neighbors, For the k 'A neighbor, Indicates the distance. M Represents the middle parting line model M lineSrc the number of midpoints; Step S232: Satisfy The points are outliers, and the outliers are filtered to obtain the new parting line model ,in, The threshold is a multiple of the distance from the mean.
8. A vision-based casting parting line grinding method according to any one of claims 2 to 6, characterized in that: In the step S1, i After the rotation, the binocular 3D camera is used to collect the point cloud of the standard casting. , using the formula The point cloud in the camera coordinate system Convert to the turntable coordinate system to get the original point cloud ,in, is the known turntable calibration matrix.