Metal processing path control method, system and storage medium based on three-dimensional image recognition
Patent Information
- Application Number
- CN202611149709.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-09-29
AI Technical Summary
[0004]然而,现有技术普遍难以对金属毛坯件表面缺陷区域进行精确的空间占据表征,尤其是对于形态复杂或不规则的缺陷区域,简单几何体近似方式存在表征精度不足的问题
[0009]与现有技术相比,本发明的有益效果是:通过构建空间尺度演化链群结构,将金属毛坯件表面三维点云数据映射至拓扑持续尺度空间,利用同调生成元提取与持续性区间追踪,实现了对缺陷区域拓扑本质的定量刻画,避免了传统局部几何特征对缺陷形态表征不完整的局限;进一步地,将链群拓扑特征中跨越预设尺度跨越条件的生成元构造为不可行域骨架环,并映射至缺陷邻域标识集合后结合刀具加工参数膨胀为加工不可行域实体,使得缺陷区域的空间占据形态与刀具运动学约束在统一框架下耦合,绕行连通路径序列的生成确保了加工路径与不可行域实体的可靠避碰。如此,从点云拓扑感知到加工路径自适应重构形成了完整闭环,有效提升了含缺陷金属毛坯件加工路径规划的智能化水平和加工过程的安全性。。
Smart Images

