Visual positioning system and method for five-axis CNC integrated machining center for complex boxes
Through the multi-camera visual positioning system and real-time monitoring technology, the positioning accuracy and inner cavity recognition problems in the five-axis machining of complex boxes were solved, high-precision and stable machining process and quality control were achieved, and the machining quality and efficiency of complex boxes were improved.
Patent Information
- Application Number
- CN202510270224.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-03-07
AI Technical Summary
The existing technology has problems in the five-axis machining of complex boxes, such as insufficient positioning accuracy, limited ability to recognize the internal cavity structure, inability to monitor the machining process in real time, and lack of dynamic compensation mechanism, resulting in low machining quality and efficiency.
A multi-camera vision positioning system is used for multi-angle image acquisition and coordinate calibration. A three-dimensional feature point data set is generated through edge detection and contour extraction. The cutting parameters are determined by combining thickness measurement and stiffness analysis, and a tool trajectory is generated to avoid internal cavity obstacles. The machining process is monitored in real time to adjust the parameters and form a closed-loop control.
It improves the precision and efficiency of complex box processing, reduces the risk of scrapping high-value complex boxes, and ensures the stability and safety of processing quality.
Smart Images

Figure CN120259422B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a visual positioning system and method for a five-axis CNC integrated machining center for complex boxes. Background Art
[0002] Complex box structures are key components in the manufacturing of high-end equipment such as aerospace, automobiles, and energy. Their processing accuracy and quality directly affect product performance and reliability. At present, five-axis CNC integrated processing machines have become the main equipment for processing complex boxes, and can achieve precise processing of complex geometric shapes. Traditional box processing and positioning methods mainly rely on manual measurement and mechanical positioning devices, including the use of special fixtures, tool setting instruments, contact probes, etc. to determine the position and posture of the workpiece in the machine tool. With the improvement of the degree of industrial automation, some advanced factories have begun to try to use a single vision system to assist in positioning, but most of these systems are limited to the positioning of workpieces with simple shapes, and cannot effectively meet the comprehensive measurement and positioning needs of the inner and outer surfaces of complex boxes, especially the identification and parameter optimization capabilities of the inner cavity processing area are limited.
[0003] However, existing technologies still have obvious shortcomings when dealing with five-axis machining of complex boxes. First, the single-view visual system cannot fully capture the complex geometric features of the box, resulting in insufficient positioning accuracy; second, there is a lack of effective identification and analysis methods for the inner cavity structure of the box, making it difficult to formulate reasonable machining strategies based on the characteristics of different areas; third, traditional methods cannot monitor the deformation and cutting status of the workpiece during machining in real time, resulting in excessive deformation and vibration in thin-walled areas; finally, there is a lack of dynamic compensation mechanism, and the machining parameters cannot be adjusted according to the real-time machining status, making it difficult to ensure the overall quality and efficiency of complex box machining. These problems are particularly prominent in high-precision, high-value complex box machining, which seriously restricts the improvement of product quality and production efficiency. Summary of the Invention
[0004] The present application provides a visual positioning system and method for a five-axis CNC integrated machining center for complex boxes, which is used to achieve high-precision visual positioning and intelligent processing parameter optimization of complex boxes on the five-axis CNC integrated machining center, thereby improving the accuracy, efficiency and reliability of complex box processing.
[0005] In a first aspect, the present application provides a visual positioning system for a five-axis CNC integrated machining center for a complex box body, the visual positioning system for a five-axis CNC integrated machining center for a complex box body comprising:
[0006] The calibration module is used to capture multi-angle images of the box workpiece through multiple cameras and perform coordinate calibration using marker points to obtain the camera parameters and machine tool space coordinate mapping table;
[0007] An extraction module is used to perform edge detection and contour extraction on multi-angle images based on the camera parameters and the machine tool space coordinate mapping table, and to merge and transform the features of each perspective through point cloud stitching to obtain a three-dimensional feature point dataset of the box workpiece;
[0008] a marking module, configured to determine the actual position of the box in the machine tool based on the three-dimensional feature point data set through matching calculation and error minimization processing, and mark the key processing areas of the inner cavity to obtain the positioning data of the box workpiece and a table of key processing areas;
[0009] A recording module is used to determine the cutting parameters of different areas of the box body based on the positioning data and the processing key area table by using thickness measurement and stiffness analysis, and record the expected deformation to obtain the cutting depth and feed speed adjustment value for each area;
[0010] a processing module for generating a tool trajectory that avoids internal cavity obstacles through path calculation and interference checking based on the cutting depth and feed rate adjustment value, and processing the thin-walled area to obtain a five-axis machining instruction sequence including a tool feed and retraction strategy;
[0011] The comparison module is used to compare the difference between the expected processing effect and the actual result based on the five-axis processing instruction sequence using the processing process monitoring data, and adjust the subsequent processing parameters according to the difference value to obtain real-time compensation data and quality control records.
[0012] In the second aspect, the present application provides a visual positioning method for a five-axis CNC integrated machining center for complex boxes, and the visual positioning method for a five-axis CNC integrated machining center for complex boxes includes: collecting multi-angle images of the box workpiece through multiple cameras, and using marking points to calibrate the coordinates to obtain camera parameters and machine tool space coordinate mapping tables; performing edge detection and contour extraction on the multi-angle images according to the camera parameters and machine tool space coordinate mapping tables, and merging and transforming the features of each perspective through point cloud stitching to obtain a three-dimensional feature point data set of the box workpiece; based on the three-dimensional feature point data set, determining the actual position of the box in the machine tool through matching degree calculation and error minimization processing, and marking the key processing areas of the inner cavity , obtain the positioning data of the box workpiece and the table of key processing areas; according to the positioning data and the table of key processing areas, use thickness measurement and stiffness analysis to determine the cutting parameters of different areas of the box, record the expected deformation, and obtain the cutting depth and feed speed adjustment values of the different areas; according to the cutting depth and feed speed adjustment values, generate a tool trajectory that avoids internal cavity obstacles through path calculation and interference check, and process the thin-walled area to obtain a five-axis machining instruction sequence including the feed and retract strategy; according to the five-axis machining instruction sequence, use the machining process monitoring data to compare the difference between the expected machining effect and the actual result, and adjust the subsequent machining parameters according to the difference value to obtain real-time compensation data and quality control records.
[0013] The third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned visual positioning method for a five-axis CNC integrated machining center for complex boxes.
[0014] The fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the above-mentioned visual positioning method for a complex box five-axis CNC integrated machining center.
[0015] In the technical solution provided by this application, multi-angle images of the box workpiece are collected by multiple cameras and coordinate calibration is performed using marking points, which effectively solves the problem that a single perspective is difficult to fully capture the complex geometric features of the box, and significantly improves positioning accuracy and reliability; based on the obtained camera parameters and machine tool space coordinate mapping table, edge detection and contour extraction are performed on the multi-angle images, and the features of each perspective are merged and converted through point cloud stitching, so that the three-dimensional feature point data set of the complex box is more complete and accurate, providing a reliable geometric basis for subsequent processing; the actual position of the box in the machine tool is determined through matching calculation and error minimization processing, and the key processing areas of the inner cavity are intelligently marked, realizing the process from massive three-dimensional data to precise positioning and processing. The efficient conversion of process planning significantly reduces the workload of manual analysis and subjective errors. Thickness measurement and stiffness analysis are used to determine the cutting parameters of different areas of the box and record the expected deformation. Differentiated processing strategies are formulated for weak stiffness areas such as thin walls of the box, effectively preventing processing deformation and vibration problems. Tool trajectories that avoid internal cavity obstacles are generated through path calculation and interference checking, and special treatment is performed on thin-walled areas, which solves the risk of tool collision in complex internal cavity processing and improves processing safety. The difference between the expected processing effect and the actual result is compared in real time using processing process monitoring data, and subsequent processing parameters are dynamically adjusted according to the difference value to form a closed-loop control system, ensuring the quality stability of the entire processing process. At the algorithm level, this solution integrates technologies such as computer vision, spatial analysis, and closed-loop control, especially image processing algorithms used in feature point extraction, 3D reconstruction, and machine coordinate mapping, as well as mechanical analysis models used in thin-wall area identification and processing parameter optimization. Together, they build an intelligent decision-making system for complex box processing, which not only improves processing accuracy, but also improves production efficiency and reduces the risk of scrapping high-value complex boxes. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 This is a schematic diagram of an embodiment of a visual positioning system for a five-axis CNC integrated machining center for a complex box in an embodiment of the present application;
[0018] Figure 2 This is a schematic diagram of an embodiment of the visual positioning method for a five-axis CNC integrated machining center for complex boxes in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The embodiments of the present application provide a visual positioning system and method for a five-axis CNC integrated processing machine for a complex box. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or that are inherent to these processes, methods, products or devices.
[0020] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of a visual positioning system for a complex box five-axis CNC integrated processing machine includes:
[0021] The calibration module 101 is used to collect multi-angle images of the box workpiece through multiple cameras and perform coordinate calibration using marker points to obtain a mapping table of camera parameters and machine tool space coordinates;
[0022] Extraction module 102, for performing edge detection and contour extraction on multi-angle images based on the camera parameters and the machine tool space coordinate mapping table, and merging and transforming the features of each viewpoint through point cloud stitching to obtain a three-dimensional feature point dataset of the box workpiece;
[0023] The marking module 103 is used to determine the actual position of the box in the machine tool through matching calculation and error minimization processing based on the three-dimensional feature point data set, and mark the key processing areas of the inner cavity to obtain the positioning data of the box workpiece and the processing key area table;
[0024] The recording module 104 is used to determine the cutting parameters of different areas of the box body based on the positioning data and the processing key area table by using thickness measurement and stiffness analysis, and record the expected deformation to obtain the cutting depth and feed speed adjustment value for each area;
[0025] The processing module 105 is configured to generate a tool trajectory that avoids internal cavity obstacles based on the cutting depth and feed rate adjustment value through path calculation and interference checking, and process the thin-walled area to obtain a five-axis machining instruction sequence including a tool feed and retraction strategy;
[0026] The comparison module 106 is used to compare the difference between the expected machining effect and the actual result based on the five-axis machining instruction sequence using the machining process monitoring data, and adjust the subsequent machining parameters according to the difference value to obtain real-time compensation data and quality control records.
[0027] It is understandable that the execution subject of this application can be a visual positioning system for a five-axis CNC integrated machining center for complex boxes, or a terminal or server, which is not limited here. The embodiment of this application is described by taking the server as the execution subject as an example.
[0028] Specifically, the calibration module 101 synchronously acquires multi-view image data of the box workpiece through an annularly arranged industrial-grade high-definition camera. The original image is pre-processed by denoising, graying and contrast enhancement to enhance the image quality. Then, the reflective marking points pre-attached to the surface of the box are identified to obtain a set of image coordinates of the marking points. The spatial correspondence is calculated based on the actual spatial position of the known marking points and the image coordinate set to generate a camera intrinsic parameter matrix. Combined with the relative position relationship between different cameras, the conversion equation between the camera coordinate system and the machine tool coordinate system is established to form a complete camera parameter and machine tool space coordinate mapping table. In the processing of box-shaped aviation aluminum alloy parts, the marking points are usually distributed on the planes and corners of the outer surface of the box. At least three high-definition cameras are used to capture images from different angles. After coordinate calibration, the spatial position of the marking points in the machine tool coordinate system is accurately located, thereby laying the foundation for subsequent feature extraction.
[0029] The extraction module 102 uses the parameters obtained by the calibration module to perform edge detection and contour extraction. This module processes multi-angle images through the Canny operator to extract the two-dimensional edge information of the box workpiece. The edge feature map is geometrically analyzed to identify straight lines, arcs and curved surfaces, and the box contour geometric structure data is generated. According to the camera parameters of the previous step, the two-dimensional image coordinates are converted into three-dimensional space coordinates to obtain single-view three-dimensional feature points. The feature points under different perspectives are unified into the machine tool coordinate system using the machine tool space coordinate mapping table to form a multi-view feature point set. The feature point set is cleaned to remove redundant points and noise points, and spatial consistency verification is performed. Finally, these points are merged and optimized through a three-dimensional space splicing algorithm to construct a complete geometric expression of the box workpiece and obtain a three-dimensional feature point data set.
[0030] The marking module 103 compares the three-dimensional feature point dataset with the theoretical design data of the box workpiece. Using a multi-level feature decomposition and matching strategy, it selects pairs of distinctive feature points, such as planes, edges, and corners, and establishes a hierarchical feature correspondence table. These feature relationships are then verified for geometric topological consistency. A spatial constraint network is constructed using the relative position and angle relationships between features to eliminate erroneous matches that violate topological logic, resulting in a set of highly reliable feature maps. Based on these mappings, an overdetermined system of equations is constructed. The rigid body transformation parameters of the box workpiece are solved using singular value decomposition. A weighted iteration strategy is then used to reduce the effects of measurement noise, resulting in a rigid pose transformation matrix. This matrix is then corrected for non-uniform thermal expansion. The spatial deformation field is calculated based on the box material properties and temperature distribution data, generating precise pose description data that includes elastic deformation compensation. Based on this data, the visibility and accessibility of the box cavity are analyzed, identifying special processing areas such as thin-walled areas, deep holes, and narrow gaps, and generating a cavity processing risk distribution map. Finally, the precise pose description data and the cavity processing risk distribution map are integrated and collated to generate positioning data and a table of key processing areas for the box workpiece.
[0031] The recording module 104 performs virtual slicing on the box workpiece according to the positioning data, divides the box structure into multiple discrete analysis units, and generates a box partition data map. The wall thickness distribution of each analysis unit is measured, and the wall thickness value of each point is calculated by surface normal sampling to obtain the wall thickness distribution data. Based on the wall thickness distribution data and the material characteristic parameters, the structural stiffness coefficient of each analysis unit is calculated, the thin-walled weak stiffness area is identified, and a stiffness distribution table is constructed. The stiffness distribution table is fused with the processing key area table, and the cutting force safety threshold is established according to the regional importance and stiffness characteristics to generate the regional cutting force restriction conditions. According to these restriction conditions, the maximum allowable cutting depth and optimal feed speed of each area are derived, and the expected deformation under the parameters is calculated to form a processing parameter-deformation relationship table. Based on this relationship table, customized processing parameters are assigned to different areas of the box workpiece, and deformation monitoring thresholds are set to obtain the cutting depth and feed speed adjustment values for each area.
[0032] The processing module 105 divides the box processing task into rough processing layer and fine processing layer according to the cutting depth and feed speed adjustment value, creates an independent tool parameter table, and generates a multi-level processing plan. Generate a sequence of initial tool contact points for each processing area, and calculate the tool axial vector at each contact point to obtain a tool posture point set. The tool posture point set is subjected to interference analysis through the tool envelope volume, and the potential collision area between the tool and the inner cavity structure of the box is detected to generate an interference risk map. According to the interference risk map, the tool posture point set is replanned, and the collision area is avoided by limiting the safety distance and adjusting the tool axis inclination angle to obtain an interference-free tool trajectory. For the path segment passing through the thin-walled area in the interference-free tool trajectory, a segmented cutting-in and cutting-out strategy and progressive cutting depth control are adopted to reduce the influence of cutting force on thin-wall deformation, thereby forming an optimized trajectory for the thin-walled area. The interference-free tool trajectory and the optimized trajectory for the thin-walled area are merged, and the tool advance and retreat safety area and the tool exchange position are added to generate a five-axis machining instruction sequence containing the advance and retreat strategy.
[0033] During the execution of the five-axis machining instruction sequence, the comparison module 106 collects real-time machining state information, including cutting force signals, vibration signals, and surface topography data, through a multi-sensor array to obtain the original monitoring data of the machining process. Feature extraction and signal processing are performed on the original monitoring data to filter out noise and identify key machining state indicators to obtain machining state feature quantities. The machining state feature quantities are compared and analyzed with the pre-set ideal machining parameters, the degree of deviation of each machining indicator is calculated, and a machining deviation distribution table is generated. According to the table, the machining paths that have not yet been executed are corrected in real time, the cutting parameters and the tool feed trajectory are adjusted, and dynamically optimized subsequent machining instructions are obtained. During the execution of the subsequent machining instructions, the cutting state and surface quality of the key machining areas are continuously monitored, a mapping relationship between the machining parameters and the machining quality is established, and machining effect evaluation data is obtained. The dynamically optimized subsequent machining instructions and the machining effect evaluation data are integrated and recorded to form real-time compensation data and quality control records for the entire workpiece machining process.
[0034] In a specific embodiment, the calibration module 101 is specifically configured to:
[0035] The multi-view image data of the box workpiece is synchronously acquired by the industrial-grade high-definition cameras arranged in a ring to obtain the original image data group;
[0036] Performing image preprocessing on the original image data group, including denoising, grayscale conversion and contrast enhancement, to obtain enhanced image data;
[0037] Identifying reflective marking points pre-attached to the surface of the box workpiece in the enhanced image data to obtain a set of image coordinates of the marking points;
[0038] The camera intrinsic parameter matrix is obtained by calculating the spatial correspondence between the actual spatial position of the known marker point and the marker point image coordinate set;
[0039] According to the camera intrinsic parameter matrix and the relative position relationship between different cameras, a conversion equation between the camera coordinate system and the machine tool coordinate system is established to obtain a coordinate system transformation matrix;
[0040] The camera intrinsic parameter matrix and the coordinate system transformation matrix are combined to generate a camera parameter and machine tool space coordinate mapping table.
[0041] Specifically, the calibration module 101 uses a ring-shaped array of industrial-grade high-definition cameras to synchronously capture multi-view image data of a box-shaped workpiece, generating a raw image data set. In the five-axis CNC machining of complex boxes, due to the complexity of the box structure, at least three to five high-definition cameras are required to form a ring-shaped coverage structure to obtain comprehensive visual information. These cameras typically use industrial-grade CCD or CMOS sensors with a resolution of 1920×1080 pixels or higher. They feature a synchronized triggering function to ensure simultaneous capture of images of the box-shaped workpiece from different perspectives. This synchronized triggering is achieved via hardware synchronization signals, with microsecond-level error control, ensuring temporal consistency of the multi-view data. The raw images captured by each camera constitute a raw image data set, which contains the surface texture, geometric features, and pre-applied reflective markers of the box-shaped workpiece. Image preprocessing, including denoising, grayscaling, and contrast enhancement, is performed on the raw image data set to generate enhanced image data. Denoising employs a median filter or Gaussian filter algorithm to effectively remove random noise introduced by machine tool vibration and ambient lighting variations. Grayscaling converts RGB color images into single-channel grayscale images, simplifying subsequent calculations and increasing processing speed. Contrast enhancement is achieved through histogram equalization or adaptive histogram equalization techniques, enhancing the contrast between reflective markers and the background in the image, facilitating subsequent marker detection. The preprocessed image data has a higher signal-to-noise ratio and clarity. Reflective markers pre-attached to the surface of the box workpiece are identified in the enhanced image data, generating a set of marker image coordinates. Reflective markers are typically made of highly reflective material, with diameters ranging from 1 to 5 mm and a regular circular or cross shape. They are attached to key locations on the box workpiece, such as edges, corners, and flat surfaces. Marker recognition utilizes threshold segmentation combined with morphological processing. High-brightness regions are segmented using an adaptive threshold. Morphological closing operations are then used to fill small holes and opening operations to remove small noise points. Finally, connected component analysis is used to select regions that meet the marker size and shape characteristics. The centroid coordinates of each marker region are calculated to form a set of marker image coordinates, recording the 2D pixel coordinates of each marker in each camera image plane. The camera intrinsic parameter matrix is calculated by calculating the spatial correspondence between the actual spatial positions of known markers and the marker image coordinate set. The actual spatial positions of the markers are pre-measured using a high-precision three-dimensional coordinate measuring machine with micron-level accuracy. The camera intrinsic parameter matrix describes the internal geometric and optical characteristics of the camera, including focal length, principal point coordinates, and lens distortion coefficients. The calculation process is based on the pinhole camera model, constructing a mapping relationship between the actual spatial coordinates of the markers and image coordinates. The intrinsic parameter matrix is then solved using the least squares method. In practice, the Zhang calibration method is commonly used to extract the camera intrinsic parameters by analyzing the projection relationship of the markers in multiple poses.
[0042] Based on the camera intrinsic parameter matrix and the relative positional relationships between different cameras, the transformation equations between the camera coordinate system and the machine coordinate system are established, resulting in the coordinate system transformation matrix. One camera is designated as the reference camera to establish the camera coordinate system. The pose relationships of the other cameras relative to the reference camera are then calculated to obtain the relative transformation matrix between the cameras. The transformation between the camera coordinate system and the machine coordinate system is established by establishing a correspondence between marker points with known coordinates. The rigid body transformation parameters, including the rotation matrix and translation vector, are solved, collectively known as the coordinate system transformation matrix. This calculation is typically performed using SVD decomposition or quaternion methods to ensure transformation accuracy. The camera intrinsic parameter matrix and the coordinate system transformation matrix are combined to generate a mapping table between camera parameters and machine space coordinates. This mapping table contains the complete transformation relationship from image coordinates to machine space coordinates and serves as the basis for subsequent 3D reconstruction and pose estimation. Specifically, for any point in the image, the ray direction in the camera coordinate system can be obtained by back-projecting the intrinsic parameter matrix. This ray direction is then converted to the machine coordinate system using the coordinate system transformation matrix to determine the point's position in the machine space.
[0043] Taking the processing of a certain aircraft engine case part as an example, the case must be precisely positioned before processing. Calibration module 101 uses four industrial cameras arranged in a circle to capture multi-view images of the case, with 12 reflective markers pre-attached to the surface. After image preprocessing, the system clearly identifies all markers from four perspectives and generates a set of marker image coordinates. By comparing and calculating the actual spatial positions of the pre-measured markers, the intrinsic parameter matrix of each camera is obtained, and the transformation relationship between the camera coordinate system and the machine tool coordinate system is determined. The generated coordinate mapping table enables the system to accurately map any feature point in the image to the machine tool coordinate system.
[0044] In a specific embodiment, the extraction module 102 is specifically configured to:
[0045] Perform edge detection on the multi-angle image using the Canny operator to extract two-dimensional edge information of the box workpiece to obtain an edge feature map;
[0046] Performing geometric feature analysis on the edge feature map to identify straight lines, arcs and curved surfaces to obtain box outline geometric structure data;
[0047] Converting the box outline geometric structure data from two-dimensional image coordinates to three-dimensional space coordinates according to the camera parameters to obtain single-view three-dimensional feature points;
[0048] Unifying the single-view three-dimensional feature points at different viewing angles into a machine tool coordinate system using the machine tool space coordinate mapping table to obtain a multi-view feature point set;
[0049] Performing data cleaning on the multi-view feature point set to remove redundant points and noise points, and performing spatial consistency verification to obtain a streamlined feature point set;
[0050] The simplified feature point set is merged and optimized through a three-dimensional space splicing algorithm to construct a geometric expression of the box workpiece, thereby obtaining a three-dimensional feature point data set of the box workpiece.
[0051] Specifically, the extraction module 102 performs edge detection on multi-angle images using the Canny operator to extract two-dimensional edge information of the box workpiece and generate an edge feature map. The Canny operator, a classic edge detection algorithm, is particularly suitable for extracting edges on complex box surfaces. During this process, the Canny operator applies a Gaussian filter to the image to smooth it and suppress noise. It then calculates the image's gradient magnitude and direction to determine the strength and direction of the edge. Non-maximum suppression is then performed to retain local maxima along the gradient direction. Finally, a dual-thresholding method is used to connect edge points to form a complete edge contour. For complex boxes, the Canny operator's high and low thresholds are typically set to relative values, such as 70% and 30% of the box image's gradient magnitude, to ensure that key structural edges are effectively captured without introducing excessive noise. The edge feature map is a binary image, where pixels with a value of 255 represent edge locations and form the contour lines of the box workpiece surface. Geometric feature analysis is performed on the edge feature map to identify geometric elements such as lines, arcs, and curved surfaces, thereby obtaining the geometric structure data of the box contour. Geometric feature analysis is achieved using algorithms such as the Hough transform and contour fitting. Line detection uses the Hough line transform to convert edge points into parameter space and identify the parameters of the line segments. Arc detection uses the Hough circle transform or least squares arc fitting to extract the center and radius parameters. For complex surfaces, B-spline curve fitting or multi-segment broken line approximation is used. The geometric analysis process also includes the extraction of topological relationships, such as the intersection of lines and the tangent points of lines and arcs. The box contour geometry data is stored in a parametric form, including the type of geometric elements, position parameters, and topological relationships, forming a structured description of the box's two-dimensional contour.
[0052] Based on the camera parameters, the box outline geometry data is converted from 2D image coordinates to 3D spatial coordinates to obtain single-view 3D feature points. This step utilizes the camera intrinsic parameter matrix obtained by the calibration module for back-projection calculations. For each 2D image point, the corresponding 3D ray direction is calculated using the camera intrinsic parameter matrix. The point's actual spatial position is then determined using matching points or known depth information from the multi-view images. For structured geometric elements such as lines and arcs, the back-projection process preserves their geometric properties and directly converts the parameters into 3D space. Single-view 3D feature points contain the spatial position information of the box surface geometric features observed from a single camera perspective, but are limited to the surface portion visible from that perspective. A machine tool spatial coordinate mapping table is used to unify the single-view 3D feature points from different perspectives into the machine tool coordinate system, resulting in a multi-view feature point set. The machine tool spatial coordinate mapping table contains the transformation matrices from each camera coordinate system to the machine tool coordinate system. These transformation matrices are used to transform the single-view 3D feature points from their respective camera coordinate systems to the unified machine tool coordinate system. The transformation process includes rotation and translation operations. The transformed feature points are merged into a set to form a multi-view feature point set, which covers the geometric features of multiple visible surfaces of the box workpiece.
[0053] The multi-view feature point set is cleaned to remove redundant and noisy points, and spatial consistency verification is performed to obtain a streamlined feature point set. Data cleaning involves spatial clustering, merging closely spaced feature points to reduce redundant data. Statistical analysis is then used to identify and remove outliers, such as isolated points or points with significantly abnormal distances from surrounding points. A geometric consistency check is then performed to verify that the spatial relationships between feature points conform to rigid geometric constraints, and points that do not conform are removed. Spatial consistency verification also includes checking the distribution density of feature points to ensure that critical areas such as corners and edges are sufficiently densely covered by feature points. This streamlined feature point set significantly reduces data volume while preserving key geometric information about the box, improving the efficiency and accuracy of subsequent processing. The streamlined feature point set is then merged and optimized using a 3D spatial stitching algorithm to construct a complete geometric representation of the box workpiece, resulting in a 3D feature point dataset for the box workpiece. This 3D spatial stitching algorithm utilizes techniques such as iterative closest point (ICP) to precisely align and fuse feature points from different viewpoints. The stitching process establishes correspondences between feature points. The relative pose between viewpoints is then optimized by minimizing the sum of squared distances between pairs of corresponding points, with repeated iterations until convergence. The optimized feature points undergo global adjustments to eliminate inconsistencies between viewpoints and form a unified description of the box-shaped workpiece geometry. The 3D feature point dataset is a structured spatial point cloud containing key geometric feature points on the box-shaped workpiece surface, along with their spatial positions, normals, and geometric attributes. This provides an accurate geometric model for subsequent pose determination and machining path planning.
[0054] Taking the machining of an aircraft engine compressor case as an example, this case features complex internal and external contours and multiple precision connecting flanges. Extraction module 102 extracts edge features using the Canny operator from high-definition images captured from four different angles. During the extraction process, the algorithm adjusts the Canny thresholds to 65% and 25% of the maximum image gradient, respectively, to account for the metallic sheen of the case's surface. This effectively extracts edge contours while suppressing light spot interference. The geometric feature analysis phase identifies 32 linear edges, 12 circular arc features, and 8 flange planes on the case. These 2D features are converted into 3D feature points using the camera's intrinsic parameter matrix and depth information. A coordinate mapping table then unifies the feature points from the four viewpoints into the machine tool coordinate system. During data cleaning, the system discovered and merged 357 pairs of redundant points with a distance less than 0.1 mm, while removing 24 noise points that deviated from the main structure by more than 2 mm. The ICP algorithm then optimizes the splicing of these feature points, constructing a 3D feature point dataset containing 3,420 key feature points that accurately describes the case's geometric structure.
[0055] In a specific embodiment, the marking module 103 is specifically configured to:
[0056] Comparing the three-dimensional feature point data set with the theoretical design data of the box workpiece to obtain a feature point matching pair set by screening out key point pairs with significant features;
[0057] Performing geometric consistency verification on the feature point matching pair set, eliminating erroneous matching points, and obtaining valid matching point pair data;
[0058] Calculate the rotation matrix and translation vector of the box workpiece in the machine tool coordinate system according to the effective matching point pair data to obtain the initial posture parameters;
[0059] Iteratively optimizing the initial posture parameters to minimize the Euclidean distance error between the actual position and the theoretical position of the feature point, and obtaining an accurate posture transformation matrix;
[0060] Performing spatial analysis on the geometric model of the box workpiece based on the precise posture transformation matrix, identifying difficult processing areas in the inner cavity structure, and obtaining a processing area priority table;
[0061] The precise posture transformation matrix and the processing area priority table are combined and sorted to form the positioning data of the box workpiece and the processing key area table.
[0062] Specifically, the labeling module 103 compares the feature points of the 3D feature point dataset with the theoretical design data of the box workpiece, screens out key point pairs with significant features, and obtains a set of feature point matching pairs. The theoretical design data typically exists in the form of a CAD model. Key feature points are extracted from the CAD model. These feature points include geometrically significant locations such as edge intersections, corners, and the centers of characteristic holes. The comparison process uses a feature descriptor method to calculate a descriptor for each point in the 3D feature point dataset, such as a descriptor based on curvature, normal vector, or local geometry. The descriptor captures the geometric characteristics of the spatial region surrounding the point, making it discriminative. The similarity of the descriptors between the 3D feature points and the points extracted from the CAD model is then calculated, typically using cosine distance or Euclidean distance as a similarity metric. Point pairs are sorted based on similarity, and those with a similarity above a threshold are selected as candidate matching pairs. To improve matching accuracy, local geometric consistency constraints are also considered to ensure that the spatial relationships between adjacent feature points remain consistent in the actual and theoretical data. The resulting set of feature point matching pairs contains the corresponding relationships between the 3D feature point dataset and the theoretical design data.
[0063] The geometric consistency of the feature point matching pair set is verified, and the wrong matching points are eliminated to obtain valid matching point pair data. Geometric consistency verification is based on the principle of rigid body transformation invariance, that is, the distance between any two points on the same rigid body remains unchanged before and after the transformation. The verification process constructs a distance consistency matrix and calculates the distance difference between the points in the matching point pairs. Specifically, for any two pairs of matching points A and B, where point A comes from the three-dimensional feature point dataset and point B comes from the theoretical design data, the distance between the two points is calculated. If the value is less than the preset threshold, the two pairs of matching points are considered to be geometrically consistent. By constructing a consistency graph of matching point pairs, the RANSAC (random sampling consistency) algorithm is applied to identify the largest geometrically consistent subset. RANSAC randomly selects a small number of matching point pairs, calculates the transformation matrix, and then verifies the consistency of other point pairs under the transformation, and iterates repeatedly to find the transformation with the highest support. Matching points that do not meet the geometric consistency are eliminated to obtain valid matching point pair data. These point pairs are reasonably distributed in space and conform to the rigid body transformation relationship.
[0064] The rotation matrix and translation vector of the box workpiece in the machine tool coordinate system are calculated based on the valid matching point pair data to obtain the initial posture parameters. The calculation process can be expressed as solving the following minimization problem:
[0065] ;
[0066] in, Represents the rotation matrix, which is a 3×3 matrix used to describe the rotation transformation of the box workpiece; Represents the translation vector, which is a 3×1 vector used to describe the translation transformation of the box workpiece; is the i-th point in the three-dimensional feature point dataset, which is a 3×1 coordinate vector; is the point in the corresponding theoretical design data, which is also a 3×1 coordinate vector; is the weight coefficient of the i-th pair of matching points, which is a scalar and is usually proportional to the matching confidence of the point pair; is the total number of valid matching point pairs, which is a positive integer.
[0067] A common method to solve this minimization problem is singular value decomposition (SVD). The specific steps are: calculate the centroid of the two groups of points:
[0068] ;
[0069] ;
[0070] in, is the weighted centroid of the 3D feature point dataset, are the weighted centroids of the theoretical design data, both are 3×1 vectors.
[0071] Then subtract the centroids of the two groups of points and construct the covariance matrix:
[0072] ;
[0073] in, is a 3×3 covariance matrix that describes the spatial correlation between two sets of points.
[0074] Perform singular value decomposition on the covariance matrix C:
[0075] ;
[0076] Among them, U and W are both 3×3 orthogonal matrices, It is a 3×3 diagonal matrix with singular values on its diagonal.
[0077] Calculate the rotation matrix:
[0078] ;
[0079] And check whether its determinant is 1 to ensure the correct rotation direction. If the determinant is -1, you need to multiply the last column of W by -1 and recalculate M.
[0080] Finally calculate the translation vector:
[0081] ;
[0082] The M and V calculated in this way constitute the initial posture parameters of the box workpiece in the machine tool coordinate system.
[0083] The initial pose parameters are iteratively optimized to minimize the Euclidean distance error between the actual and theoretical positions of the feature points, thereby obtaining a precise pose transformation matrix. This iterative optimization utilizes nonlinear least squares methods, such as the Levenberg-Marquardt algorithm. This algorithm combines the advantages of gradient descent and the Gauss-Newton method and is particularly well-suited for solving nonlinear least squares problems. During the optimization process, the rotation matrix is typically represented as quaternions or Euler angles to reduce the number of parameters and avoid orthogonality constraints on the rotation matrix. Each iteration calculates the Euclidean distance error between the actual and theoretical positions of the feature points, and the pose parameters are adjusted to reduce the overall error. To improve optimization stability, robust kernel functions such as the Huber loss or Tukey loss are employed to mitigate the influence of outliers. Iterations terminate when the error change falls below a set threshold or when the maximum number of iterations has been reached. The resulting rotation matrix and translation vectors form a precise pose transformation matrix, accurately describing the spatial position and pose of the box-shaped workpiece in the machine tool coordinate system. Based on the precise pose transformation matrix, spatial analysis of the box-shaped workpiece's geometric model is performed to identify challenging machining areas and high-precision functional surfaces within the internal cavity structure, thereby generating a priority list of machining areas. Spatial analysis transforms the theoretical CAD model into the machine coordinate system using a precise pose transformation matrix, ensuring the model aligns with the actual workpiece position. Accessibility analysis then assesses whether the machine tool can reach each area within the housing cavity, taking into account tool length, diameter, and machine range limitations. For each accessible area, a difficulty index is calculated, taking into account factors such as depth (deeper, more difficult to machine), spatial confinement (a measure of the limited space available for tool operation), surface inclination (surfaces perpendicular to the tool axis are easier to machine), and wall thickness (thin-walled areas are more challenging to machine). Functional requirements are also considered, with higher priority assigned to areas requiring high precision, such as mating surfaces and sealing surfaces. Based on these analysis results, a machining area priority table is generated, containing information on area division, difficulty index, precision requirements, and priority ranking. The precise pose transformation matrix and the machining area priority table are combined to generate positioning data for the housing and a table of key machining areas. This positioning data contains the precise position and posture of the housing in the machine coordinate system, stored as a rotation matrix and translation vectors, and includes error estimates and reliability scores. The key machining area table is stored as structured data. Each area entry includes the area ID, spatial extent description (typically a 3D bounding box or polygon), machining difficulty index, precision requirements, machining priority, and recommended machining parameters (such as feed rate and cutting depth range). The topological relationships between machining areas are also recorded to plan the optimal machining sequence. The positioning data and the key machining area table are combined to form a comprehensive data structure, which serves as the basis for subsequent cutting parameter planning and toolpath generation.
[0084] Taking a complex aircraft engine housing as an example, this housing features deep internal grooves, thin-walled structures, and multiple precision mating surfaces. The marking module 103, processing a 3D feature point dataset, identified 3,876 key feature points from 25,647 points and compared them with the CAD model. Using curvature and normal feature descriptors, 2,764 initial matching point pairs were selected. Geometric consistency was verified using the RANSAC algorithm with 200 iterations and a distance tolerance of 0.15 mm, retaining 2,485 valid matching point pairs. Based on these matching point pairs, the SVD algorithm was used to calculate initial pose parameters. The Levenberg-Marquardt algorithm was then used for 10 iterations of optimization, reducing the average Euclidean distance error from an initial 0.32 mm to 0.08 mm. Analysis of the housing cavity identified 14 machining areas, including three deep grooves (over 150 mm deep), four thin-walled areas (less than 5 mm thick), and two high-precision mating surfaces (required accuracy of ±0.02 mm). These areas were sorted by difficulty and precision requirements to generate a priority table. Positioning data and the table of key machining areas guided the development of the machining strategy for the five-axis CNC machine tool. A long tool, low-speed cutting strategy was adopted for deep grooves, multiple light cuts were used for thin-walled areas, and a refined machining path was used for mating surfaces. This achieved the required machining accuracy while effectively avoiding the risks of thin-wall deformation and tool chatter.
[0085] In a specific embodiment, the recording module 104 is specifically configured to:
[0086] Virtually slicing the box workpiece according to the positioning data, dividing the box structure into multiple discrete analysis units, and obtaining a box partition data map;
[0087] Performing wall thickness distribution measurement on each analysis unit in the box partition data diagram, calculating the wall thickness value of each point by surface normal sampling, and obtaining wall thickness distribution data;
[0088] Calculating the structural stiffness coefficient of each analysis unit based on the wall thickness distribution data combined with material characteristic parameters, and identifying thin-walled weak stiffness areas to obtain a stiffness distribution table;
[0089] The stiffness distribution table is merged with the key processing area table, and a cutting force safety threshold is established according to the regional importance and stiffness characteristics to obtain the regional cutting force restriction condition;
[0090] The maximum allowable cutting depth and optimal feed rate of each area are derived according to the cutting force constraint conditions of the area, and the expected deformation is calculated to obtain a machining parameter-deformation relationship table;
[0091] Based on the processing parameter-deformation relationship table, customized processing parameters are allocated to different areas of the box workpiece, and deformation monitoring thresholds are set to obtain cutting depth and feed speed adjustment values for each area.
[0092] Specifically, the recording module 104 virtually slices the box workpiece based on the positioning data, dividing the box structure into multiple discrete analysis units and generating a box partition data graph. Virtual slicing is a digital partitioning technique that slices a 3D box model along its primary coordinate axes or feature directions to form a series of smaller, easily analyzable subregions. Slicing typically employs two strategies: uniform grid slicing and feature-adaptive slicing. Uniform grid slicing divides the box space into a regular grid at fixed intervals and is suitable for areas with relatively uniform structures. Feature-adaptive slicing dynamically adjusts the grid density based on the complexity of the box's geometric features, employing finer divisions in areas with dramatic geometric changes (such as corners and curved transitions). Discrete analysis units are the basic computational units formed after slicing. Each unit contains geometric information (3D coordinates, volume, surface area) and topological information (neighboring unit relationships). The box partition data graph is a collection of these discrete analysis units, stored in a graph structure, with nodes representing analysis units and edges representing adjacency relationships between units, facilitating subsequent parallel computation and local analysis. The wall thickness distribution of each analysis unit in the box partition data diagram is measured, and the wall thickness value of each point is calculated by surface normal sampling to obtain the wall thickness distribution data. The wall thickness measurement adopts the ray projection method. For the outer surface point of each analysis unit, a virtual ray is emitted inward along the surface normal direction until the ray intersects with the box surface again. The distance between the two intersection points is the wall thickness value of the point. The surface normal sampling points are selected using a uniform distribution strategy to ensure that the sampling points cover the entire surface of the analysis unit, while increasing the sampling density in areas with large curvature changes. For complex inner cavity structures, it is also necessary to deal with the situation where the ray passes through multiple times. The nearest intersection point strategy is usually adopted, that is, the intersection point closest to the starting point is taken to calculate the wall thickness. The wall thickness distribution data includes the three-dimensional coordinates, normal vector direction and corresponding wall thickness value of each sampling point, which are stored in the form of a discrete point set, and a continuous wall thickness distribution field is generated through an interpolation algorithm to realize wall thickness query at any position in the analysis unit.
[0093] Based on the wall thickness distribution data combined with the material characteristic parameters, the structural stiffness coefficient of each analysis unit is calculated, and the thin-walled weak stiffness area is identified to obtain the stiffness distribution table. The calculation of the structural stiffness coefficient takes into account three key factors: material elastic modulus, wall thickness and local geometric shape, and can be expressed by the following formula:
[0094] ;
[0095] in, It represents the structural stiffness coefficient of the i-th analysis unit in the j-th material area, in N / mm; represents the elastic modulus of the jth material, in GPa; represents the average wall thickness of the i-th analysis unit, in mm; It is the reference wall thickness value, usually the design standard wall thickness, in mm; is the stiffness proportionality factor, which is used to adjust the dimension of stiffness calculation and is dimensionless; It is the wall thickness effect index, usually with a value of 2~3, reflecting the nonlinear effect of wall thickness change on stiffness, and is dimensionless; is the geometric shape correction function, which is related to the local curvature of the i-th analysis unit Related, dimensionless. For a plane region, Close to 1; for areas with large curvature, If it is less than 1, it means that the stiffness of the curved structure is reduced. After calculating the structural stiffness coefficient of each analysis unit, set the stiffness threshold ,when The stiffness distribution table records the location, material type, average wall thickness, local curvature, structural stiffness coefficient and weak stiffness area mark of each analysis unit.
[0096] The stiffness distribution table is fused with the key machining area table. A cutting force safety threshold is established based on regional importance and stiffness characteristics, resulting in regional cutting force constraints. The data fusion process is based on spatial position matching, associating stiffness data with key machining area information that has the same or overlapping spatial locations. Regional importance is a weighting factor extracted from the key machining area table, reflecting the functional importance, precision requirements, and machining difficulty of the area. The calculation of the cutting force safety threshold takes into account the dual constraints of stiffness characteristics and regional importance. On the one hand, it is necessary to ensure that the cutting process does not cause excessive workpiece deformation, and on the other hand, it is necessary to meet the precision requirements of the key functional areas. For each identified machining area, the cutting force constraints are calculated, including the maximum allowable cutting force and the cutting force direction constraints. For thin-walled, weak-stiffness areas, the cutting force constraints are more stringent, requiring a smaller cutting depth and lower feed rate. For functionally important areas, even if the stiffness is sufficient, conservative cutting parameters must be used to ensure machining accuracy. Regional cutting force constraints are stored as structured data, with each area entry containing the spatial location, maximum allowable cutting force, and direction constraint information.
[0097] Based on the regional cutting force constraints, the maximum allowable cutting depth and optimal feed rate for each region are derived. The expected deformation under these parameters is also calculated, resulting in a machining parameter-deformation relationship table. Empirical relationships exist between cutting parameters and cutting forces. Typically, cutting force prediction models are used to map parameters such as cutting depth and feed rate to cutting forces. By applying these relationships in reverse, the upper limit of the cutting parameters can be derived from the cutting force constraints. Specifically, for each machining region, the appropriate tool type and diameter are determined. Then, based on empirical material cutting formulas, the expected cutting forces for different cutting depth and feed rate combinations are calculated. These expected cutting forces are compared with the regional cutting force constraints to select cutting parameter combinations that meet the requirements. Finite element analysis or a simplified beam model is then used to estimate the expected workpiece deformation under these parameter combinations. The optimal cutting depth and feed rate combination is selected by balancing machining efficiency and deformation control requirements. The machining parameter-deformation relationship table records the spatial location, tool information, maximum allowable cutting depth, recommended feed rate range, and corresponding expected deformation for each region.
[0098] Based on the machining parameter-deformation relationship table, customized machining parameters are assigned to different areas of the box workpiece, and deformation monitoring thresholds are set to obtain the cutting depth and feed speed adjustment values for each area. The customized parameter allocation process takes into account the smooth transition between areas to avoid machining marks caused by parameter mutations. For adjacent areas, a parameter gradient strategy is adopted to ensure that the cutting depth and feed speed change smoothly along the machining path. The deformation monitoring threshold is set based on the expected deformation plus a safety margin. When the deformation detected during actual machining exceeds the threshold, the parameter automatic adjustment mechanism is triggered. The cutting depth and feed speed adjustment values include not only the absolute parameter values of each area, but also rules for dynamic adjustment based on real-time monitoring results, such as the deceleration ratio when the deformation exceeds the threshold and the cutting depth reduction strategy. The generated regional cutting parameter data structure clearly defines the optimal machining strategy for each part of the box and supports the intelligent machining process control of five-axis CNC machine tools.
[0099] Taking the machining of an aircraft engine casing as an example, this casing is made of high-strength aluminum alloy and features a complex internal cavity and multiple precision mating surfaces. Recording module 104 divides the casing model into 156 analysis units, using a finer division in key areas such as thin-wall transition sections. The wall thickness distribution of each unit was measured using the normal ray method, revealing that the casing wall thickness ranged from 8mm to 2.5mm, with the wall thickness of one internal cavity sidewall area being only 2.8mm. For the aluminum alloy material (elastic modulus 70GPa), the structural stiffness coefficient of each unit was calculated based on the measured wall thickness data. The stiffness coefficient of the thin-walled area (2.5-3.0mm) was significantly lower than that of other areas, particularly a curved thin-walled area within the internal cavity, where the stiffness coefficient was less than 15% of that of the standard wall thickness area. By integrating this information with the table of key processing areas, the safe cutting force threshold for this curved thin-walled area was determined to be 180N. Based on this threshold, it is deduced that the maximum cutting depth in this area is 0.4mm, the recommended feed rate is 300-400mm / min, and the expected maximum deformation is 0.06mm. Taking into account that there is a precision mating surface near this area (tolerance requirement ±0.05mm), the system further limits the deformation monitoring threshold to 0.04mm. The generated partition parameter table stipulates that a φ12mm ball end milling cutter, a cutting depth of 0.35mm, and a feed rate of 350mm / min are used in this area, and deformation is monitored in real time during the processing. Once the deformation exceeds 0.04mm, the feed rate is immediately reduced to 250mm / min and the cutting depth is reduced to 0.25mm. This parameter optimization strategy ensures that the thin-walled area does not deform excessively while ensuring processing accuracy, and successfully processes complex box parts that meet the design requirements.
[0100] In a specific embodiment, the processing module 105 is specifically configured to:
[0101] According to the cutting depth and feed speed adjustment values, the box body processing task is divided into a rough processing layer and a fine processing layer, and an independent tool parameter table is created for each layer to obtain a multi-level processing plan;
[0102] generating a sequence of initial tool contact points for each machining area in the multi-level machining plan, and calculating a tool axial vector at each contact point to obtain a tool pose point set;
[0103] Performing interference analysis on the tool pose point set through the tool envelope volume to detect potential collision areas between the tool and the inner cavity structure of the box, and obtaining an interference risk map;
[0104] Replanning the path of the tool pose point set according to the interference risk map, avoiding the collision area by limiting the safety distance and adjusting the tool axis tilt angle, and obtaining an interference-free tool trajectory;
[0105] For the path segment passing through the thin-walled area in the non-interference tool trajectory, a segmented cutting-in and cutting-out strategy and progressive cutting depth control are adopted to reduce the influence of cutting force on thin-wall deformation and obtain an optimized trajectory for the thin-walled area;
[0106] The non-interference tool trajectory and the thin-wall area optimized trajectory are merged, and a tool advance and retreat safety area and a tool exchange position are added to generate a five-axis machining instruction sequence including a tool advance and retreat strategy.
[0107] Specifically, processing module 105 divides the box machining task into roughing and finishing layers based on depth of cut and feed rate adjustments. A separate tool parameter table is created for each layer, resulting in a multi-level machining plan. This layered machining strategy is the foundation of five-axis machining of complex boxes. The roughing layer primarily aims to quickly remove a large amount of material, typically employing a larger depth of cut and feed rate, with lower precision requirements. The finishing layer, on the other hand, aims to achieve high-precision surface quality, employing a smaller depth of cut and a moderate feed rate. The layering process starts with a three-dimensional model of the box workpiece and, in combination with positioning data, determines the material allowance distribution between the initial blank and the target finished product. This allowance is then divided into multiple machining layers based on the preset layer spacing. The tool parameter table for each layer includes tool type, tool diameter, cutting edge length, recommended spindle speed range, cutting depth, and feed rate. For the roughing layer, a larger diameter end mill or disc milling cutter is typically selected to improve material removal rate. For the finishing layer, a ball-end milling cutter is preferred for better surface quality, especially on curved areas. A multi-level machining plan is a hierarchical data structure that contains the spatial boundaries, tool parameters, and machining sequence information of each machining layer.
[0108] For each machining area in a multi-level machining plan, a sequence of initial tool contact points is generated, and the tool axis vector at each contact point is calculated to obtain a set of tool pose points. The initial tool contact point sequence is a discrete set of points where the tool contacts the workpiece surface, representing the tool's spatial trajectory. These contact points are typically generated using the isoparametric line method, the contour line method, or the region filling method. The isoparametric line method is suitable for parametric surfaces, generating a regularly distributed tool path along the surface's parametric direction. The contour line method layers three-dimensional surfaces at equal heights, generating machining paths similar to the contour lines in a topographic map. The region filling method is primarily used for planar areas or shallow surfaces, using a parallel or spiral filling strategy. For each contact point, the tool axis vector—the spatial orientation of the tool's center axis—must also be determined. In three-axis machining, the tool axis is typically fixed to the vertical. In five-axis machining, however, the tool axis can be flexibly adjusted, typically using one of the following strategies: the normal strategy (where the tool axis aligns with the workpiece surface normal vector), the guide curve strategy (where the tool axis follows a predefined spatial curve), or the fixed angle strategy (where the tool axis maintains a fixed angle with respect to a specific direction). The tool pose point set comprehensively expresses the complete motion information of the tool in space. Each point contains the three-dimensional coordinates of the tool contact point and the corresponding tool axial vector.
[0109] Interference analysis is performed on the tool pose point set using the tool envelope volume to detect potential collision areas between the tool and the box cavity structure, generating an interference risk map. The tool envelope volume refers to the volumetric area swept by the tool in space, including the tool body, tool holder, and part of the spindle structure. Tool interference is particularly prominent in complex box cavity machining due to space constraints. Interference analysis uses a geometric collision detection algorithm to calculate the spatial intersection of the tool envelope volume and the box workpiece model. The specific implementation typically consists of two stages: coarse detection and fine detection. The coarse detection stage uses a simplified geometric model (such as a bounding box, sphere, or cylinder) to quickly screen for potential collision areas. The fine detection stage uses a refined geometric model to perform detailed collision detection on these candidate areas. For each tool pose point, the tool envelope volume is calculated to determine whether it intersects with the box model at that pose. If so, it is marked as a potential collision point. The interference risk map is a spatial distribution that records the location, collision severity, and collision type (such as tool tip collision, tool holder collision, or spindle collision) of all potential collision areas.
[0110] Based on the interference risk map, the tool pose point set is replanned. Collision zones are avoided by using safety distance constraints and tool axis tilt angle adjustments, resulting in an interference-free tool path. Path replanning is an iterative optimization process that applies a corresponding avoidance strategy for each collision zone marked in the interference risk map. Safety distance constraints require a minimum distance between the tool and the inner chamber wall, typically determined based on machining accuracy requirements and vibration risk. Tool axis tilt angle adjustment is a unique advantage of five-axis machining. By changing the angle between the tool axis vector and the workpiece surface normal, the toolholder and spindle are moved while maintaining the cutting point position, thereby avoiding potential collisions. For collision zones that cannot be resolved through simple adjustments, the tool contact point sequence must be replanned, which may involve partitioning the machining process or using a tool of a different length and shape. The path replanning process uses a heuristic search algorithm to find the optimal collision-free tool path while meeting machining accuracy requirements. The resulting interference-free tool path ensures that the tool safely reaches all required machining areas.
[0111] For segments of the non-interference tool path that pass through thin-walled areas, a segmented entry / exit strategy and progressive depth of cut control are employed to reduce the impact of cutting forces on thin-wall deformation, resulting in an optimized trajectory for these areas. Thin-walled areas are challenging to machine in box bodies. Due to their low stiffness, they are prone to deformation during cutting, resulting in reduced machining accuracy and even workpiece scrap. The segmented entry / exit strategy breaks down the continuous cutting process into multiple short segments, allowing the thin-walled area time to rebound and dissipate heat after each segment, thereby reducing cumulative and thermal deformation. Specifically, the original continuous tool path in the thin-walled area is divided into multiple segments of appropriate length, with micro-lifts between each segment. Progressive depth of cut control gradually reduces the cutting depth as the tool approaches the thin-walled area, ensuring a smooth transition between cutting forces and vibration and deformation. This depth of cut control typically uses a spline function to define the spatial rate of change in the cutting depth to ensure a smooth transition. Integrating stiffness distribution data for the thin-walled area allows for local optimization of cutting parameters, further reducing the cutting depth and feed rate in weaker locations. After these optimization steps, the resulting optimized trajectory for the thin-walled area ensures machining efficiency while effectively controlling thin-wall deformation. The non-interference tool trajectory and the optimized trajectory for the thin-walled area are merged, and tool entry and exit safety zones and tool exchange positions are added to generate a five-axis machining instruction sequence that includes the entry and exit strategies. The trajectory merging process organizes trajectory segments from different areas into a coherent sequence based on spatial location and machining order, then addresses transitions between trajectory segments. For trajectory segments requiring rapid mid-air movement, tool lift height and safety plane information are added to ensure that the tool does not collide with the workpiece during non-cutting movements. The tool entry and exit safety zone is a buffer zone before and after the tool enters and exits the cutting state. It is typically designed as a gradual trajectory that gradually approaches or departs from the workpiece to avoid impact caused by sudden contact or departure. The tool exchange position is the specific position to which the machine must move when changing tools. These positions must take into account the machine's workspace and tool changer layout. Finally, the merged spatial trajectory is converted into a machining instruction format recognizable by the CNC machine tool, such as G-code, which contains information such as tool coordinates, attitude angle, feed rate, and spindle speed. These five-axis machining instruction sequences are the direct input for CNC machine tools to perform machining tasks, and fully describe all the movement details of the tool from the starting point to the end point.
[0112] Take the machining of a complex aircraft engine housing as an example. This housing features deep internal grooves, inclined holes, and thin-walled structures. After receiving the cutting depth and feed rate adjustment values, processing module 105 divides the machining task into three layers of roughing and two layers of finishing. The roughing layer uses a Φ20mm end mill with decreasing cutting depths (5mm → 3mm → 1mm) and a feed rate of 800-1200mm / min. The finishing layer uses a Φ12mm ball-end mill with cutting depths of 0.5mm and 0.2mm and a feed rate of 500-700mm / min. An isoparametric tool path is generated for each machining area, resulting in a total of 12,850 tool contact points. In the internal cavity area, due to space constraints, a tool axial tilt angle strategy is adopted to ensure that the tool maintains a constant angle of 10°-15° with the cavity wall. Interference analysis found that there were 7 areas with potential collision risks at the corners of the inner cavity, 4 of which were collisions between the tool holder and the upper wall of the inner cavity, and 3 were collisions between the tool and the corners of the inner cavity. Through path replanning, the safety distance was increased (from 2mm to 5mm), and the tool axis inclination angle was adjusted (maximum adjustment of 25°), successfully avoiding all collision areas. For the thin-walled area of the box side wall (only 2.5mm thick), a segmented processing strategy was adopted to divide the continuous tool path into short segments with a length of no more than 30mm, and a tool lift height of 0.5mm was set between segments. At the same time, progressive cutting depth control was implemented. Within the range of 700mm before the thin-walled area, the cutting depth smoothly transitioned from the standard value to the reduced value in the thin-walled area (fine processing reduced from 0.5mm to 0.2mm). The generated five-axis machining instruction sequence contains a complete tool advance and retreat strategy, and a 25mm long progressive cutting path is set before each cut into the workpiece to ensure smooth contact. In practical applications, this processing strategy successfully controlled the thin-wall deformation within 0.03 mm, achieving the processing accuracy required by the design.
[0113] In a specific embodiment, the comparison module 106 is specifically configured to:
[0114] During the execution of the five-axis machining instruction sequence, real-time machining status information, including cutting force signals, vibration signals, and surface topography data, is collected through a multi-sensor array to obtain raw monitoring data of the machining process;
[0115] Performing feature extraction and signal processing on the raw monitoring data of the machining process, filtering out noise and identifying key machining state indicators to obtain machining state feature quantities;
[0116] Comparing and analyzing the processing state characteristic quantity with the preset ideal processing parameters, calculating the deviation degree of each processing index, and obtaining a processing deviation distribution table;
[0117] According to the machining deviation distribution table, the machining paths that have not yet been executed in the five-axis machining instruction sequence are corrected in real time, cutting parameters and tool feed trajectory are adjusted, and subsequent machining instructions that are dynamically optimized are obtained;
[0118] During the execution of subsequent machining instructions, the cutting status and surface quality of key machining areas are continuously monitored, a mapping relationship between machining parameters and machining quality is established, and machining effect evaluation data is obtained;
[0119] The dynamically optimized subsequent processing instructions and the processing effect evaluation data are integrated and recorded to form real-time compensation data and quality control records of the entire workpiece processing process.
[0120] Specifically, while executing the five-axis machining instruction sequence, the comparison module 106 uses a multi-sensor array to collect real-time machining status information, including cutting force signals, vibration signals, and surface topography data, to obtain raw monitoring data of the machining process. The multi-sensor array is an integrated monitoring device composed of multiple types of sensors strategically placed at key locations on the five-axis CNC machine tool. Cutting force signals are acquired using a dynamic dynamometer, mounted on the spindle system or worktable. The dynamometer collects cutting force components in the X, Y, and Z directions, typically at a sampling frequency of over 1000 Hz to capture rapidly changing cutting processes. Vibration signals are acquired using an accelerometer, mounted on the spindle housing or workpiece fixture, to monitor mechanical vibration during machining, focusing specifically on the frequency range associated with tool chatter (typically between 100 and 5000 Hz). Surface topography data is acquired in real time using onboard optical sensors, such as laser displacement sensors or structured light scanners, which can measure surface profile and roughness without contacting the workpiece. All sensor data are collected synchronously through high-speed data acquisition cards, and timestamps and corresponding machine tool position information are added to form the original monitoring data stream of the machining process.
[0121] Feature extraction and signal processing are performed on the raw monitoring data of the machining process to filter out noise, identify key machining status indicators, and obtain machining status characteristics. Signal processing preprocessing includes DC offset removal, low-pass filtering to remove high-frequency noise, and outlier detection and elimination. For cutting force signals, the average cutting force, cutting force fluctuation amplitude, and cutting force mutation rate are calculated. For vibration signals, time-frequency domain analysis is performed to extract the main frequency component, amplitude characteristics, and spectral energy distribution. For surface topography data, local surface roughness, shape deviation, and surface waviness are calculated. Feature extraction utilizes a variety of data analysis methods, including statistical analysis (mean, standard deviation, peak value, skewness, etc.), time domain characteristics (rise time, steady-state time, overshoot, etc.), frequency domain characteristics (main frequency, bandwidth, spectral density, etc.), and time-frequency characteristics (wavelet coefficients, short-time Fourier transform, etc.). Complex signals are reduced in dimensionality through principal component analysis to extract key variables and reduce data redundancy. The key machining state indicators include cutting stability index, tool wear index, surface quality index and machining accuracy index. These indicators are calculated through feature combination and constitute the machining state characteristic quantity.
[0122] The machining state characteristics are compared and analyzed with pre-set ideal machining parameters. The deviation of each machining indicator is calculated, and a machining deviation distribution table is generated. The ideal machining parameters are derived from historical success cases, simulation optimization results, or expert experience databases and include the optimal cutting force range, vibration threshold, and surface quality standards under different machining conditions. The comparative analysis uses normalization and weighting to convert different physical quantities and dimensional indicators into a unified evaluation scale. For each machining state characteristic, its relative deviation from the ideal parameters is calculated, and a comprehensive deviation score is derived by combining the importance weights of each indicator. Based on spatial position information, these deviations are mapped onto the workpiece model to form a machining deviation distribution table. This table is stored as structured data, with each record containing the spatial position, machining stage, deviation values for each indicator, and a comprehensive score. The deviation distribution table intuitively displays the machining quality differences between different regions of the workpiece, specifically marking areas where deviations exceed the allowable range, providing a basis for subsequent machining parameter adjustments. Based on the machining deviation distribution table, unexecuted machining paths in the five-axis machining instruction sequence are corrected in real time, adjusting cutting parameters and tool feed trajectories to obtain dynamically optimized subsequent machining instructions. The real-time correction mechanism is based on the closed-loop control principle and adopts different compensation strategies for different types of deviations. When excessive cutting force is detected, the cutting depth or feed rate is reduced; when the vibration is found to be unstable, the spindle speed is adjusted to avoid the resonant frequency; when the surface quality does not meet the standard, the number of finishing operations is increased or the tool step distance is reduced. The correction process takes into account the continuity requirements between processing areas and adopts a smooth transition strategy to avoid processing marks caused by sudden changes in parameters. For areas with severe deviations, the tool feed trajectory will even be replanned to change the contact angle or cutting direction. These correction information are converted into CNC instruction format and updated to the executing processing program to form dynamically optimized subsequent processing instructions. The correction process is carried out in real time, ensuring that the problem can be corrected before it escalates.
[0123] During the execution of subsequent machining instructions, the cutting state and surface quality of critical machining areas are continuously monitored, and a mapping relationship between machining parameters and machining quality is established to generate machining effect evaluation data. This continuous monitoring utilizes the same multi-sensor array as previously described, but with particular attention paid to critical machining areas previously marked as high-risk. The monitored data is processed in real time and correlated with the corrected parameters for analysis to assess the impact of parameter adjustments on machining quality. The mapping relationship is established using data regression methods to identify the functional relationship between machining parameters (independent variables) and machining quality indicators (dependent variables). This process not only records the results but also preserves dynamic changes, such as the response curves of quality indicators after parameter adjustments. The machining effect evaluation data is stored as a multidimensional correlation table, containing information such as parameter combinations, quality indicators, and correlation coefficients, providing valuable knowledge for future machining of similar workpieces.
[0124] The dynamically optimized subsequent processing instructions and processing effect evaluation data are integrated and recorded to form real-time compensation data and quality control records for the entire workpiece processing process. The integration process links the instruction adjustments and effect evaluations in the time series according to the spatial position and processing sequence to form a complete processing history archive. The real-time compensation data section records the triggering conditions, adjustment methods and adjustment amounts of each adjustment decision, clearly presenting the logical chain of compensation. The quality control record section saves the quality inspection results, key feature dimensions and surface condition evaluations of each processing stage. The integrated records use a structured data format to support rapid retrieval and analysis, facilitating subsequent processing experience summary and process optimization. These records can be used for quality traceability of the current workpiece, and can also be used as input to the experience database to explore processing rules through machine learning methods and continuously improve processing strategies.
[0125] The above describes the visual positioning method for the five-axis CNC integrated processing machine for complex boxes in the embodiment of the present application. The following describes the visual positioning system for the five-axis CNC integrated processing machine for complex boxes in the embodiment of the present application. Figure 2 In one embodiment of the present application, a visual positioning system for a complex box-shaped five-axis CNC integrated machining center includes:
[0126] S201, using multiple cameras to capture multi-angle images of the box workpiece, and using marker points to perform coordinate calibration to obtain camera parameters and machine tool space coordinate mapping table;
[0127] S202, performing edge detection and contour extraction on the multi-angle images according to the camera parameters and the machine tool space coordinate mapping table, and merging and transforming the features of each viewpoint through point cloud stitching to obtain a three-dimensional feature point dataset of the box workpiece;
[0128] S203: Determine the actual position of the box in the machine tool based on the three-dimensional feature point data set through matching calculation and error minimization processing, mark the key processing areas of the inner cavity, and obtain positioning data of the box workpiece and a processing key area table;
[0129] S204: Based on the positioning data and the table of key processing areas, determine the cutting parameters of different areas of the box by using thickness measurement and stiffness analysis, record the expected deformation, and obtain the cutting depth and feed speed adjustment values for each area;
[0130] S205, generating a tool trajectory that avoids inner cavity obstacles through path calculation and interference checking based on the cutting depth and feed speed adjustment value, and processing the thin-walled area to obtain a five-axis machining instruction sequence including a tool feed and retraction strategy;
[0131] S206 , according to the five-axis machining instruction sequence, using the machining process monitoring data to compare the difference between the expected machining effect and the actual result, and adjusting the subsequent machining parameters according to the difference value to obtain real-time compensation data and quality control records.
[0132] In the embodiment of the present application, multi-angle images of the box workpiece are collected by multiple cameras and coordinate calibration is performed using marking points, which effectively solves the problem that a single perspective is difficult to fully capture the complex geometric features of the box, and significantly improves the positioning accuracy and reliability; based on the obtained camera parameters and the machine tool space coordinate mapping table, edge detection and contour extraction are performed on the multi-angle images, and the features of each perspective are merged and converted through point cloud stitching, so that the three-dimensional feature point data set of the complex box is more complete and accurate, providing a reliable geometric basis for subsequent processing; the actual position of the box in the machine tool is determined by matching degree calculation and error minimization processing, and the key processing areas of the inner cavity are intelligently marked, realizing the transformation from massive three-dimensional data to precise positioning and processing. The efficient conversion of planning significantly reduces the workload and subjective errors of manual analysis. Thickness measurement and stiffness analysis are used to determine the cutting parameters of different areas of the box and record the expected deformation. Differentiated processing strategies are formulated for weak stiffness areas such as thin walls of the box, effectively preventing processing deformation and vibration problems. Tool trajectories that avoid internal cavity obstacles are generated through path calculation and interference checking, and special treatment is performed on thin-walled areas, which solves the risk of tool collision in complex internal cavity processing and improves processing safety. The difference between the expected processing effect and the actual result is compared in real time using processing process monitoring data, and subsequent processing parameters are dynamically adjusted according to the difference value to form a closed-loop control system, ensuring the quality stability of the entire processing process. At the algorithm level, this solution integrates technologies such as computer vision, spatial analysis, and closed-loop control, especially image processing algorithms used in feature point extraction, 3D reconstruction, and machine coordinate mapping, as well as mechanical analysis models used in thin-wall area identification and processing parameter optimization. Together, they build an intelligent decision-making system for complex box processing, which not only improves processing accuracy, but also improves production efficiency and reduces the risk of scrapping high-value complex boxes.
[0133] An embodiment of the present invention further provides a computer device, which may be a server, comprising a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor of the computer is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above-mentioned method is implemented.
[0134] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-described method when executed by a processor. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0135] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware using a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media provided herein and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM.
[0136] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0137] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0138] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A visual positioning system for a five-axis CNC integrated machining center for complex boxes, characterized in that: The visual positioning system for a five-axis CNC integrated machining center for a complex box includes: The calibration module is used to capture multi-angle images of the box workpiece through multiple cameras and perform coordinate calibration using marker points to obtain the camera parameters and machine tool space coordinate mapping table; An extraction module is used to perform edge detection and contour extraction on multi-angle images based on the camera parameters and the machine tool space coordinate mapping table, and to merge and transform the features of each perspective through point cloud stitching to obtain a three-dimensional feature point dataset of the box workpiece; a marking module, configured to determine the actual position of the box in the machine tool based on the three-dimensional feature point data set through matching calculation and error minimization processing, and mark the key processing areas of the inner cavity to obtain the positioning data of the box workpiece and a table of key processing areas; A recording module is used to determine the cutting parameters of different areas of the box body based on the positioning data and the processing key area table by using thickness measurement and stiffness analysis, and record the expected deformation to obtain the cutting depth and feed speed adjustment value for each area; a processing module for generating a tool trajectory that avoids internal cavity obstacles through path calculation and interference checking based on the cutting depth and feed rate adjustment value, and processing the thin-walled area to obtain a five-axis machining instruction sequence including a tool feed and retraction strategy; The comparison module is used to compare the difference between the expected processing effect and the actual result based on the five-axis processing instruction sequence using the processing process monitoring data, and adjust the subsequent processing parameters according to the difference value to obtain real-time compensation data and quality control records.
2. The visual positioning system for a five-axis CNC integrated machining center for complex boxes according to claim 1 is characterized in that: The calibration module is specifically used for: The multi-view image data of the box workpiece is synchronously acquired by the industrial-grade high-definition cameras arranged in a ring to obtain the original image data group; Performing image preprocessing on the original image data group, including denoising, grayscale conversion and contrast enhancement, to obtain enhanced image data; Identifying reflective marking points pre-attached to the surface of the box workpiece in the enhanced image data to obtain a set of image coordinates of the marking points; The camera intrinsic parameter matrix is obtained by calculating the spatial correspondence between the actual spatial position of the known marker point and the marker point image coordinate set; According to the camera intrinsic parameter matrix and the relative position relationship between different cameras, a conversion equation between the camera coordinate system and the machine tool coordinate system is established to obtain a coordinate system transformation matrix; The camera intrinsic parameter matrix and the coordinate system transformation matrix are combined to generate a camera parameter and machine tool space coordinate mapping table.
3. The visual positioning system for a five-axis CNC integrated machining center for complex boxes according to claim 1 is characterized in that: The extraction module is specifically used to: Perform edge detection on the multi-angle image using the Canny operator to extract two-dimensional edge information of the box workpiece to obtain an edge feature map; Performing geometric feature analysis on the edge feature map to identify straight lines, arcs and curved surfaces to obtain box outline geometric structure data; Converting the box outline geometric structure data from two-dimensional image coordinates to three-dimensional space coordinates according to the camera parameters to obtain single-view three-dimensional feature points; Unifying the single-view three-dimensional feature points at different viewing angles into a machine tool coordinate system using the machine tool space coordinate mapping table to obtain a multi-view feature point set; Performing data cleaning on the multi-view feature point set to remove redundant points and noise points, and performing spatial consistency verification to obtain a streamlined feature point set; The simplified feature point set is merged and optimized through a three-dimensional space splicing algorithm to construct a geometric expression of the box workpiece, thereby obtaining a three-dimensional feature point data set of the box workpiece.
4. The visual positioning system for a five-axis CNC integrated machining center for complex boxes according to claim 1 is characterized in that: The marking module is specifically used for: Comparing the three-dimensional feature point data set with the theoretical design data of the box workpiece to obtain a feature point matching pair set by screening out key point pairs with significant features; Performing geometric consistency verification on the feature point matching pair set, eliminating erroneous matching points, and obtaining valid matching point pair data; Calculate the rotation matrix and translation vector of the box workpiece in the machine tool coordinate system according to the effective matching point pair data to obtain the initial posture parameters; Iteratively optimizing the initial posture parameters to minimize the Euclidean distance error between the actual position and the theoretical position of the feature point, and obtaining an accurate posture transformation matrix; Performing spatial analysis on the geometric model of the box workpiece based on the precise posture transformation matrix, identifying difficult processing areas in the inner cavity structure, and obtaining a processing area priority table; The precise posture transformation matrix and the processing area priority table are combined and sorted to form the positioning data of the box workpiece and the processing key area table.
5. The visual positioning system for a five-axis CNC integrated machining center for complex boxes according to claim 1 is characterized in that: The recording module is specifically used to: Virtually slicing the box workpiece according to the positioning data, dividing the box structure into multiple discrete analysis units, and obtaining a box partition data map; Performing wall thickness distribution measurement on each analysis unit in the box partition data diagram, calculating the wall thickness value of each point by surface normal sampling, and obtaining wall thickness distribution data; Calculating the structural stiffness coefficient of each analysis unit based on the wall thickness distribution data combined with material characteristic parameters, and identifying thin-walled weak stiffness areas to obtain a stiffness distribution table; The stiffness distribution table is merged with the key processing area table, and a cutting force safety threshold is established according to the regional importance and stiffness characteristics to obtain the regional cutting force restriction condition; The maximum allowable cutting depth and optimal feed rate of each area are derived according to the cutting force constraint conditions of the area, and the expected deformation is calculated to obtain a machining parameter-deformation relationship table; Based on the processing parameter-deformation relationship table, customized processing parameters are allocated to different areas of the box workpiece, and deformation monitoring thresholds are set to obtain cutting depth and feed speed adjustment values for each area.
6. The visual positioning system for a five-axis CNC integrated machining center for complex boxes according to claim 1 is characterized in that: The processing module is specifically used to: According to the cutting depth and feed speed adjustment values, the box body processing task is divided into a rough processing layer and a fine processing layer, and an independent tool parameter table is created for each layer to obtain a multi-level processing plan; generating a sequence of initial tool contact points for each machining area in the multi-level machining plan, and calculating a tool axial vector at each contact point to obtain a tool pose point set; Performing interference analysis on the tool pose point set through the tool envelope volume to detect potential collision areas between the tool and the inner cavity structure of the box, and obtaining an interference risk map; Replanning the path of the tool pose point set according to the interference risk map, avoiding the collision area by limiting the safety distance and adjusting the tool axis tilt angle, and obtaining an interference-free tool trajectory; For the path segment passing through the thin-walled area in the non-interference tool trajectory, a segmented cutting-in and cutting-out strategy and progressive cutting depth control are adopted to reduce the influence of cutting force on thin-wall deformation and obtain an optimized trajectory for the thin-walled area; The non-interference tool trajectory and the thin-wall area optimized trajectory are merged, and a tool advance and retreat safety area and a tool exchange position are added to generate a five-axis machining instruction sequence including a tool advance and retreat strategy.
7. The visual positioning system for a five-axis CNC integrated machining center for complex boxes according to claim 1 is characterized in that: The comparison module is specifically used to: During the execution of the five-axis machining instruction sequence, real-time machining status information, including cutting force signals, vibration signals, and surface topography data, is collected through a multi-sensor array to obtain raw monitoring data of the machining process; Performing feature extraction and signal processing on the raw monitoring data of the machining process, filtering out noise and identifying key machining state indicators to obtain machining state feature quantities; Comparing and analyzing the processing state characteristic quantity with the preset ideal processing parameters, calculating the deviation degree of each processing index, and obtaining a processing deviation distribution table; According to the machining deviation distribution table, the machining paths that have not yet been executed in the five-axis machining instruction sequence are corrected in real time, cutting parameters and tool feed trajectory are adjusted, and subsequent machining instructions that are dynamically optimized are obtained; During the execution of subsequent machining instructions, the cutting status and surface quality of key machining areas are continuously monitored, a mapping relationship between machining parameters and machining quality is established, and machining effect evaluation data is obtained; The dynamically optimized subsequent processing instructions and the processing effect evaluation data are integrated and recorded to form real-time compensation data and quality control records of the entire workpiece processing process.
8. A visual positioning method for a five-axis CNC integrated machining center for a complex box, implemented by the visual positioning system for a five-axis CNC integrated machining center for a complex box according to any one of claims 1 to 7, characterized in that: The visual positioning method for a five-axis CNC integrated machining center for a complex box includes: Multi-angle images of the box workpiece are collected by multiple cameras, and coordinate calibration is performed using marker points to obtain the camera parameters and machine tool space coordinate mapping table; According to the camera parameters and the machine tool space coordinate mapping table, edge detection and contour extraction are performed on the multi-angle images, and the features of each perspective are merged and transformed through point cloud stitching to obtain a three-dimensional feature point dataset of the box workpiece; Based on the three-dimensional feature point data set, the actual position of the box in the machine tool is determined through matching calculation and error minimization processing, and the key processing areas of the inner cavity are marked to obtain the positioning data of the box workpiece and the processing key area table; Based on the positioning data and the table of key processing areas, the cutting parameters of different areas of the box are determined by thickness measurement and stiffness analysis, and the expected deformation is recorded to obtain the cutting depth and feed speed adjustment values for each area; According to the cutting depth and feed rate adjustment values, a tool trajectory that avoids inner cavity obstacles is generated through path calculation and interference checking, and thin-walled areas are processed to obtain a five-axis machining instruction sequence including a tool feed and retraction strategy; According to the five-axis machining instruction sequence, the difference between the expected machining effect and the actual result is compared using the machining process monitoring data, and the subsequent machining parameters are adjusted according to the difference value to obtain real-time compensation data and quality control records.
9. A computer device, characterized in that: It includes a memory and a processor, the memory stores a computer program that can be run on the processor, and is characterized in that when the processor executes the computer program, it implements the visual positioning method for a complex box five-axis CNC integrated processing machine as described in claim 8.
10. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is enabled to execute the visual positioning method for a complex box five-axis CNC integrated machining center as claimed in claim 8.
Citation Information
Patent Citations
Robot automatic lineation method, system and device based on position error compensation
CN113635281A
Control method, device and equipment of five-axis high-precision numerical control machine tool and storage medium
CN119472507A