Figure CN122837359A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision control technology, specifically to a method, system, and storage medium for metal processing path control based on three-dimensional image recognition. Background Technology
[0002] In the field of metal parts manufacturing, machining path planning typically relies on computer-aided manufacturing systems (CADS) that generate toolpaths based on computer-aided design models of the parts. For ideal metal blanks without surface defects, the above method can generate toolpaths that meet machining accuracy requirements. However, actual cast or forged metal blanks often have shape defects such as pits, porosity, shrinkage cavities, scratches, or cracks. If these defects come into direct contact with the cutting tool during machining, they will lead to sudden changes in cutting force, accelerated tool wear, deterioration of machined surface quality, and even tool breakage.
[0003] To address these issues, some existing technologies attempt to perform visual inspection or contact measurement on the surface of the blank before processing, record the location of detected defects, and then manually correct the processing path. Other solutions employ rule-based obstacle avoidance methods, approximating the defect area as a simple geometric shape and generating a detour path around it.
[0004] However, existing technologies generally struggle to accurately characterize the spatial occupancy of defect areas on the surface of metal blanks, especially for complex or irregularly shaped defect areas, where simple geometric approximations suffer from insufficient accuracy. Furthermore, existing technologies lack a mechanism to couple the spatial morphology of the defect area with the tool's kinematic parameters, resulting in generated detour paths that fail to balance collision avoidance safety and path smoothness, thus hindering the adaptability of machining path planning when faced with complex surface defects. Summary of the Invention
[0005] The purpose of this invention is to provide a method, system, and storage medium for controlling metal processing paths based on three-dimensional image recognition, so as to solve the problems mentioned in the background art.
[0006] This invention provides a metal processing path control method based on three-dimensional image recognition, comprising: Acquire a set of three-dimensional point cloud data of the surface of a metal blank; Based on the surface three-dimensional point cloud data set, a point cloud neighborhood map of each scale is constructed with a neighborhood scale parameter that increases with a preset step size, and a maximal simplex decomposition is performed to obtain simple complexes of each scale. Simplexes with containment relationships between vertex sets of adjacent scales are connected by cross-scale edges to form a spatial scale evolution chain group structure. A defect neighborhood identifier set is generated based on the local density difference of the point cloud. The spatial scale evolution chain group structure is subjected to homology generator extraction processing. The homology group of simple complex at each scale is calculated and the generator is extracted. The occurrence and extinction scales of each generator are tracked between continuous scales to obtain the chain group topological features that record the persistence interval of the generator. Based on the generators that cross the preset scale crossing conditions in the topological features of the chain group, an infeasible domain skeleton loop is constructed, mapped to the defect neighborhood identifier set, and expanded into a machining infeasible domain entity using tool machining parameters. Interference detection is performed in conjunction with the preset initial machining path, and detour reconstruction is performed on the interference path segment to generate a detour connected path sequence. Based on the coordinates of sequentially adjacent path points in the bypass connected path sequence, the tool axial attitude vector and feed direction vector are determined, and control commands for the machining equipment are generated to drive the multi-axis machining device to move along the bypass connected path sequence.
[0007] This invention provides a metal processing path control system, comprising: The processor; a storage device on which a computer program is stored; a network interface for providing network communication functions; when the computer program is executed by the processor, the processor implements the above-described metal processing path control method based on three-dimensional image recognition.
[0008] The present invention provides a readable storage medium storing a program or instructions, which, when executed by a processor, implement the above-described metal processing path control method based on three-dimensional image recognition.
[0009] Compared with existing technologies, the beneficial effects of this invention are as follows: By constructing a spatial scale evolution chain group structure, the three-dimensional point cloud data of the metal blank surface is mapped to a topologically persistent scale space. Using homogeneous generator extraction and persistent interval tracking, a quantitative characterization of the topological essence of the defect region is achieved, avoiding the limitation of incomplete defect morphology representation by traditional local geometric features. Furthermore, generators that cross preset scale crossing conditions in the chain group topological features are constructed as infeasible region skeleton loops, and after mapping to a defect neighborhood identifier set and combining with tool machining parameters, they are expanded into machining infeasible region entities. This couples the spatial occupancy shape of the defect region with the tool kinematic constraints within a unified framework. The generation of bypass connected path sequences ensures reliable collision avoidance between the machining path and infeasible region entities. Thus, a complete closed loop is formed from point cloud topology perception to adaptive reconstruction of the machining path, effectively improving the intelligence level of machining path planning for metal blanks containing defects and the safety of the machining process. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a flowchart of a metal processing path control method based on three-dimensional image recognition provided in an embodiment of the present invention.
[0012] Figure 2 This is a schematic diagram of a scenario for three-dimensional scanning of a metal blank and construction of a spatial scale evolution chain group, provided in an embodiment of the present invention.
[0013] Figure 3 This is a visualization interface diagram of the spatial scale evolution chain group of metal blanks provided in an embodiment of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] In the metal parts processing and manufacturing scenario of this invention, the surface of the metal blank may have shape defects such as pits, scratches, shrinkage cavities, or cracks. If these defective areas are not avoided during processing, abnormal contact will occur between the tool and the hard points or hole edges in the defective areas, thereby accelerating tool wear, reducing the quality of the machined surface, or even causing tool breakage. Traditional machining path planning methods usually generate tool trajectories based on ideal CAD models, which cannot perceive the actual defect distribution on the surface of the blank, causing the tool to still travel along a preset path in the defective areas.
[0016] In view of this, the embodiments of the present invention collect three-dimensional point cloud data of the surface of metal blanks, use topological data analysis technology to identify defect areas in the point cloud, map the above-mentioned areas as infeasible regions in the processing process, and then perform interference detection and detour reconstruction on the initial processing path to generate a processing path that can avoid defect areas, and finally convert it into control commands for a multi-axis processing device.
[0017] Please see Figure 1 , Figure 1This is a flowchart of a metal processing path control method based on three-dimensional image recognition provided by an embodiment of the present invention. The method can be executed by a metal processing path control system and includes steps 110-150.
[0018] Step 110: Obtain the three-dimensional point cloud data set of the surface of the metal blank.
[0019] Before entering the processing stage, the surface geometry of the metal blank needs to be acquired using a 3D scanning device. In this step, a structured light scanner or laser profilometer is used to scan the surface of the metal blank to be processed. The scanning device outputs discrete spatial coordinate data expressed as a point cloud. Each frame of scan data contains multiple spatial sampling points, and each sampling point records its 3D spatial coordinates in the scanning device's coordinate system. All spatial sampling points acquired from multiple scans are merged according to the scanning sequence, and the merged point cloud is downsampled using voxels to remove redundant points. Simultaneously, a statistical filtering algorithm is used to remove outlier noise points, ultimately resulting in a preprocessed 3D point cloud data set of the metal blank surface. This set is stored in the system memory as a point cloud data structure. Each point cloud data in the set contains X-axis, Y-axis, and Z-axis coordinate components. The dimensions of these three coordinate components are all length units and have been calibrated to the workpiece coordinate system.
[0020] Step 120: Based on the surface three-dimensional point cloud data set, construct point cloud neighborhood graphs at each scale with neighborhood scale parameters that increase by a preset step size, and perform maximal simplex decomposition to obtain simple complexes at each scale. Establish cross-scale connecting edges for simplexes with containment relationships between vertex sets of adjacent scales to form a spatial scale evolution chain group structure. Generate a set of defect neighborhood identifiers based on the local density differences of the point cloud.
[0021] After acquiring the three-dimensional point cloud data set of the surface of the metal blank, in order to extract the structural information reflecting the defect area from the geometric distribution of the point cloud, it is necessary to construct a topological structure that can describe the connectivity changes of the point cloud at different spatial scales. This step involves iteratively constructing a series of point cloud neighborhood graphs with increasing scales, extracting simple complex sequences that change with scale from them, and then establishing the evolutionary relationship between scales through cross-scale connections, thereby forming a composite data structure that can simultaneously express spatial location and scale information.
[0022] Step 121: Perform a spatial partitioning operation on the surface 3D point cloud data set to establish a point cloud spatial index structure for accelerating neighborhood retrieval. The point cloud spatial index structure organizes the point clouds in the surface 3D point cloud data set into a tree-shaped data organization that allows for quick neighbor lookup according to their spatial position. Each node of the tree-shaped data organization corresponds to a spatial partitioning region and stores the point cloud index within that region.
[0023] To efficiently perform the recurring neighborhood retrieval operations in subsequent steps, a data organization that accelerates spatial queries is first needed. In this step, a k-dimensional tree is constructed for the surface 3D point cloud dataset. The k-dimensional tree is constructed as follows: using the 3D spatial coordinates of all points in the point cloud dataset as input data, the dimension with the largest variance along the X-axis coordinate component direction is selected at the root node as the splitting axis. The point whose coordinate value on this dimension is at the median is used as the splitting point of the root node. Points in the remaining point cloud whose X-axis coordinate component is less than the median value are recursively constructed into the left subtree, and points whose X-axis coordinate component is greater than the median value are recursively constructed into the right subtree. The recursion terminates when the number of point clouds in the current subtree is less than a preset threshold. Each node of the k-dimensional tree stores the spatial range description of its corresponding spatial division region and the list of point cloud indices falling within that region.
[0024] Once constructed, for any given query point and its neighborhood radius parameter, a recursive descent search can be performed in the k-dimensional tree to quickly retrieve all neighborhood points whose spatial distance from the query point is less than the neighborhood radius parameter.
[0025] Step 122: Set the neighborhood scale parameter to a preset initial value, and create a simple complex sequence container for storing simple complexes at each scale. The simple complex sequence container is an empty set in the initial state.
[0026] Before constructing the multi-scale neighborhood graph, it is necessary to initialize the parameter variables that control the scale evolution process. In this step, the neighborhood scale parameter is assigned a preset initial value, which is a length value with the same dimensions as the point cloud coordinates. Simultaneously, a dynamic array is allocated in system memory as a container for simplicial complex sequences. Each element in this container stores a simplicial complex data structure corresponding to a given scale. Initially, the container is empty, and the storage order of its elements is arranged in ascending order of the neighborhood scale parameter.
[0027] Step 123: Based on the point cloud spatial index structure, perform a fixed-radius neighborhood search on each point in the surface 3D point cloud data set using the neighborhood scale parameter, retrieve all neighborhood points whose spatial distance is less than the neighborhood scale parameter, take the retrieved points as the neighborhood set of the point, and construct the current neighborhood graph structure with the points in the surface 3D point cloud data set as nodes and the neighborhood relationship as edges.
[0028] Using the k-dimensional tree spatial index structure established in step 121, and with the current neighborhood scale parameter as the search radius, a fixed-radius neighborhood search is performed on each point cloud in the surface 3D point cloud dataset. For a given point cloud, using its spatial coordinates as the query center, all other point clouds with a distance smaller than the current neighborhood scale parameter are searched in the k-dimensional tree. All the retrieved point clouds constitute the neighborhood set of that point cloud. After all point clouds have completed the neighborhood search, the entire point cloud dataset is used as the node set of the graph structure. For each pair of point clouds, if one point cloud appears in the neighborhood set of the other, an undirected edge is established between the pair. After traversing all point cloud pairs, the resulting undirected graph is the current neighborhood graph structure, which records the spatial connection relationships between point clouds under the current neighborhood scale parameter.
[0029] Step 124: Perform maximal simplex identification processing on the current neighborhood graph structure, traverse all complete subgraphs of the current neighborhood graph structure and determine their maxima, extract all maximal complete subgraphs that are not contained by other complete subgraphs as simplexes, and construct the current scale simplex complex from all the extracted simplexes. The simplex is represented by a set of vertices consisting of one or more points, and the simplex satisfies that any two points within it have an edge in the current neighborhood graph structure.
[0030] After obtaining the current neighborhood graph structure, it is necessary to identify the combined structures that satisfy specific conditions. This step first involves enumerating all complete subgraphs in the current neighborhood graph structure. A complete subgraph is defined as one where there is an edge between any two nodes. For each enumerated complete subgraph, it is checked whether there is another complete subgraph that completely contains all the nodes of that subgraph. If not, the complete subgraph is marked as a maximal complete subgraph. The set of all subgraphs marked as maximal complete subgraphs constitutes the simplicial complex at the current scale.
[0031] In this simplex complex, each maximal complete subgraph is called a simplex, and each simplex is represented by the set of node indices it contains. For example, a single node constitutes a 0-dimensional simplex, two nodes connected by an edge constitute a 1-dimensional simplex, three nodes connected pairwise constitute a 2-dimensional simplex, and so on.
[0032] Step 125: Store the current scale simple complex into the simple complex sequence container. The simple complex sequence container is a data organization that stores simple complexes in ascending order of scale. When the neighborhood scale parameter is a preset initial value, the current scale simple complex is stored as the first scale level unit.
[0033] The simplicium at the current scale obtained in step 124 is stored in the simplicium sequence container initialized in step 122. Since the neighborhood scale parameter is currently at a preset initial value, the simplicium is stored in the first position of the container as the first element in the scale sequence. When storing, the vertex set of all simplicium ...
[0034] Step 126: Increase the neighborhood scale parameter by the preset step size to obtain the updated neighborhood scale parameter. Based on the point cloud spatial index structure, re-execute the fixed radius neighborhood search with the updated neighborhood scale parameter to generate an updated neighborhood graph structure. Perform maximal simplex identification processing on the updated neighborhood graph structure to obtain an updated scale simplex. Store the updated scale simplex in the simplex sequence container and determine whether the updated neighborhood scale parameter reaches the preset maximum scale parameter. If not, continue to increase the neighborhood scale parameter by the preset step size and repeat the neighborhood search, simplex identification, and storage operations until the neighborhood scale parameter equals the preset maximum scale parameter, forming a multi-scale simplex sequence containing simplexes from the initial scale to the maximum scale. The simplexes in the multi-scale simplex sequence are arranged in ascending order of scale parameter.
[0035] After the initial scale simplex is stored, the scale parameter needs to be gradually increased to generate simplexes at larger scales. In this step, the current neighborhood scale parameter is added to a preset step size to obtain the updated neighborhood scale parameter. Then, using this updated neighborhood scale parameter as the new search radius, the fixed radius neighborhood search operation in step 123 is repeated to generate an updated neighborhood graph structure. The maxima simplex identification process in step 124 is then performed on this updated neighborhood graph structure to obtain the updated scale simplex. This updated scale simplex is then stored in the next position of the simplex sequence container.
[0036] Next, the updated neighborhood scale parameter is compared with the preset maximum scale parameter. If the updated neighborhood scale parameter is smaller than the preset maximum scale parameter, the neighborhood scale parameter continues to increase by a preset step size, and the neighborhood retrieval, maximal simplex identification, and storage operations are repeated. This iterative process continues until the neighborhood scale parameter reaches the preset maximum scale parameter. After the above iterative processing, the simplex sequence container stores the simplexes corresponding to each level from the initial scale to the maximum scale in ascending order of scale, forming a multi-scale simplex sequence.
[0037] Step 127: Based on the multi-scale simple complex sequence, establish cross-scale connection edges to form a spatial scale evolution chain group structure, and generate a defect neighborhood identifier set based on the local density difference of the point cloud.
[0038] After obtaining the multi-scale simplex sequence, it is also necessary to establish a connection between simplexes of adjacent scales in the sequence that can reflect the cross-scale correspondence of simplexes, and at the same time identify the defect region from the local density distribution of the point cloud. The specific implementation of this step will be further explained in subsequent steps 1271 to 1274.
[0039] Step 1271: Perform a simplex inclusion matching operation on any two adjacent simplexes in the multi-scale simplex sequence. For each simplex in the smaller scale simplex, check whether the vertex set of the smaller scale simplex is completely included by the vertex set of any simplex in the larger scale simplex. If it is completely included, establish a cross-scale connection edge between the smaller scale simplex and the larger scale simplex. If it is not included, do not establish one. After traversing all adjacent scale pairs, collect all cross-scale connection edges to form a cross-scale connection edge set. Record the identifier of the smaller scale simplex and the identifier of the larger scale simplex for each cross-scale connection edge and indicate that the connection direction is from the smaller scale to the larger scale.
[0040] For each pair of adjacent scales in a multi-scale simplicial complex sequence, let the simplicial complex corresponding to the smaller scale be K. s The simplex corresponding to a larger scale is K. t Where the scale of t is greater than the scale of s. Traverse K s For each simplex in the array, for the currently traversed simplex σ, obtain the set of all vertex indices of the point cloud it contains. Then, in K... t The algorithm searches for the existence of a simplex τ such that the vertex set of σ is a subset of the vertex set of τ, meaning that every vertex in σ appears in the vertex set of τ. If a simplex τ satisfying this condition is found, a cross-scale connection edge is established between σ and τ. This edge starts at the node corresponding to σ, ends at the node corresponding to τ, and points in the direction from the smaller scale to the larger scale. If no τ satisfying the condition is found, no cross-scale connection edge is established. This operation is performed on all adjacent scale pairs, and all established cross-scale connection edges are collected and merged to form a set of cross-scale connection edges.
[0041] Step 1272: Using all the simplexes in the multi-scale simplex sequence as nodes and the edges in the cross-scale connection edge set as directed connections between nodes, construct a spatial scale evolution chain group structure, which is a directed acyclic graph structure spanning multiple scales.
[0042] All simplexes appearing in the multi-scale simplex sequence are taken as nodes of the graph structure. Each connection in the set of cross-scale connecting edges generated in step 1271 is taken as a directed edge, and a directed acyclic graph structure is constructed. The nodes of this graph structure are arranged hierarchically according to their scale level. Nodes at different levels are connected by cross-scale connecting edges, and the direction of all edges is from the smaller scale level to the larger scale level. Therefore, there are no directed loops in this graph. This directed acyclic graph structure is the spatial scale evolution chain group structure.
[0043] Step 1273: Perform a local density estimation operation on the surface 3D point cloud data set. For each point cloud, select a preset spatial neighborhood range, calculate the number of point clouds within the spatial neighborhood range and divide it by the neighborhood volume to obtain the local density value of the point. After traversing all point clouds in the surface 3D point cloud data set, generate a local density value distribution set. Compare the local density value of each point in the local density value distribution set with the preset defect density threshold, and extract points whose local density value is less than the preset defect density threshold to form a low-density point set.
[0044] While constructing the spatial scale evolution chain structure, it is also necessary to identify defect regions from the density distribution of the point cloud itself. In this step, for each point cloud in the surface 3D point cloud dataset, a spherical neighborhood is defined, with the radius of this spherical neighborhood being a preset spatial neighborhood radius value. For the current point cloud, the number of other point clouds falling within a sphere centered on the current point cloud and with the preset spatial neighborhood radius as its radius is counted. This number is divided by the volume of the sphere to obtain the local density value of the point cloud. After traversing all point clouds, each point cloud corresponds to a local density value. All the point clouds and their corresponding local density values together constitute a set of point cloud local density value distributions. Then, the local density value of each point cloud is compared with a preset defect density threshold, which is a pre-set density critical value. If the local density value of a point cloud is less than the preset defect density threshold, the point cloud is marked as a low-density point and added to the low-density point set.
[0045] Step 1274: Perform a spatial connectivity region segmentation operation on the low-density point set. Using a preset connectivity determination distance as a condition, points in the low-density point set whose spatial distance is less than the connectivity determination distance are grouped into the same connected component. All maximal connected subgraphs are obtained by breadth-first search traversal. A unique defective connected region identifier is assigned to each defective connected region. The coordinate range of all points in the defective connected region is associated with the defective connected region identifier to generate a defective neighborhood identifier set.
[0046] After obtaining the low-density point set, it is necessary to group the spatially clustered low-density points into independent connected regions. In this step, a breadth-first search is performed on each point cloud in the low-density point set, using a preset connectivity determination distance as the adjacency determination condition. Specifically, an unvisited point is selected from the low-density point set as a seed point. Starting from this seed point, all adjacent points in the low-density point set whose spatial distance from the seed point is less than the preset connectivity determination distance are searched, and these adjacent points are marked as visited. The search continues to expand from the newly visited points until no new adjacent points can be found, thus obtaining a connected component. A new seed point is selected from the remaining unvisited points for the next round of search, and the above process is repeated until all points in the low-density point set have been visited. Among all the searched connected components, those containing more point clouds than the preset minimum number of connected components are marked as defective connected components. A unique identifier is assigned to each defective connected component, and the spatial coordinate range of all point clouds within the defective connected component is associated with and stored with this identifier, ultimately forming a defective neighborhood identifier set.
[0047] Step 130: Perform homology generator extraction processing on the spatial scale evolution chain group structure, calculate the homology group of simple complexes at each scale and extract generators, track the appearance and disappearance scales of each generator between continuous scales, and obtain the chain group topological features that record the persistence interval of generators.
[0048] After obtaining the spatially evolved chain group structure, it is necessary to extract features from this structure that can characterize the topological essence of defects such as holes and depressions on the surface of the metal blank. This step involves calculating the homology group of simple complexes at each scale, identifying the ring structures that persist at different scales, and recording the changes in these structures during the scale evolution process, ultimately forming the chain group topological features: Step 131: Obtain the spatial scale evolution chain group structure, which includes simple complexes at multiple scale levels and cross-scale connecting edges that connect simple complexes at adjacent scales.
[0049] Read the spatial scale evolution chain group structure constructed in step 1272 from the system memory. This data structure contains simplicities at all scale levels in the multi-scale simplicity sequence, as well as the cross-scale connection edge set established in step 1271.
[0050] Step 132: Extract the simple complexes corresponding to each scale level from the spatial scale evolution chain group structure, and sort them in ascending order of scale to obtain an ordered list of simple complexes.
[0051] The simplexes at all scale levels contained in the spatial scale evolution chain group structure are sorted in ascending order according to their corresponding neighborhood scale parameter values to form an ordered list. Each element in the list contains a simplex and its corresponding scale parameter value.
[0052] Step 133: Construct the boundary matrix for each simplex in the ordered simplex list. The boundary matrix has simplexes in the simplex as rows and simplexes of the lower dimension in the simplex as columns. The matrix elements record the coefficients that reflect the boundary relationships.
[0053] For each simplification in the ordered list of simplifications, an algebraic structure needs to be constructed for subsequent homology group calculations. In this step, for the current simplification, all k-dimensional simplifications within it are extracted as rows of a matrix, and all k-1-dimensional simplifications are extracted as columns of the matrix, where k ranges from 1 to the maximum dimension of the simplification. For the matrix element located in the i-th row and j-th column, it is checked whether the vertex set of the i-th k-dimensional simplification completely contains the vertex set of the j-th k-1-dimensional simplification. If it does, the matrix element is recorded as 1; otherwise, it is recorded as 0, and the sign of this value is determined by the parity of the vertex arrangement.
[0054] Step 134: Perform Smith canonical form simplification on the boundary matrix of each scale level to transform the boundary matrix into a diagonal matrix form. Read the diagonal elements to identify the generators of the homology group at that scale level. Each generator corresponds to a closed loop and the closed loop does not constitute the boundary of other closed loops.
[0055] For each boundary matrix constructed in step 133, the Smith canonical form simplification algorithm is executed. This simplification process transforms the boundary matrix into a diagonal matrix form through a series of row and column transformations. The number and position of non-zero diagonal elements in this diagonal matrix reflect the homology group information of the simplicial complex at this scale level. Non-zero diagonal elements are read from the simplified diagonal matrix, and the positions of missing diagonals are determined. These missing positions correspond to homology generators present in the simplicial complex, each generator representing a nontrivial ring structure existing at this scale level. The identified generators are associated with the current scale level to generate a generator list for that scale.
[0056] Step 135: Associate the identified generator with its scale level to obtain a scale generator pairing record. The scale generator pairing record includes the generator identifier, the scale level parameter to which the generator belongs, and the sequence of representative loop vertices of the generator in the simplex complex at that scale level.
[0057] The representative rings corresponding to each generator obtained in step 134 are recorded. Specifically, for each generator, the index sequence of all vertices in the closed ring corresponding to that generator is obtained, and the vertex sequence is arranged in the traversal order of the ring to form the representative ring vertex sequence. The representative ring vertex sequence and the scale level parameter to which the generator belongs are stored in the scale generator pairing record, and each generator is assigned a unique identifier. Each entry in the pairing record contains three fields: generator identifier, scale level parameter, and representative ring vertex sequence.
[0058] Step 136: Perform cross-scale survival matching and track persistence intervals for generators at each scale to generate chain group topological features.
[0059] After obtaining the generator records at each scale level, it is necessary to track the evolutionary fate of each generator during the scale increase process and determine the critical scale for its appearance and extinction. The specific implementation of this step will be further explained in subsequent steps 1361 to 1365.
[0060] Step 1361: Perform generator survival matching on generator sets of two adjacent scale levels, select a generator from the smaller scale generator set, extract its representative ring vertex sequence, and use the vertex correspondence provided by the cross-scale connection edge to map each vertex in the representative ring vertex sequence to the corresponding vertex in the larger scale simplex, forming a mapped vertex sequence.
[0061] Take the sets of generators corresponding to two adjacent scales in the ordered simplex list, and let G be the set of generators corresponding to the smaller scale. s The set of generators corresponding to larger scales is G. t From G s Take a generator γ from the set and obtain the sequence V representing the vertices of the cycle corresponding to γ. s For V s For each vertex index in the equation, the cross-scale connection edges in the spatial scale evolution chain group structure are used to find the mapping relationship from the small-scale simplex to the large-scale simplex to determine the vertex index corresponding to that vertex in the large-scale simplex. When V s After all vertices in the array have been mapped, a new vertex index sequence V is obtained. t This sequence is the mapped vertex sequence.
[0062] Step 1362: In a larger-scale simplex, construct a mapped loop based on the mapped vertex sequence, and calculate the equivalence class attribute of the mapped loop with respect to the larger-scale boundary matrix to obtain the affiliation of the mapped loop in the larger-scale homology group.
[0063] The mapped vertex sequence V obtained in step 1361t The vertices in the loop are connected in the original traversal order representing the ring, forming a closed loop structure in the larger-scale simplex complex, i.e., the mapped loop. Then, in the homology group corresponding to the boundary matrix of the larger-scale simplex complex, the equivalence class to which the mapped loop belongs is calculated. Specifically, it is checked whether the mapped loop can be represented as the sum of the boundaries of several high-dimensional simplexes in the larger-scale simplex complex. If it can be represented as the sum of the boundaries, the loop is determined to belong to the trivial class; otherwise, it is determined to belong to the nontrivial class, and its corresponding generator is further determined.
[0064] Step 1363: If the mapping loop's affiliation in a larger-scale homology group corresponds to a nontrivial generator, then establish a generator survival correspondence between the smaller-scale generator and the larger-scale nontrivial generator, and mark the survival state of the smaller-scale generator as continuing to the larger-scale level; if the mapping loop's affiliation in a larger-scale homology group corresponds to a trivial element, then determine that the smaller-scale generator has disappeared at the larger-scale level, record the disappearance scale level as the larger-scale level, and mark the smaller-scale generator as having disappeared.
[0065] Based on the calculation results of step 1362, a branch decision is made. If the mapped loop corresponds to a nontrivial generator in the larger-scale homology group, it indicates that the smaller-scale generator γ still exists in a new form after the scale increases. A correspondence is established between the identifier of γ and the identifier of the nontrivial generator, and the survival state of γ is marked as continuing to the larger-scale level. If the mapped loop corresponds to a trivial element in the larger-scale homology group, it indicates that γ disappears after the scale increases. The extinction scale level of γ is recorded as the current larger-scale level, and the state of γ is marked as extinct.
[0066] Step 1364: Traverse all adjacent scale level pairs and repeatedly perform generator survival matching to obtain the first appearance scale level and the final extinction scale level of each generator in the continuous scale evolution process. Take the first appearance scale level as the birth scale level and the final extinction scale level as the extinction scale level to form the persistence interval of the generator.
[0067] Steps 1361 to 1363 are performed on all adjacent scale level pairs to determine generator survival matching. During this process, the birth scale level of each generator is recorded when it is first created, and the extinction scale level is recorded when it is determined to be extinct. For generators that persist up to the maximum scale without extinction, the maximum scale parameter is used as their extinction scale level. Thus, each generator has an interval from its birth scale level to its extinction scale level, which describes the range of the generator's persistence in the scale space.
[0068] Step 1365: Combine the generator identifiers, birth scale levels, extinction scale levels and their corresponding homology dimensions of all generators into a chain group topological feature. The chain group topological feature contains complete persistence information of generators at each homology dimension.
[0069] The identifiers of all generators, their corresponding birth-scale level values, their corresponding extinction-scale level values, and the homology dimension of the generator are structurally combined to form a chain group topological feature. This feature contains the persistence interval information of all generators. Each generator record includes four fields: identifier, homology dimension, birth-scale level, and extinction-scale level.
[0070] Step 140: Construct an infeasible domain skeleton loop based on the generators that cross the preset scale crossing conditions in the chain group topology features, map it to the defect neighborhood identifier set and expand it into a machining infeasible domain entity using tool machining parameters, perform interference detection in combination with the preset initial machining path and perform detour reconstruction on the interference path segment to generate a detour connected path sequence.
[0071] After obtaining the topological features of the chain group, it is necessary to select generators with sufficient persistence scale, transform the ring structure they represent into the spatial region that the tool needs to avoid in actual machining, and adaptively adjust the initial machining path to generate a new path that can bypass the aforementioned infeasible region: Step 141: Obtain the topological features of the chain group, and filter out generators that have a continuous interval crossing a preset scale crossing condition from the topological features of the chain group. Mark the filtered generators as significant generators to obtain a set of significant generators.
[0072] Read the chain group topological features generated in step 1365. For each generator, check the difference between its extinction scale level and its birth scale level. Compare this difference with a preset scale crossing condition, which is a length threshold. If the difference is greater than the length threshold, it is determined that the persistence interval of the generator crosses the preset scale crossing condition, and the generator is marked as a significant generator. After performing the above screening on all generators, all generators marked as significant constitute a significant generator set.
[0073] Step 142: Based on the representative ring vertex sequence corresponding to each salient generator in the salient generator set at its birth scale level, extract the three-dimensional spatial coordinates of each vertex in the representative ring vertex sequence, and connect adjacent vertices with line segments according to the vertex connection order of the representative ring to form an infeasible region skeleton ring.
[0074] For each salient generator in the salient generator set, the representative ring vertex sequence corresponding to that generator at its birth scale level is searched in the scale generator pairing record recorded in step 135. Based on the vertex index in this vertex sequence, the 3D spatial coordinates of the point cloud corresponding to that index are extracted from the surface 3D point cloud dataset. Following the original connection order of the representative ring vertex sequence, the 3D spatial coordinates of adjacent vertices are connected sequentially with straight line segments. When connected to the last vertex, it is connected to the first vertex to form a closed loop. The resulting closed polyline loop is the infeasibility region skeleton loop corresponding to that salient generator.
[0075] Step 143: Obtain the defect neighborhood identifier set, which includes the identifier of each defect connected domain and the corresponding defect point set index.
[0076] Read the defect neighborhood identifier set generated in step 1274 from the system memory. This set contains a unique identifier for each defective connected region and an index list of all point clouds belonging to that defective connected region.
[0077] Step 144: Calculate the geometric center coordinates of each infeasible skeleton ring and its spatial distance from the bounding box center coordinates of each defective connected domain. Select the defective connected domain with the smallest spatial distance as the corresponding defective region of the infeasible skeleton ring.
[0078] For each infeasible region skeleton ring constructed in step 142, calculate the arithmetic mean of the spatial coordinates of all vertices of the skeleton ring to obtain the geometric center coordinates of the skeleton ring. For each defect connected component in the defect neighborhood identifier set, obtain the spatial coordinates of all point clouds within the defect connected component, and calculate the maximum and minimum values in the X-axis, Y-axis, and Z-axis directions respectively. Determine the bounding box of the defect connected component using the above six extreme values, and calculate the arithmetic mean of the spatial coordinates of the eight vertices of the bounding box as the center coordinates of the defect connected component. Calculate the Euclidean spatial distance between the geometric center coordinates of the skeleton ring and the center coordinates of each defect connected component. Among all calculated spatial distances, select the defect connected component with the smallest distance value and determine this defect connected component as the corresponding defect region of the infeasible region skeleton ring.
[0079] Step 145: Map the vertex sequence of the infeasible region skeleton ring to the local point cloud reference space of the corresponding defect region, and adjust the position of each vertex on the infeasible region skeleton ring according to the point cloud distribution of the corresponding defect region, so that the adjusted skeleton ring is embedded within the space spanned by the point cloud of the corresponding defect region, thus obtaining the embedded skeleton ring.
[0080] The coordinates of each vertex in the vertex sequence of the infeasible region skeleton ring are transformed from the global workpiece coordinate system to the local point cloud reference coordinate system of the corresponding defect region. In this local coordinate system, the position of each vertex on the skeleton ring is locally adjusted based on the point cloud distribution of the corresponding defect region as a constraint. Specifically, for a vertex on the skeleton ring, the nearest point cloud belonging to the corresponding defect region is searched within its neighborhood, and the position of the skeleton ring vertex is moved in the direction pointing to the nearest point cloud, so that the final position of the skeleton ring vertex is located within the space spanned by the point cloud of the corresponding defect region. After performing the above adjustment on all vertices on the skeleton ring, an embedded skeleton ring is obtained within the point cloud space of the defect region.
[0081] Step 146: Using each edge of the embedded skeleton ring as an axis, generate a cylindrical volume unit with a radius equal to the sum of the tool diameter parameter and the machining allowance parameter. Perform a Boolean union operation on all cylindrical volume units corresponding to the edges to obtain the initial infeasible region corresponding to a single infeasible region skeleton ring.
[0082] Obtain the tool diameter and machining allowance parameters used in the current machining process, and add them together to obtain a radius value. Using the line segment corresponding to each edge of the embedded skeleton ring as the central axis, and this radius value as the cross-sectional radius, generate a cylindrical volume element. Since an embedded skeleton ring contains multiple edges, a corresponding number of cylindrical volume elements are generated. Combine all the above cylindrical volume elements into a set, and perform a Boolean union operation on this set, merging all cylindrical volume elements into a single solid model. This solid model is the initial infeasible region volume corresponding to the infeasible region skeleton ring.
[0083] Step 147: Perform a Boolean union operation on all initial infeasible domain volumes belonging to the same corresponding defect region and the convex hull volume generated from the point cloud of the corresponding defect region to obtain the complete infeasible domain entity of the corresponding defect region. Traverse all infeasible domain skeleton loops and corresponding defect regions to obtain the set of processing infeasible domain entities.
[0084] For the same defective connected domain, if it corresponds to multiple infeasible domain skeleton rings, all initial infeasible domain volumes generated in step 146 belonging to that defective connected domain are collected. Simultaneously, convex hull calculation is performed on all point clouds within the defective connected domain to generate a minimum convex polyhedron enclosing all point clouds of the defective region as the convex hull volume. All collected initial infeasible domain volumes are Boolean-merged with this convex hull volume to form a complete solid model, which is the complete infeasible domain entity of the defective connected domain. The above processing is performed on all defective connected domains and their corresponding infeasible domain skeleton rings to obtain all processed infeasible domain entities, which together constitute the set of processed infeasible domain entities.
[0085] Step 148: Based on the set of infeasible processing entities, perform interference detection on the preset initial processing path and perform detour reconstruction on the interference path segments to generate a detour connected path sequence.
[0086] After obtaining the set of entities in the infeasible processing domain, it is necessary to identify and replace the parts of the preset initial processing path that interfere with the above entities. The specific implementation method of this step will be further explained in subsequent steps 1481 to 1484: Step 1481: Obtain a preset initial processing path, which is composed of sequentially connected straight path segments.
[0087] The system reads the pre-planned initial machining path data from the system memory. This initial machining path is a tool trajectory generated based on the ideal CAD model of the metal blank. It contains multiple path points arranged in the machining order. Adjacent path points are connected by straight line segments. The entire path consists of multiple sequentially connected straight line path segments.
[0088] Step 1482: Discretely sample each straight path segment in the preset initial processing path to generate a path discrete point sequence. Perform spatial inclusion detection on each discrete point in the path discrete point sequence with the processing infeasible domain entity set. Mark the discrete points that fall inside the processing infeasible domain entity set as interference points to obtain an interference discrete point set.
[0089] For each straight path segment in the preset initial processing path, equidistant sampling is performed on the straight path segment with a preset sampling step size to generate multiple discrete points. For each discrete point, its spatial coordinates are obtained, and then it is determined whether the coordinates are located inside any entity in the set of entities in the infeasible processing domain. The specific determination method is as follows: draw a ray from the discrete point in any direction, and count the number of intersections between the ray and the surface of the entity in the infeasible processing domain. If the number of intersections is odd, the discrete point is determined to be inside the entity; if it is even, it is determined to be outside the entity. All discrete points determined to be inside the entity are marked as interference points, and all interference points constitute the set of interference discrete points.
[0090] Step 1483: Following the travel sequence of the preset initial processing path, merge consecutive adjacent interference points in the set of interference discrete points into the same interference path segment, and determine the starting path point and the ending path point of each interference path segment. The starting path point and the ending path point are both non-interference points.
[0091] The set of discrete interference points is traversed according to the preset initial processing path, and interference points that are consecutively adjacent in the path sequence are grouped together. For each group of consecutive interference points, the nearest non-interference point before the first interference point in the group is determined as the starting path point of the interference path segment, and the nearest non-interference point after the last interference point in the group is determined as the ending path point of the interference path segment. Thus, each interference path segment is defined by a starting path point and an ending path point, and both of these points are located outside the set of entities in the processing infeasible region.
[0092] Step 1484: At a position outside the entity surface of the set of entities in the infeasible processing domain and at a distance from the entity surface equal to the processing allowance parameter, generate a detour Bézier curve control point that is smoothly connected to the starting path point and the ending path point. By repeatedly adjusting the position of the control point to meet the collision avoidance constraint with the set of entities in the infeasible processing domain, generate a detour obstacle avoidance path segment. Replace the corresponding interference path segment with the detour obstacle avoidance path segment, and connect all the original non-interference path segments and the detour obstacle avoidance path segment end to end according to the original processing order to generate a detour connected path sequence.
[0093] For each interference path segment, based on the spatial coordinates of its starting and ending path points and the surface geometry of the set of entities in the infeasible processing region, multiple control points are generated at positions outside the surface of the entities in the infeasible processing region and at a distance equal to the machining allowance parameter value from the surface. These control points are generated by arranging a series of intermediate control points in the outer space bypassing the entities in the infeasible processing region, with the starting and ending path points as endpoints. This ensures that the Bézier curve defined by these control points smoothly extends from the starting path point to the ending path point, and the entire curve lies outside the entities in the infeasible processing region.
[0094] Then, by iteratively adjusting the positions of the intermediate control points, the spatial distance between all discrete points on the curve and the set of entities in the infeasible processing region is greater than or equal to the processing allowance parameter value. After satisfying the collision avoidance constraint, the Bézier curve becomes the bypass obstacle avoidance path segment. The generated bypass obstacle avoidance path segment replaces the corresponding interference path segment in the preset initial processing path, and all the original straight path segments that were not replaced are connected to all the bypass obstacle avoidance path segments in the original processing order, forming a complete and continuous bypass connected path sequence.
[0095] Step 150: Determine the tool axial attitude vector and feed direction vector based on the coordinates of sequentially adjacent path points in the bypass connected path sequence, and generate control commands for the machining equipment to drive the multi-axis machining device to move along the bypass connected path sequence.
[0096] After obtaining a sequence of bypass paths that can avoid all infeasible machining regions, this sequence needs to be converted into motion control commands that can be executed by a multi-axis machining center. This step calculates the spatial orientation and feed direction of the tool at each path point based on the spatial coordinates of the path points, and generates the corresponding control command sequence. Step 151: Obtain the bypass connected path sequence, which includes multiple path points arranged in the processing order, each path point carrying its three-dimensional coordinates in the workpiece coordinate system.
[0097] Read the detour connection path sequence generated in step 1484 from the system memory. This sequence is an ordered list of path points, and each path point in the list contains the X-axis coordinate component, Y-axis coordinate component and Z-axis coordinate component of the point in the workpiece coordinate system.
[0098] Step 152: Extract the current path point and the next path point from the detour connected path sequence in sequence, subtract the coordinates of the current path point from the coordinates of the next path point to obtain the spatial vector between the two points, and take the spatial vector as a unit length to obtain the feed direction vector.
[0099] According to the order of arrangement in the sequence of bypass connected paths, the current path point P is extracted sequentially. i and its adjacent next path point P i+1 Calculate P respectively. i+1 The three coordinate components and P i The difference between the three coordinate components is obtained from P. i Point to P i+1 The spatial vector is then calculated. Its length is the square root of the sum of the squares of the differences between its three coordinate components. Each of the three coordinate components is then divided by this length to obtain the unit spatial vector, which represents the current path point P. i The feed direction vector at that location.
[0100] Step 153: Obtain the local normal vector of the workpiece surface at the current path point. The local normal vector of the workpiece surface is obtained by performing plane fitting on the point cloud located in the neighborhood of the current path point in the three-dimensional point cloud data set of the surface.
[0101] For the current path point P i The algorithm retrieves all point clouds whose spatial distance to a given point is less than a preset neighborhood radius from the surface 3D point cloud dataset. Using the 3D spatial coordinates of the retrieved point clouds as input data, a least-squares plane fitting algorithm is employed to fit a spatial plane. The normal direction of this plane represents the current path point P. i The local normal vector of the workpiece surface at a certain location, and the direction of the normal vector is taken as pointing outward from the workpiece.
[0102] Step 154: Using the feed direction vector as a reference, project the local normal vector of the workpiece surface onto a plane perpendicular to the feed direction, reverse the direction of the projected vector and normalize it to obtain the tool axial attitude vector. The angle between the tool axial attitude vector and the local normal vector of the workpiece surface satisfies the preset tool tilt angle range.
[0103] Calculate a projection plane perpendicular to the feed direction vector; the normal direction of this plane is the feed direction vector. Project the local normal vector of the workpiece surface onto this projection plane to obtain a projection vector. Invert the direction of this projection vector, and then normalize it by dividing each component by the length of the vector to obtain the tool axial attitude vector. The angle between this tool axial attitude vector and the original local normal vector of the workpiece surface is determined by the tool tilt angle. Through the above projection inversion operation, this angle is controlled within a preset tool tilt angle range.
[0104] Step 155: Combine the tool axial attitude vector and the feed direction vector to form a tool pose description corresponding to the current path point. The tool pose description determines the spatial orientation of the tool at the current path point.
[0105] The feed direction vector obtained in step 152 and the tool axial attitude vector obtained in step 154 are concatenated in sequence to form a six-dimensional tool pose description vector. The first three components of this vector correspond to the three spatial direction components of the tool axial attitude vector, and the last three components correspond to the three spatial direction components of the feed direction vector. This tool pose description determines the complete spatial orientation information of the tool at the current path point.
[0106] Step 156: Adjust the feed speed according to the direction change of the feed direction vector. Compare the angle between the feed direction vector and the feed direction vector of the previous adjacent path segment with a preset angle threshold. When the angle is less than the preset angle threshold, maintain the baseline feed speed. When the angle exceeds the preset angle threshold, reduce the feed speed according to the angle size to generate the feed speed value of the current path segment.
[0107] Get the current path point P i The feed direction vector at point P and the previous path point P i-1 Calculate the angle between the two feed direction vectors at point P. Compare this angle with a preset angle threshold. If the angle is less than the preset angle threshold, it indicates a gentle change in path direction, and the current path segment P is adjusted accordingly. i To P i+1The feed rate is set to the baseline feed rate. If the included angle is greater than or equal to the preset angle threshold, it indicates that the path direction has changed drastically. At this time, the feed rate is set to the baseline feed rate multiplied by an adjustment coefficient. The value of the adjustment coefficient is less than 1 and is inversely proportional to the size of the included angle. The larger the included angle, the smaller the adjustment coefficient.
[0108] Step 157: Convert the tool pose description and feed rate value into a sequence of control commands for the machining equipment and output them.
[0109] For each path point in the connected path sequence, its corresponding tool pose description vector and feed rate value are assembled into a machining equipment control command. All control commands corresponding to all path points are arranged in path order to form a machining equipment control command sequence. This sequence is sent to the controller of the multi-axis machining unit via industrial Ethernet or fieldbus, driving the multi-axis machining unit to move along the connected path sequence according to the specified pose and speed.
[0110] Based on the above steps, as an optional embodiment of the present invention, the method further includes steps 210 to 240 after step 150, for adjusting the feed rate in the control command of the processing equipment based on the material distribution characteristics: Step 210: Obtain the feed direction vector corresponding to each path point in the bypass connected path sequence, construct a local direction transfer tensor field using the feed direction vectors of adjacent path points, and extract the directional gradient flow feature representing the magnitude of directional change in the neighborhood of the path point from the local direction transfer tensor field.
[0111] For each path point in the sequence of connected paths, obtain its corresponding feed direction vector. For each path point, combine it with the feed direction vectors of its two adjacent path points to construct a local direction transition tensor. This tensor is constructed as follows: for the current path point, use its feed direction vector as the center vector; calculate the difference between this center vector and the feed direction vector of its previous path point as the first transition vector; calculate the difference between this center vector and the feed direction vector of its next path point as the second transition vector; and concatenate the first and second transition vectors to form a two-dimensional transition matrix. Perform the above operation for each path point to obtain multiple local direction transition tensors distributed along the path. These tensors together constitute a local direction transition tensor field. Extract the absolute value of the determinant of each local direction transition tensor as the directional gradient flow feature value at that path point.
[0112] Step 220: Obtain the local density value of each point cloud in the surface three-dimensional point cloud data set, and project the local density value of the point cloud in the neighborhood of the path point onto the orthogonal plane of the feed direction vector along the bypass connected path sequence to generate a density distribution cut-off feature synchronized with the path sequence.
[0113] Read the local density values of each point cloud in the surface 3D point cloud data set calculated in step 1273. For each path point in the bypass connected path sequence, retrieve all point clouds within the neighborhood of that path point, and obtain the local density values of these point clouds and their spatial positions relative to that path point. Project these local density values of the point clouds onto an orthogonal plane with the path point as the origin and the feed direction vector as the normal, generating a two-dimensional density distribution projection map. Perform this operation sequentially along the entire path sequence to obtain a density distribution cut-out feature sequence synchronized with the path point sequence.
[0114] Step 230: The directional gradient flow feature and the density distribution cut-off feature at the same path point are fused at the feature layer to generate a fused path material joint representation at the path point. The path material joint representation sequence is composed of the path material joint representations corresponding to all path points on the bypass connected path sequence.
[0115] For each path point in the bypass connected path sequence, the directional gradient flow feature value calculated in step 210 is concatenated with the corresponding density value in the density distribution cutoff feature sequence calculated in step 220. Specifically, the directional gradient flow feature value is appended as a scalar to the end of the density distribution cutoff feature vector to form a new multidimensional feature vector, which is the joint representation of the path material at that path point. This fusion operation is performed on all path points, and the fused feature vectors are arranged in the path order to form the joint representation sequence of the path material.
[0116] Step 240: Using the path material joint characterization sequence as input, perform feedforward compensation adjustment on the feed rate value in the processing equipment control command, correct the feed rate value of the corresponding path segment based on the changing trend of the joint characterization between adjacent path points in the path material joint characterization sequence, generate a feed rate correction command sequence, and superimpose the feed rate correction command sequence into the processing equipment control command to update the motion control parameters of the multi-axis machining device.
[0117] The path material joint characterization sequence is used as the input signal for the feedforward compensator. For the joint characterization vectors of two adjacent path points in the sequence, the Euclidean distance between them is calculated to obtain the joint characterization change. When this change exceeds a preset change threshold, it is determined that the material distribution characteristics corresponding to that path segment have abruptly changed, and the feed rate needs to be reduced to ensure machining quality. Specifically, a compensation coefficient is calculated based on the magnitude of the joint characterization change. The value of this compensation coefficient is between 0 and 1, with a smaller compensation coefficient for larger changes. The reference feed rate of the current path segment is multiplied by this compensation coefficient to obtain the corrected feed rate value. The above calculation is performed on all path segments along the entire path sequence to generate a set of feed rate correction values corresponding to the path segments, forming a feed rate correction command sequence. This correction command sequence is superimposed on the feed rate field in the original machining equipment control command generated in step 157 to update the motion control parameters of the multi-axis machining device.
[0118] As another optional embodiment of the present invention, the method further includes steps 310 to 330 after step 150, for evaluating and correcting the stability of the tool posture in the machining path: Step 310: Sequential sampling of the attitude change rate between adjacent path points is performed on the tool axial attitude vector corresponding to each path point in the bypass connected path sequence to obtain an attitude change rate sampling sequence distributed along the path arc length. Multi-scale frequency domain transformation processing with path arc length as the variable is performed on the attitude change rate sampling sequence. The frequency band component characterizing the high-frequency oscillation of the attitude is separated from the multi-scale frequency domain transformation processing result. Tool attitude stability degradation characteristics are generated based on the energy concentration degree of the frequency band component of the high-frequency oscillation of the attitude.
[0119] For each path point in the connected path sequence, its corresponding tool axial attitude vector is obtained. For the tool axial attitude vectors of two adjacent path points, the angle between the two attitude vectors is calculated as the attitude change amount. This attitude change amount is then divided by the spatial distance between the two path points to obtain the attitude change rate. The attitude change rate is calculated for all adjacent path points in the path sequence, resulting in a set of attitude change rate sampling sequences distributed along the path arc length. This sampling sequence is used as the input signal, and a Discrete Fourier Transform is performed to transform the spatial domain signal to the frequency domain. In the frequency domain, high-frequency components above a preset frequency threshold are extracted, and the energy sum of these high-frequency components is calculated. This energy sum is used as a characteristic of tool attitude stability degradation.
[0120] Step 320: The tool attitude stability degradation feature is located in reverse along the path arc length direction of the bypass connected path sequence to each local path segment. Based on the comparison result of the tool attitude stability degradation feature and the preset degradation judgment condition, a set of local path segments to be corrected is divided from the bypass connected path sequence. For each path point contained in the set of local path segments to be corrected, the tool axial attitude vector is recalculated with the low-frequency smooth component of the tool axial attitude vector in the neighborhood of the path point as a constraint. The recalculated tool axial attitude vector is then weighted and recursively fused with the original tool axial attitude vector of the corresponding path point to generate a tool axial attitude vector sequence after attitude replacement correction.
[0121] Based on the attitude change rate sampling sequence calculated in step 310, the high-frequency energy components are reverse-mapped along the path arc length to determine the path intervals where high-frequency energy is concentrated. These intervals are compared with a preset degradation judgment condition, which is a high-frequency energy threshold. If the high-frequency energy of a certain path interval exceeds this threshold, the interval is marked as a local path segment to be corrected. All marked intervals constitute a set of local path segments to be corrected. For each path segment in this set, the original tool axial attitude vectors of all path points within that path segment are obtained. For each path point, the attitude vector sequence within the neighborhood before and after that path point is extracted, and this sequence is low-pass filtered to obtain the low-frequency smoothed component at that path point. This low-frequency smoothed component is weighted and averaged with the original attitude vectors to obtain the corrected tool axial attitude vector. The above operation is performed on all path segments to be corrected to generate a corrected tool axial attitude vector sequence.
[0122] Step 330: Establish a linkage relationship between the tool axial attitude vector sequence after attitude replacement and correction and the feed rate value corresponding to the path point in the machining equipment control command. Determine the synchronous adjustment mapping between the tool axial attitude vector change amplitude and the feed rate value based on the linkage relationship. Perform joint update of the tool axial attitude vector and feed rate value in the machining equipment control command according to the synchronous adjustment mapping to generate a linkage-adjusted tool pose control command sequence. Replace the machining equipment control command with the linkage-adjusted tool pose control command sequence.
[0123] The corrected tool axial attitude vector sequence obtained in step 320 is linked with the original feed rate value at the corresponding path point. Specifically, for each path point, the angle between the tool axial attitude vector before and after correction is calculated as the attitude adjustment range. A feed rate synchronization adjustment coefficient is determined based on this attitude adjustment range. This coefficient is negatively correlated with the attitude adjustment range; the larger the attitude adjustment range, the smaller the feed rate adjustment coefficient. The original feed rate value is multiplied by this adjustment coefficient to obtain the linked adjusted feed rate value. The corrected tool axial attitude vector is combined with the linked adjusted feed rate value to generate a linked adjusted tool pose control command sequence. This sequence replaces the original machining equipment control command generated in step 157 as the final control command output to the multi-axis machining device.
[0124] In this embodiment of the invention, the processing path generation and optimization process involved in the above steps further includes an optional implementation method of using an artificial intelligence model to identify surface defect areas of the metal blank. The specific architecture, training, and deployment methods of this model will be described in detail below.
[0125] The defect region identification model used in this embodiment of the invention is built on the PointNet++ network architecture. This network is specifically designed for processing unordered 3D point cloud data and can effectively extract local geometric features of the point cloud. The model contains three ensemble abstraction layers, each consisting of a sampling layer, a grouping layer, and a feature extraction layer. The sampling layer uses the farthest point sampling algorithm to select a fixed number of center points from the input point cloud. The grouping layer constructs local neighborhood spheres with each center point as the center and a preset radius. The feature extraction layer maps the point cloud features falling within the same neighborhood sphere into high-dimensional feature vectors through a shared multilayer perceptron, and then aggregates them through max pooling to obtain the local features of the center point. The neighborhood radii of the three ensemble abstraction layers increase progressively, namely the first radius value, the second radius value, and the third radius value, respectively, corresponding to the first dimension, the second dimension, and the third dimension of the output features, to capture multi-scale geometric information from fine-grained to coarse-grained. After the three abstraction layers, two fully connected layers are connected. The first fully connected layer compresses the features of the third dimension to the fourth dimension. The second fully connected layer maps the fourth dimension to a binary classification output, corresponding to non-defect points and defect points respectively. The second fully connected layer is followed by a Softmax activation function to output the defect probability value.
[0126] The model training process is as follows: The training dataset comes from 3D point cloud data of metal blanks collected from historical processing batches, containing multiple sets of point cloud samples. The input of each set of samples is a 3D coordinate matrix containing a preset number of points. The labels for each set of samples are manually generated, and the labeling method is to mark each point in the point cloud as a defect area point. During training, the cross-entropy loss function is used as the optimization objective. This loss function measures the difference between the predicted probability and the true label of each point. The optimizer uses the Adam algorithm, with the initial learning rate set to the first learning rate, the batch size set to the first batch value, and the training epochs set to the first epoch value. An early stopping strategy is adopted during training, using the F1 score on the validation set as the evaluation metric. Training is terminated when the F1 score on the validation set no longer improves for several consecutive epochs. After training, the model parameters with the highest F1 score on the validation set are saved as the final model weights.
[0127] When applying the above model to identify defect regions in a 3D point cloud dataset of a metal blank surface, the 3D point cloud dataset obtained in step 110 is first uniformly and randomly downsampled according to a preset number of sampling points, ensuring that the number of input point clouds matches the input dimension during model training. Then, the downsampled point cloud coordinate matrix is directly input into the model's input layer. After forward propagation through three set abstraction layers and mapping through two fully connected layers, the model outputs the defect probability value corresponding to each point. Points with defect probability values greater than a preset probability threshold are marked as defect points, and the coordinates of all marked defect points are output as supplementary or alternative data sources for the defect neighborhood identifier set in subsequent steps.
[0128] It should be noted that the PointNet++-based model implementation described above is an optional solution in this embodiment of the invention, serving to assist in identifying defect regions on the surface of metal blanks. When this model cannot be deployed due to insufficient data or limited computing resources, the statistical analysis method based on local density differences in point clouds in steps 1273 and 1274 of this embodiment can independently generate the defect neighborhood identifier set. Therefore, this model is not a necessary technical feature for implementing this invention. The two identification methods described above can be used in parallel. The defect point coordinates output by the model are merged with the low-density point set extracted based on density differences, and then the spatial connectivity region segmentation operation in step 1274 is performed, thereby combining the advantages of both methods to improve the robustness of defect identification.
[0129] Based on the above, Figure 2 This is a schematic diagram of a scenario for three-dimensional scanning and spatial scale evolution chain group construction of a metal blank, provided in an embodiment of the present invention. Figure 2 As can be seen, the schematic diagram is divided into three functional blocks according to the technical process, which fully presents the entire chain logic from point cloud acquisition, topology feature processing to processing execution control.
[0130] Block 1 illustrates the scenario of point cloud acquisition and basic chain group construction: The structured light scanning device at the top performs a full-area scan of the surface to be processed on the curved metal blank, outputting a set of three-dimensional point cloud data of the surface, and simultaneously establishing a point cloud spatial index structure to support subsequent multi-scale neighborhood retrieval; the left side illustrates the evolution logic of neighborhood scale connection edges, where discrete points gradually establish adjacency relationships as the scale increases and form a cross-scale connection network structure; the locally magnified area circled on the surface of the blank corresponds to a set of defect neighborhood identifiers, and low-density defect areas are screened out through the local density difference of the point cloud, providing physical anchors for the spatial mapping of subsequent topological features.
[0131] The block labeled 2 illustrates the topology feature extraction and infeasibility domain path reconstruction process: using a multi-scale simple complex sequence as input, the topology features of the chain group are extracted by constructing a boundary matrix and performing simplification processing. Generators that continuously satisfy the preset scale crossing conditions are selected and infeasibility domain skeleton loops are constructed. After mapping the skeleton loops to the corresponding defect regions, a three-dimensional machining infeasibility domain entity is generated by combining the tool diameter and machining allowance parameters. The path diagram below intuitively presents the before and after comparison of the smooth bypass connected path sequence generated by the bypass curve reconstruction after the preset initial machining path interferes with the infeasibility domain entity, demonstrating the core effect of defect adaptive avoidance.
[0132] The block labeled 3 illustrates the attitude control and command generation logic of the machining execution end: the multi-axis machining device on the left carries the tool to perform cutting operations along the planned path; the workpiece surface in the middle is marked with the spatial geometric relationship between the feed direction vector, the local normal vector of the workpiece surface and the tool axial attitude vector, reflecting the attitude calculation logic under the tool tilt angle constraint; the waveform diagram below represents the temporal fluctuation characteristics of the machining equipment control commands; the flowchart on the right shows the attitude stability correction link of attitude change rate sampling, angle threshold determination and weighted recursion fusion, realizing the linkage control of tool attitude smoothness and feed rate.
[0133] Furthermore, for a clearer understanding of the embodiments of the present invention, please refer to the following references. Figure 3 This is a visualization interface diagram of the spatial scale evolution chain group of metal blanks provided in the embodiments of the present invention. Figure 3 The interface is divided into four main modules: the top statistical indicators area, the middle chain group visualization main area, the right feature details panel, and the bottom path command area, realizing the visualization interaction and command output of the entire process data.
[0134] The top four indicator cards sequentially display the core quantification parameters: the total surface 3D point cloud is 2.41M, the initial neighborhood scale is 0.8mm, the simplex sequence covers 5 scale levels and contains 138 maximal simplexes, there are a total of 204 cross-scale connecting edges forming a directed acyclic graph structure, 7 defect neighborhood markers are identified, and the density judgment threshold is less than 0.4, which can quickly present the overall state of the system input and intermediate structure. The central main visualization area presents the spatial scale evolution chain structure with a hierarchical node diagram. The nodes are arranged from left to right according to the scale parameters of 0.8, 1.2, 1.8, and 2.4. The dashed arrows between the nodes represent cross-scale connecting edges established based on the vertex set inclusion relationship; the orange triangles marking the infeasible region skeleton rings correspond to the selected significant generators, which are embedded in the nodes of each scale to intuitively show the survival and continuation status of the topological rings as the scale evolves.
[0135] The two detail panels on the right respectively contain topology and defect information: the upper panel on the homogeneity of generators lists the persistence intervals of three sets of H1-dimensional generators in the form of a bar chart, where the persistence interval of H1-α is 0.8-2.1, H1-β is 1.2-2.4, and H1-γ is 0.8-2.4+. H1-γ is marked as a significant generator that crosses the preset scale condition; the lower panel on the defect neighborhood mapping displays defect connected domain markers such as D01, D03, and D05, marking a total of 7 low-density connected domains. The D03 region forms a mapping relationship with the skeleton γ, completing the spatial correspondence between topological features and physical defects.
[0136] The bottom area handles path and command output functions: the left-hand bypass connected path sequence panel displays the path point sequence from P1 to P7 in the form of a node flow, where P3 and P6 are marked as path nodes after interference reconstruction; the "Generate Machining Control Command" button in the lower left corner (highlighted in red) is the core interactive control. When triggered, it points to the command output area in the red box in the "Tool Pose & Feed" panel on the right via a red arrow. This area outputs two lines of standard G-code format machining equipment control commands, including X / Y / Z axis coordinates, A / B axis attitude angles, and feed speed F parameters. The axial attitude vector (-0.21, 0.87, 0.44) and feed direction vector (0.93, -0.12, 0.33) of the current point are displayed simultaneously at the top of the panel. This fully realizes the closed-loop output from topology analysis and path reconstruction to executable machining commands. Operators can intuitively monitor the entire process status of defect identification, topology evolution, and path planning through this interface, and export the executable control commands of the equipment with one click.
[0137] In summary, this invention constructs a spatial-scale evolutionary chain group structure, mapping the 3D point cloud data of a metal blank surface to a topologically persistent scale space. Utilizing homogeneous generator extraction and persistent interval tracking, it achieves a quantitative characterization of the topological essence of the defect region, avoiding the limitations of traditional local geometric features in representing the defect morphology incompletely. Furthermore, generators in the chain group topological features that cross preset scale crossing conditions are constructed as infeasible region skeleton loops. These loops are then mapped to a defect neighborhood identifier set and expanded into machining infeasible region entities based on tool machining parameters. This couples the spatial occupancy of the defect region with the tool kinematic constraints within a unified framework. The generation of bypass connected path sequences ensures reliable collision avoidance between the machining path and infeasible region entities. Thus, a complete closed loop is formed from point cloud topology perception to adaptive reconstruction of the machining path, effectively improving the intelligence level of machining path planning for metal blanks containing defects and the safety of the machining process.
[0138] This invention also provides a metal processing path control system: a processor; a storage device storing a computer program thereon; and a network interface for providing network communication functions; when the computer program is executed by the processor, the processor implements any of the metal processing path control methods based on three-dimensional image recognition described above.
[0139] Based on the above, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the above method. Furthermore, it should be noted that this embodiment of the invention also provides a computer program product, which may include a computer program that can be stored in a computer-readable storage medium. The processor of the metal processing path control system reads the computer program from the computer-readable storage medium, and the processor can execute the computer program, causing the metal processing path control system to perform the aforementioned steps. Figure 1 The descriptions of the methods in the corresponding embodiments are therefore not repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program product embodiments related to this invention, please refer to the description of the method embodiments of this invention. It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to mutually. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section description.
Claims
1. A method for controlling metal processing paths based on three-dimensional image recognition, characterized in that, include: Acquire a set of three-dimensional point cloud data of the surface of a metal blank; Based on the surface three-dimensional point cloud data set, a point cloud neighborhood map of each scale is constructed with a neighborhood scale parameter that increases with a preset step size, and a maximal simplex decomposition is performed to obtain simple complexes of each scale. Simplexes with containment relationships between vertex sets of adjacent scales are connected by cross-scale edges to form a spatial scale evolution chain group structure. A defect neighborhood identifier set is generated based on the local density difference of the point cloud. The spatial scale evolution chain group structure is subjected to homology generator extraction processing. The homology group of simple complex at each scale is calculated and the generator is extracted. The occurrence and extinction scales of each generator are tracked between continuous scales to obtain the chain group topological features that record the persistence interval of the generator. Based on the generators that cross the preset scale crossing conditions in the topological features of the chain group, an infeasible domain skeleton loop is constructed, mapped to the defect neighborhood identifier set, and expanded into a machining infeasible domain entity using tool machining parameters. Interference detection is performed in conjunction with the preset initial machining path, and detour reconstruction is performed on the interference path segment to generate a detour connected path sequence. The tool axial attitude vector and feed direction vector are determined based on the coordinates of sequentially adjacent path points in the bypass connected path sequence, and control commands for the machining equipment are generated to drive the multi-axis machining device to move along the bypass connected path sequence.
2. The method according to claim 1, characterized in that, The process of constructing point cloud neighborhood graphs at each scale based on the surface 3D point cloud data set with a preset step size incrementing neighborhood scale parameter, performing maximal simplex decomposition to obtain simplex complexes at each scale, establishing cross-scale connecting edges for simplexes with containment relationships between vertex sets of adjacent scales to form a spatial scale evolution chain group structure, and generating a defect neighborhood identifier set based on local density differences in the point cloud, includes: A spatial partitioning operation is performed on the surface 3D point cloud data set to establish a point cloud spatial index structure for accelerating neighborhood retrieval. The point cloud spatial index structure organizes the point clouds in the surface 3D point cloud data set into a tree-shaped data organization that allows for quick querying of nearest neighbors according to their spatial position. Each node of the tree-shaped data organization corresponds to a spatial partitioning region and stores the point cloud index within that region. Set the neighborhood scale parameter to a preset initial value, and create a simple complex sequence container to store simple complexes at each scale. The simple complex sequence container is an empty set in the initial state. Based on the point cloud spatial index structure, a fixed-radius neighborhood search is performed on each point in the surface three-dimensional point cloud data set using the neighborhood scale parameter. All neighboring points with a spatial distance smaller than the neighborhood scale parameter are retrieved. The retrieved points are taken as the neighborhood set of that point. The current neighborhood graph structure is constructed using the points in the surface three-dimensional point cloud data set as nodes and the neighborhood relationship as edges. The current neighborhood graph structure is subjected to maximal simplex identification processing. All complete subgraphs of the current neighborhood graph structure are traversed and their maxima are determined. All maximal complete subgraphs not contained by other complete subgraphs are extracted as simplexes. All extracted simplexes constitute the current scale simplex complex. The simplex is represented by a set of vertices consisting of one or more points, and the simplex satisfies that any two points within it have an edge in the current neighborhood graph structure. The current scale simple complex is stored in the simple complex sequence container. The simple complex sequence container is a data organization that stores simple complexes in ascending order of scale. When the neighborhood scale parameter is a preset initial value, the current scale simple complex is stored as the first scale level unit. The neighborhood scale parameter is increased by the preset step size to obtain the updated neighborhood scale parameter. Based on the point cloud spatial index structure, a fixed radius neighborhood search is re-executed with the updated neighborhood scale parameter to generate an updated neighborhood graph structure. The updated neighborhood graph structure is subjected to maximal simplex identification processing to obtain an updated scale simplex. The updated scale simplex is stored in the simplex sequence container, and it is determined whether the updated neighborhood scale parameter reaches the preset maximum scale parameter. If it does not reach the preset maximum scale parameter, the neighborhood scale parameter is increased by the preset step size, and the neighborhood search, simplex identification, and storage operations are repeated until the neighborhood scale parameter is equal to the preset maximum scale parameter, forming a multi-scale simplex sequence containing simplexes from the initial scale to the maximum scale. The simplexes in the multi-scale simplex sequence are arranged in ascending order of scale parameter. Based on the multi-scale simple complex sequence, cross-scale connection edges are established to form a spatial scale evolution chain group structure, and a defect neighborhood identifier set is generated based on the local density difference of the point cloud.
3. The method according to claim 2, characterized in that, The process of establishing cross-scale connection edges based on the multi-scale simple complex sequence to form a spatial scale evolution chain group structure, and generating a defect neighborhood identifier set based on local density differences in the point cloud, includes: For any two adjacent simplexes in the multi-scale simplex sequence, perform a simplex inclusion matching operation. For each simplex in the smaller scale simplex, check whether the vertex set of the smaller scale simplex is completely included by the vertex set of any simplex in the larger scale simplex. If it is completely included, establish a cross-scale connection edge between the smaller scale simplex and the larger scale simplex. If it is not included, do not establish one. After traversing all adjacent scale pairs, collect all cross-scale connection edges to form a cross-scale connection edge set. Each cross-scale connection edge records the identifier of the smaller scale simplex and the identifier of the larger scale simplex and indicates that the connection direction is from the smaller scale to the larger scale. Using all the simplexes in the multi-scale simplex sequence as nodes and the edges in the cross-scale connection edge set as directed connections between nodes, a spatial scale evolution chain group structure is constructed. The spatial scale evolution chain group structure is a directed acyclic graph structure that spans multiple scales. A point cloud local density estimation operation is performed on the surface three-dimensional point cloud data set. For each point cloud, a preset spatial neighborhood range is selected, the number of points in the spatial neighborhood range is calculated and divided by the neighborhood volume to obtain the local density value of the point. After traversing all the point clouds in the surface three-dimensional point cloud data set, a point cloud local density value distribution set is generated. The local density value of each point in the point cloud local density value distribution set is compared with the preset defect density threshold, and points with local density values less than the preset defect density threshold are extracted to form a low density point set. A spatial connectivity region segmentation operation is performed on the low-density point set. Based on a preset connectivity determination distance, points in the low-density point set whose spatial distance is less than the connectivity determination distance are grouped into the same connected component. All maximal connected subgraphs are obtained by breadth-first search traversal. A unique defective connected region identifier is assigned to each defective connected region, and the coordinate range of all points in the defective connected region is associated with the defective connected region identifier to generate a defective neighborhood identifier set.
4. The method according to claim 1, characterized in that, The process of extracting homology generators from the spatial scale evolution chain group structure involves calculating the homology groups of simplex complexes at each scale and extracting generators, tracking the appearance and disappearance scales of each generator across consecutive scales, and obtaining the chain group topological features that record the persistence intervals of generators, including: Obtain the spatial scale evolution chain group structure, which includes simple complexes at multiple scale levels and cross-scale connecting edges that connect simple complexes at adjacent scales. Extract the simple complexes corresponding to each scale level from the spatial scale evolution chain group structure, and sort them in ascending order of scale to obtain an ordered list of simple complexes; Construct a boundary matrix for each simplex in the ordered simplex list. The boundary matrix has rows of simplexes within the simplex and columns of the simplexes of the next lower dimension within the simplex. The matrix elements record coefficients that reflect the boundary relationships. For each scale level, the boundary matrix is simplified to Smith canonical form, transforming it into a diagonal matrix. The diagonal elements are read to identify the generators of the homology group at that scale level. Each generator corresponds to a closed loop, and this closed loop does not constitute the boundary of other closed loops. The identified generators are associated with their scale level to obtain scale generator pairing records. The scale generator pairing records include generator identifiers, scale level parameters to which the generator belongs, and the sequence of representative loop vertices of the generator in the simplex complex at that scale level. Cross-scale survival matching and persistence interval tracking are performed on generators at each scale to generate chain group topological features.
5. The method according to claim 4, characterized in that, The process of performing cross-scale survival matching and tracking persistence intervals on generators at each scale to generate chain group topological features includes: Generate survival matching is performed on the generator sets of two adjacent scale levels. A generator in the smaller scale generator set is selected, and its representative loop vertex sequence is extracted. Using the vertex correspondence provided by the cross-scale connecting edge, each vertex in the representative loop vertex sequence is mapped to the corresponding vertex in the larger scale simplex, forming a mapped vertex sequence. In a large-scale simple complex, a mapped loop is constructed based on the mapped vertex sequence, and the equivalence class attribute of the mapped loop with respect to the large-scale boundary matrix is calculated to obtain the affiliation of the mapped loop in the large-scale homology group. If the mapping loop corresponds to a nontrivial generator in the larger-scale homology group, then establish a generator survival correspondence between the smaller-scale generator and the larger-scale nontrivial generator, and mark the survival status of the smaller-scale generator as continuing to the larger-scale level. If the mapping loop belongs to a trivial element in a larger-scale homology group, then the smaller-scale generator is determined to be extinct at the larger-scale level, the extinction scale level is recorded as the larger-scale level, and the extinction state of the smaller-scale generator is marked. Traverse all adjacent scale level pairs and repeatedly perform generator survival matching to obtain the first appearance scale level and the final extinction scale level of each generator in the continuous scale evolution process. Take the first appearance scale level as the birth scale level and the final extinction scale level as the extinction scale level to form the persistence interval of the generator. The generator identifiers, birth scale levels, extinction scale levels, and their corresponding homology dimensions of all generators are combined to form a chain group topological feature, which contains complete and persistent information of generators at each homology dimension.
6. The method according to claim 1, characterized in that, The process involves constructing an infeasible region skeleton loop based on generators that cross preset scale crossing conditions in the chain group topology features, mapping it to the defect neighborhood identifier set, expanding it into a machining infeasible region entity using tool machining parameters, performing interference detection in conjunction with a preset initial machining path, and performing detour reconstruction on the interference path segments to generate a detour connected path sequence, including: Obtain the topological features of the chain group, and filter out generators that have a persistent interval crossing a preset scale crossing condition from the topological features of the chain group. Mark the filtered generators as significant generators to obtain a set of significant generators. Based on the representative ring vertex sequence corresponding to each salient generator in the salient generator set at its birth scale level, the three-dimensional spatial coordinates of each vertex in the representative ring vertex sequence are extracted, and adjacent vertices are connected with line segments according to the vertex connection order of the representative ring to form an infeasible region skeleton ring. Obtain the defect neighborhood identifier set, which contains the identifier of each defect connected domain and the corresponding defect point set index; Calculate the geometric center coordinates of each infeasible skeleton ring and its spatial distance from the bounding box center coordinates of each defective connected domain. Select the defective connected domain with the smallest spatial distance as the corresponding defective region of the infeasible skeleton ring. The vertex sequence of the infeasible region skeleton ring is mapped to the local point cloud reference space of the corresponding defect region. The position of each vertex on the infeasible region skeleton ring is adjusted according to the point cloud distribution of the corresponding defect region, so that the adjusted skeleton ring is embedded in the space spanned by the point cloud of the corresponding defect region, thus obtaining the embedded skeleton ring. Using each edge of the embedded skeleton ring as an axis, a cylindrical volume element with a radius equal to the sum of the tool diameter parameter and the machining allowance parameter is generated. Boolean union is performed on all cylindrical volume elements corresponding to the edges to obtain the initial infeasible domain body corresponding to a single infeasible domain skeleton ring. Perform a Boolean union operation on all initial infeasible domain volumes belonging to the same corresponding defect region and the convex hull volume generated from the point cloud of the corresponding defect region to obtain the complete infeasible domain entity of the corresponding defect region. Traverse all infeasible domain skeleton loops and corresponding defect regions to obtain the set of processing infeasible domain entities. Based on the set of infeasible processing entities, interference detection is performed on the preset initial processing path, and detour reconstruction is performed on the interference path segments to generate a detour connected path sequence.
7. The method according to claim 6, characterized in that, The step of performing interference detection on the preset initial processing path based on the set of entities in the infeasible processing region and performing detour reconstruction on the interference path segments to generate a detour connected path sequence includes: Obtain a preset initial processing path, which is composed of sequentially connected straight path segments; Discrete sampling is performed on each straight path segment in the preset initial processing path to generate a path discrete point sequence. Spatial inclusion detection is performed on each discrete point in the path discrete point sequence with the processing infeasible domain entity set. Discrete points falling inside the processing infeasible domain entity set are marked as interference points to obtain an interference discrete point set. Following the travel sequence of the preset initial processing path, consecutive adjacent interference points in the set of interference discrete points are merged into the same interference path segment, and the starting path point and the ending path point of each interference path segment are determined. The starting path point and the ending path point are both non-interference points. At a position outside the entity surface of the set of entities in the infeasible processing domain and at a distance from the entity surface equal to the processing allowance parameter, a detour Bézier curve control point is generated that is smoothly connected to the starting path point and the ending path point. By repeatedly adjusting the position of the control point to meet the collision avoidance constraint with the set of entities in the infeasible processing domain, a detour obstacle avoidance path segment is generated. The corresponding interference path segment is replaced with the detour obstacle avoidance path segment, and all non-interference original path segments are connected end to end with the detour obstacle avoidance path segment in the original processing order to generate a detour connected path sequence.
8. The method according to claim 1, characterized in that, The step of determining the tool axial attitude vector and feed direction vector based on the coordinates of sequentially adjacent path points in the bypass connected path sequence, and generating control commands for the machining equipment to drive the multi-axis machining device to move along the bypass connected path sequence, includes: Obtain the bypass connected path sequence, which contains multiple path points arranged in the processing order, and each path point carries its three-dimensional coordinates in the workpiece coordinate system; From the sequence of bypassed connected paths, the current path point and the next path point are extracted in sequence. The coordinates of the next path point are subtracted from the coordinates of the current path point to obtain the spatial vector between the two points. The spatial vector is then taken as a unit length to obtain the feed direction vector. The local normal vector of the workpiece surface at the current path point is obtained by performing plane fitting on the point cloud in the three-dimensional point cloud data set of the surface within the neighborhood of the current path point. Using the feed direction vector as a reference, the local normal vector of the workpiece surface is projected onto a plane perpendicular to the feed direction, and the projected vector is reversed and normalized to obtain the tool axial attitude vector. The angle between the tool axial attitude vector and the local normal vector of the workpiece surface satisfies the preset tool tilt angle range. The tool axial attitude vector and the feed direction vector are combined to form a tool pose description corresponding to the current path point, and the tool pose description determines the spatial orientation of the tool at the current path point; The feed speed is adjusted according to the direction change of the feed direction vector. The angle between the feed direction vector and the feed direction vector of the previous adjacent path segment is compared with a preset angle threshold. When the angle is less than the preset angle threshold, the base feed speed is maintained. When the angle exceeds the preset angle threshold, the feed speed is reduced according to the size of the angle to generate the feed speed value of the current path segment. The tool pose description and feed rate value are converted into a sequence of control commands for the machining equipment and then output.
9. A metal processing path control system, characterized in that, include: A processor; a storage device having a computer program stored thereon; a network interface for providing network communication functions; when the computer program is executed by the processor, the processor enables the processor to implement the metal processing path control method based on three-dimensional image recognition as described in any one of claims 1-8.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the metal processing path control method based on three-dimensional image recognition as described in any one of claims 1-8.