Mold numerical control program automatic generation method and system based on AI recognition
Patent Information
- Application Number
- CN202611194119.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-09
AI Technical Summary
[0004]本发明的目的在于提供基于AI识别的模具数控程序自动生成及系统:以解决现有技术中模具数控程序生成时存在的可执行性和稳定性低技术问题
[0026]本发明将模具三维几何信息、二维工程标注以及材料、毛坯和加工余量等工艺信息进行关联识别,并结合实际机床、刀具、夹具和工艺规则对识别结果进行修正,使得到的加工特征不仅反映模具的几何形状,还能够表征刀具可达、夹具邻近、机床姿态受限、薄壁变形及保护边界等实际加工条件,从而减少仅依据几何外形识别造成的特征遗漏或工艺判断偏差。
Smart Images

Figure CN122883786A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mold CNC program generation technology, specifically relating to an automatic mold CNC program generation method and system based on AI recognition. Background Technology
[0002] CNC machining of molds typically requires generating CNC programs based on the mold's 3D model, 2D engineering drawings, material properties, blank condition, machining allowance, and machining resources such as machine tools, cutting tools, and fixtures. Current methods for generating CNC programs for molds largely rely on manual CAM programming or feature recognition based on preset rules. Programmers need to manually identify cavities, cores, parting surfaces, holes, slots, deep cavities, narrow slits, freeform surfaces, residual material areas, and tool avoidance areas based on their experience with the mold structure, and then further select cutting tools, machining strategies, cutting parameters, and post-processing methods. Due to the complexity of mold structures, the numerous machining areas, and the strong interrelationships between processes, manual programming is not only time-consuming but also easily affected by differences in operator experience.
[0003] While some existing automatic programming technologies can identify features in 3D geometric models, they suffer from the following problems: How to integrate and identify 3D geometric information, 2D engineering annotation information, and process attribute information before generating the CNC program for the mold, and further combine tool accessibility, fixture interference, machine tool posture, and process rules to modify ordinary geometric features into mold machining feature information with machining constraints? Furthermore, existing automatic CNC program generation schemes typically directly match toolpath templates or fixed process rules based on local machining features, lacking a unified expression of the relationships between target machining features and adjacent features, preceding and following processes, allowance transfer, tool resources, fixture boundaries, machine tool motion boundaries, protection boundaries, and historical machining quality feedback. When the target mold has complex machining scenarios such as deep cavities, narrow grooves, thin walls, freeform surfaces, sudden changes in residual material, or multi-axis linkage, relying solely on a single feature or rule is insufficient to determine whether subsequent toolpath generation will encounter problems such as limited accessibility, fixture interference, overcutting, undercutting, machine tool exceeding boundaries, or historical anomaly propagation. Therefore, how to construct the machining influence range oriented towards the target machining features during the CNC program generation process, and perform risk assessment, process constraint screening, toolpath generation and post-processing verification based on this influence range, so as to improve the executability and stability of automatically generated CNC programs, is an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide an AI-based automatic generation system for CNC programs of molds, in order to solve the technical problems of low executability and stability in the generation of CNC programs for molds in the prior art.
[0005] The objective of this invention can be achieved through the following technical solutions:
[0006] On the one hand, there is an AI-based method for automatically generating CNC programs for molds, which includes:
[0007] Obtain mold design data, processing resource data, and historical processing case data for the target mold;
[0008] Standardize the mold design data by converting the 3D model topology, 2D engineering annotations, and material, blank, and allowance information into identifiable geometric information and process attributes.
[0009] The three-dimensional geometric recognition branch of the AI recognition model is used to generate a candidate set of processing features, and the structural features, geometric processing features, process constraint features and processing safety features are supplemented by the two-dimensional engineering drawing recognition branch and the process attribute recognition branch.
[0010] Based on machining resource data, tool reachability, fixture interference, and process rule adaptation are determined for machining features to obtain mold machining feature information; the mold machining feature information, machining resource data, and historical machining case data are used to construct a mold machining feature semantic graph.
[0011] Using the target machining features as seed nodes, the semantic graph is traversed according to multiple machining relationships and boundary trimming to generate a machining influence domain; the machining executable risk is determined based on the machining influence domain, and a process constraint intersection strategy is generated accordingly; based on the process constraint intersection strategy, tool paths, auxiliary actions, and CNC programs verified by post-processing are generated.
[0012] Furthermore, standardizing the mold design data includes: converting the 3D model of the target mold into a unified geometric expression, extracting faces, edges, vertices, and topological connection relationships; parsing the dimensions, tolerances, roughness, materials, heat treatment, datums, and machining instructions in the 2D engineering drawings, and mapping them to the corresponding machining objects in the 3D model according to the view projection relationship, datum relationship, and annotation pointing relationship; and converting material parameters, blank parameters, and machining allowance data into process attribute vectors.
[0013] Furthermore, the determination of tool reachability, fixture interference, and process rule adaptation based on machining resource data for machining features includes: generating candidate tool and candidate machining posture combinations for each machining feature; determining the tool reachability state based on entry geometry matching, axial penetration matching, and sweep interference relationship; determining the fixture interference state based on fixture entity, clamping boundary, protection boundary, and tool sweep area; determining the process rule compliance state based on material, tool, allowance, surface requirements, and preset process rules; marking machining features that do not meet the adaptation conditions as restricted machining features, and adding corresponding process constraint features or machining safety features.
[0014] Furthermore, constructing a semantic graph of mold processing features includes: establishing processing feature nodes for processing areas, surfaces to be processed, hole and groove structures, curved surface boundaries, and allowance areas; establishing processing resource nodes for cutting tools, fixtures, machine tool postures, post-processors, and process rules; establishing historical case nodes, quality result nodes, and feedback risk nodes for historical toolpath strategies, historical processing parameters, quality inspection results, and actual processing feedback; and establishing semantic association edges based on processing attributes, resource adaptation status, and similarity relationships of historical cases.
[0015] Furthermore, generating the machining influence domain includes: parsing the target machining features of the CNC program to be generated into seed nodes in the mold machining feature semantic graph, and mapping the machining area, surface type, hole and groove structure, surface boundary, allowance distribution, machining accuracy, surface requirements, and machining coordinate system of the target machining features into seed node attributes; typifying the relation types that can participate in the traversal, including geometric adjacency relations, machining sequence relations, allowance transfer relations, tool reachability relations, fixture interference relations, and protective boundary constraint relations; and extracting tool reachability constraints, fixture avoidance constraints, machine tool motion constraints, post-processing support constraints, and machining safety constraints from the machining resource data to determine the resource constraint boundaries required for traversal.
[0016] Furthermore, the generation of the machining influence domain also includes: starting from the seed node, performing a limited-range traversal in the mold machining feature semantic graph according to the relationship type to obtain nodes and relationship edges that are spatially adjacent to the target machining feature, process-related, allowance-inherited, resource-adapted, posture-constrained, fixture-avoided, or protected by boundary constraints; when the traversal reaches a relationship edge that is unreachable by the tool, interferes with the fixture, causes the machine tool to move out of bounds, or does not meet the machining safety boundary, the expansion along the relationship direction is stopped and the restricted node or risk node is marked; the traversed machining feature nodes, machining resource nodes, process rule nodes, historical toolpath strategy nodes, historical machining parameter nodes, and quality feedback nodes are combined into a candidate influence set, and the candidate influence set is trimmed based on the blank boundary, clamping boundary, machine tool movement boundary, and machining safety boundary, while retaining the traceable relationship links from each node in the candidate influence set to the seed node.
[0017] Furthermore, determining the executable risk of processing based on the processing influence domain includes: converting the processing influence domain into a directed weighted graph containing processing feature nodes, processing resource nodes, processing constraint nodes, historical case nodes, and quality feedback nodes; determining the complexity of the processing influence domain based on the degree of node association, edge association, and the distribution of association strength; selecting different processing executable risk calculation methods according to the complexity of the processing influence domain; and calculating the processing executable risk based on the different processing executable risk calculation methods.
[0018] Furthermore, different risk calculation methods include: when the complexity of the processing influence domain meets the first complexity condition, the processing executable risk is determined based on resource adaptation risk, boundary security risk, and historical anomaly risk; when the complexity of the processing influence domain meets the second complexity condition, the processing executable risk is determined based on resource conflict risk and historical anomaly propagation risk, wherein the historical anomaly propagation risk is determined based on the relationship propagation path from the historical anomaly case node to the target processing feature seed node.
[0019] Furthermore, the strategy for generating the intersection of process constraints includes: establishing a set of candidate processes for the target machining features, wherein the set of candidate processes includes AI-recommended processes, mold machining rules, machine tool capability constraints, tool and fixture constraints, material cutting constraints, machining allowance constraints, surface quality constraints, safety boundary constraints, post-processing constraints, and historical qualified process constraints; converting constraints from different sources into comparable constraint items, using intersection retention rules for hard constraints, and screening recommended constraints according to the machining feasibility risk.
[0020] On the other hand, there is an AI-based automatic mold CNC program generation system, which includes:
[0021] The data acquisition unit is used to acquire mold design data, processing resource data, and historical processing case data of the target mold;
[0022] The feature recognition unit is used to standardize the mold design data, converting the 3D model topology, 2D engineering annotations, and material, blank, and allowance information into identifiable geometric information and process attributes; it uses the 3D geometric recognition branch of the AI recognition model to generate a candidate set of processing features, and supplements its structural features, geometric processing features, process constraint features, and processing safety features through the 2D engineering drawing recognition branch and the process attribute recognition branch.
[0023] The feature semantic graph construction unit is used to determine tool reachability, fixture interference, and process rule adaptation based on machining resource data to obtain mold machining feature information; and to construct a mold machining feature semantic graph by combining the mold machining feature information, machining resource data, and historical machining case data.
[0024] The CNC program generation unit is used to traverse the semantic graph according to multiple types of machining relationships with the target machining features as seed nodes and generate a machining influence domain through boundary trimming; determine the machining executable risk based on the machining influence domain, and generate a process constraint intersection strategy accordingly; and generate tool paths, auxiliary actions, and CNC programs verified by post-processing based on the process constraint intersection strategy.
[0025] Compared to existing solutions, the beneficial effects achieved by this invention are:
[0026] This invention associates and identifies the three-dimensional geometric information of the mold, two-dimensional engineering annotations, and process information such as materials, blanks, and machining allowances. It also corrects the identification results by combining the actual machine tools, cutting tools, fixtures, and process rules, so that the obtained machining features not only reflect the geometric shape of the mold, but also characterize the actual machining conditions such as the reachability of the cutting tool, the proximity of the fixture, the restricted posture of the machine tool, thin-wall deformation, and protective boundaries. This reduces the omission of features or the deviation of process judgment caused by identifying based solely on the geometric shape.
[0027] This invention utilizes a semantic graph of mold processing features to associate processing features, processing resources, process relationships, allowance transfer relationships, and historical processing feedback. It also generates a processing influence domain with controlled boundaries and traceable relationships around the target processing feature. Therefore, when generating CNC programs, it can simultaneously consider adjacent areas, preceding and following processes, available tool positions, fixture avoidance requirements, and historical anomalies, avoiding direct program generation based on a single processing surface or a fixed toolpath template.
[0028] This invention sets hard constraint gating before process evaluation, directly excluding combinations of tool unreachability, fixture interference, machine tool exceeding limits, or failure to meet mandatory process rules. It then determines the feasibility risk based on the complexity of the machining influence domain and performs intersection filtering on AI-recommended processes, machining rules, resource capabilities, and historically successful processes. The generated toolpaths and CNC programs also undergo machine tool travel, rotary axis angle, coordinate system, tool compensation, and interference safety checks, helping to reduce the probability of collisions, overcuts, undercuts, and program rework, thus improving the executability and stability of automatically generated CNC programs. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0030] Figure 1 A flowchart illustrating an AI-based method for automatically generating CNC programs for molds, provided as an embodiment of the present invention;
[0031] Figure 2 This is a flowchart of a method for generating mold processing feature information of a target mold according to an embodiment of the present invention;
[0032] Figure 3 This is a block diagram of an AI-based automatic generation system for mold CNC programs according to an embodiment of the present invention. Detailed Implementation
[0033] This embodiment provides a method for automatically generating CNC programs for molds based on AI recognition. Figure 1 A flowchart illustrating an AI-based method for automatically generating CNC programs for molds, as provided in this embodiment of the invention, is shown below. Figure 1 As shown, the method includes the following procedures:
[0034] S1. Obtain the mold design data, machining resource data, and historical machining case data of the target mold. The mold design data includes at least the mold's 3D model, 2D engineering drawings, material parameters, blank parameters, and machining allowance data. The machining resource data includes at least machine tool data, tool data, fixture data, post-processor data, and process rule data. The historical machining case data includes at least historical machining programs, historical toolpath strategies, historical machining parameters, machining quality inspection results, and actual machining feedback data. The mold's 3D model includes the mold's CAD 3D model file, solid geometry data, surface geometry data, topological connection relationships, cavity and core structure data, parting surface data, insert structure data, inclined ejector and slider structure data, cooling water channel structure data, gating system structure data, venting structure data, reference coordinate system data, machining coordinate system data, and model features. The data includes identification data and product forming surface data; material parameters include material grade, material category, hardness, heat treatment state, tensile strength, yield strength, thermal conductivity, material toughness, material machinability grade, recommended cutting speed range, recommended feed range, recommended depth of cut range, and tool wear sensitive parameters; blank parameters include blank type, blank dimensions, blank coordinate position, blank initial model, blank weight, blank material state, blank allowance distribution, blank positioning datum, blank clamping datum, blank pre-machining state, and the spatial correspondence between the blank and the target mold model; machining allowance data includes: overall machining allowance, area machining allowance, roughing allowance, semi-finishing allowance, finishing allowance, curved surface allowance, hole and groove allowance, corner clearing allowance, residual material allowance, step allowance, protective surface allowance, and allowance transfer data between different processes. Post-processor data includes, but is not limited to: post-processor type, compatible machine tool model, compatible CNC system type, coordinate system output rules, tool compensation output rules, tool change command format, spindle command format, cooling command format, feed command format, circular interpolation output rules, multi-axis linkage output rules, tool axis vector conversion rules, rotary axis angle limitation rules, program header format, program tail format, and alarm or safety command output rules. Process rule data includes: roughing rules, semi-finishing rules, finishing rules, corner clearing rules, hole machining rules, groove machining rules, curved surface machining rules, steep surface machining rules, flat surface machining rules, tool selection rules, machining sequence rules, cutting parameter selection rules, tool approach / retract rules, safety height rules, obstacle avoidance rules, tool change rules, allowance retention rules, surface quality control rules, and machining anomaly handling rules.Historical machining programs include at least one of the following: historical NC programs, historical CAM project files, historical process files, historical post-processing programs, historical coordinate system settings, historical tool change commands, historical tool compensation commands, historical spindle commands, historical feed commands, and historical program execution results; historical toolpath strategies include at least one of the following: historical roughing toolpath strategies, historical semi-finishing toolpath strategies, historical finishing toolpath strategies, contour machining strategies, parallel machining strategies, surround machining strategies, corner clearing machining strategies, residual material machining strategies, hole and groove machining strategies, tool approach and retraction strategies, obstacle avoidance strategies, and tool axis control strategies; historical machining parameters include historical spindle speed, historical feed rate, historical cutting speed, historical depth of cut, historical width of cut, historical step distance, historical layer depth, and historical safety height. The data includes at least one of the following: historical allowance settings, historical tool compensation values, historical cooling methods, historical machining time, and historical machining load data; machining quality inspection results include at least one of the following: coordinate measuring machine (CMM) inspection data, scanning inspection data, dimensional deviation data, geometrical error data, surface roughness inspection data, overcut detection results, undercut detection results, residual material detection results, contour error data, surface deviation data, pass / fail judgment results, non-conforming area identification, and rework records; actual machining feedback data includes at least one of the following: machine tool operation log, spindle load data, feed load data, vibration data, temperature data, tool wear feedback, tool breakage record, alarm record, collision record, manual intervention record, program modification record, actual machining time, machining anomaly record, and rework / repair feedback.
[0035] S2, using an AI recognition model to identify mold design data, obtain mold processing feature information of the target mold; among which, mold processing feature information includes structural features, geometric processing features, process constraint features, and processing safety features; Figure 2 This is a flowchart of a method for generating mold processing feature information of a target mold according to an embodiment of the present invention, referred to... Figure 2 The method for generating mold processing feature information includes the following processes:
[0036] S21, standardize the mold design data.
[0037] Specifically, the 3D model of the target mold is converted into a boundary representation model or a mesh model, and the faces, edges, vertices and topological relationships between faces that constitute the mold are extracted. For each face, geometric parameters such as face type, area, normal vector, principal curvature, rate of curvature change, boundary contour, angle between adjacent faces, concavity and convexity attributes, thickness and position coordinates are obtained. For each edge, edge type, length, curvature, connection surface relationship and boundary attributes are obtained.
[0038] The system analyzes the dimension annotations, tolerance annotations, geometric tolerance annotations, surface roughness annotations, material annotations, heat treatment annotations, datum annotations, and machining instructions in two-dimensional engineering drawings. Based on the view projection relationship, datum coordinate relationship, and annotation pointing relationship, the annotation information in the two-dimensional engineering drawings is mapped to the corresponding faces, edges, holes, slots, or regions in the three-dimensional model.
[0039] The material parameters, blank parameters, and machining allowance data are converted into process attribute vectors. The process attribute vectors should include at least the material category, material hardness, blank dimensions, blank boundary, reserved allowance, local allowance variation range, and target surface quality requirements.
[0040] S22, using the three-dimensional geometric recognition branch to generate an initial mold processing feature candidate set.
[0041] A geometric topology graph is constructed using faces, edges, and their topological relationships in a 3D model. Faces are used as graph nodes, and the adjacency relationships between faces are used as graph edges. Face type, curvature, normal vector, area, concavity / convexity properties, boundary shape, and the angle between adjacent faces are used as node features and edge features, which are then input into a graph neural network or a 3D deep learning network to output an initial set of candidate features for mold processing.
[0042] Each candidate feature in the initial mold processing feature candidate set includes at least: feature category, corresponding face set or region set, feature boundary, main processing direction, candidate processing method, and initial recognition probability.
[0043] The feature categories include at least the cavity, core, parting surface, planar machining area, sidewall machining area, deep cavity machining area, hole structure, groove structure, narrow slot structure, freeform surface machining area, thin-walled area, sharp corner area, residual material sensitive area, and tool avoidance area.
[0044] The 3D geometric recognition branch employs a graph attention network to identify the geometric topology graph. The graph uses model faces as nodes and common edges between adjacent faces as edges. Node features include face type encoding, area normalization, normal vector, principal curvature, rate of change of curvature, concavity / convexity attributes, boundary contour encoding, and spatial coordinates. Edge features include the angle between adjacent faces, length of the common edge, edge type, and concavity / convexity transition type. The network consists of an input layer, two graph attention feature extraction layers, a feature fusion layer, and a classification output layer. It outputs the processing feature category and recognition probability of each node and merges adjacent nodes according to a probability threshold to form a processing feature candidate set. Model training samples are derived from historical mold 3D models and corresponding CAM process files. The processing face set, feature category, and processing method are manually labeled. Cross-entropy loss is used during training, and the training, validation, and test sets are divided in an 8:1:1 ratio. When the recognition probability falls below a preset threshold, the candidate features are transferred to 2D engineering icon annotation and process attribute rules for verification.
[0045] S23, semantic supplementation of the initial mold processing feature candidate set is performed by using the two-dimensional engineering drawing recognition branch and the process attribute recognition branch.
[0046] By associating the dimensions, tolerances, roughness, materials, heat treatment, datum, and machining instructions in the two-dimensional engineering drawings with the corresponding three-dimensional machining features, the process requirements information for each machining feature can be obtained.
[0047] For the same machining feature, combining the 3D model recognition results, 2D engineering drawing annotation results, and process attribute vectors, the structural features, geometric machining features, process constraint features, and machining safety features of the machining feature are determined. Structural features include at least cavities, cores, parting surfaces, insert areas, slider areas, inclined top areas, and thin-walled areas; geometric machining features include at least planes, curved surfaces, holes, slots, deep cavities, narrow slits, chamfers, fillets, steep walls, and transition surfaces; process constraint features include at least dimensional accuracy requirements, geometric tolerance requirements, surface roughness requirements, machining allowance requirements, material cutting characteristics requirements, datum relationships, and preset machining stages; machining safety features include at least the tool-accessible restricted area, fixture adjacent area, machine tool posture restricted area, thin-walled deformation risk area, overcut sensitive area, residual material abrupt change area, and protective boundary area. The tool-accessible restricted area refers to the area where the candidate tool or candidate machining posture cannot enter or fully machine due to the feature entry width, minimum fillet radius, machining depth, tool diameter, effective cutting edge length, extension length, or tool holder sweep space not meeting the machining requirements. The fixture proximity area refers to the area where the distance between the area to be machined, the tool path, or the tool sweep body and the fixture body, clamping plate, vise, locating block, or clamping boundary is less than a preset safety distance. The machine tool posture-restricted area refers to the area where the required tool axis direction, linear axis travel, rotary axis angle, or multi-axis linkage posture for machining this area is close to or exceeds the machine tool's allowable range. The thin-wall deformation risk area refers to the area where the wall thickness is less than a preset thickness threshold, or the height-to-thickness ratio or overhang length is large, making it prone to elastic deformation, vibration, or dimensional deviation under cutting forces. The overcut sensitive area refers to the area adjacent to the product's forming surface, protective surface, sharp corners, small fillets, curved surface transition boundaries, or high-precision contours, where toolpath errors, tool compensation errors, or posture deviations can easily cause excessive material removal. The residual material abrupt change area refers to the area where the thickness, width, or height of the remaining material changes abruptly due to changes in the diameter of the preceding tool, the intersection of adjacent features, steps, corner clearing, or local allowance changes. Protected boundary areas refer to prohibited processing surfaces, reserved surfaces, safe height boundaries, non-processable surface boundaries, and areas that need to be avoided, as determined by two-dimensional annotations, three-dimensional models, or process rules.
[0048] S24, perform process adaptation calculations for each processing feature based on processing resource data.
[0049] For each candidate tool-machining posture combination, a hard constraint gating judgment is first performed. Hard constraints include matching of entry size and minimum fillet radius, matching of effective cutting length and extension length, no intersection between the tool or tool holder sweep body and the mold entity, no intersection with the fixture entity and clamping boundary, no exceedance of machine tool travel and rotation axis angle, and mandatory process rules satisfaction. If any hard constraint is not satisfied, the combination is directly determined to be unusable, and its tool accessibility coefficient and resource adaptation coefficient are both set to 0, and it does not participate in weighted scoring and maximum value selection; only for combinations that satisfy all hard constraints, the weighted scores of tool accessibility, fixture interference safety, and process rule compliance are calculated. If no usable combination exists, the resource adaptation coefficient of the corresponding machining feature is 0, and it is marked as a restricted machining feature.
[0050] For each machining feature, the tool accessibility coefficient, fixture interference safety coefficient, and process rule compliance coefficient are calculated respectively, and the resource adaptation coefficient is obtained based on each coefficient.
[0051] The calculation process for the tool accessibility coefficient is as follows:
[0052] For the Each machining feature is targeted at candidate tools. and candidate processing posture Calculate the three parameters respectively:
[0053] Inlet geometry matching parameters, inlet geometry matching parameters Used to determine whether the tool can enter the machining feature and whether it fits the minimum fillet area:
[0054]
[0055] in, This indicates the feature opening size, representing the minimum effective width that the tool is allowed to pass through at the entrance of the target machining feature when it enters along the candidate machining direction. Indicates the diameter of the cutting tool. Indicates the minimum fillet radius of the feature. Indicates the effective machining radius of the cutting tool. , For width safety margin, , These are the normalized parameters. This represents the truncation normalization function, which outputs 0 when the input value is less than or equal to 0, 1 when the input value is greater than or equal to 1, and the input value itself when the input value is greater than 0 and less than 1. The larger the value, the easier it is for the cutting tool to enter the machining area, and the more suitable it is for machining the rounded corners or narrow areas of that feature.
[0056] Axial probe matching parameters, axial probe matching parameters Used to determine whether the effective cutting length and overhang length of the tool meet the feature depth requirements:
[0057]
[0058] in, Indicates the effective cutting length of the tool. Indicates the length of the tool extension. Indicates feature depth, For deep security margin, This is a normalization parameter. The smaller value between the effective cutting length and the extension length is chosen here to avoid situations where "the tool can extend but the effective cutting length is insufficient" or "the effective cutting length is sufficient but the extension length is insufficient".
[0059] Sweep Interference Security Parameters Used to determine whether the cutting tool, tool holder, or clamping part will interfere with the mold body during the cutting and machining process:
[0060]
[0061] in, This represents the minimum clearance between the tool sweep body formed by the candidate tool in the candidate machining posture and the mold body. To allow for interference with safety margins, These are normalized parameters. The tool sweep body includes the tool cutting section sweep body and the tool holder sweep body generated based on the tool holder size and tool extension length.
[0062] The tool reachability coefficient is obtained by fusion:
[0063]
[0064] in, , , Let the weights be , and: ;when , or When any parameter is 0, it indicates that the candidate tool is unreachable under the candidate machining posture. The process iterates through all candidate tools and candidate machining postures, taking the maximum value as the [value]. Tool accessibility coefficient for each machining feature:
[0065]
[0066] The fixture interference safety factor is determined based on the minimum distance between the fixture entity model, fixture clamping boundary, tool sweep body, and the area to be machined. The fixture entity model, fixture clamping boundary, area to be machined, and tool sweep body are unified under the same workpiece coordinate system. The spatial relationship between the tool sweep body and the fixture entity, clamping boundary, and protective boundary of the area to be machined is detected position by position along the candidate tool path. If an intersection exists, the fixture interference safety factor is set to zero; if no intersection exists, the minimum clearance throughout the process is extracted and compared with a preset safety clearance. When the minimum clearance is greater than or equal to the preset safety clearance, it is determined to be a high safety factor; when the minimum clearance is less than the preset safety clearance but has not yet intersected, it is determined to be a low safety factor, and the corresponding tool position point, fixture component, and risk area are recorded. For example, to ensure the accuracy of process adaptation, the high safety factor can be set to 0.9, and the low safety factor to 0.4.
[0067] The process rule compliance coefficient is determined based on material type, tool material, tool diameter, depth of cut, step distance, machining allowance, surface roughness requirements, and preset process rules. The corresponding preset process rule table is retrieved based on the material type. This table includes applicable tool materials, recommended tool diameter ranges, allowable depth of cut ranges, allowable step distance ranges, machining allowance ranges, and machining requirements corresponding to surface roughness. Each candidate process parameter is compared with the preset process rule table. If the tool material is unsuitable, or the depth of cut or step distance exceeds the mandatory limits, the process rule compliance coefficient is set to 0. If all parameters are within the recommended range, a high compliance coefficient is determined. If some parameters exceed the recommended range but are still within the allowable range, a medium compliance coefficient is determined. If multiple parameters are close to the allowable range boundary, a low compliance coefficient is determined, and the process parameters requiring adjustment are marked. The high compliance coefficient is set to 0.9, the medium compliance coefficient is preferably set to 0.65, and the low compliance coefficient is preferably set to 0.3.
[0068] The resource adaptation coefficient is obtained based on each coefficient:
[0069]
[0070] in, Indicates the first Resource matching coefficient for each processing feature; Indicates the tool reachability coefficient; Indicates the safety factor for fixture interference; Indicates the coefficient for compliance with process rules; to For preset weights, and to The sum is 1.
[0071] When the resource adaptation coefficient is lower than a preset threshold, the corresponding geometric feature is not deleted. Instead, it is marked as a restricted machining feature, and corresponding machining safety features or process constraint features are added. For example, when a deep cavity structure is geometrically identified as a normal cavity, but the effective cutting length of the tool is insufficient to cover the cavity depth, the normal cavity is corrected to a deep cavity restricted machining feature, and process constraint information such as "limited length-to-diameter ratio," "requires longer tool," or "requires layered machining" is added. When the resource adaptation coefficient is greater than or equal to the preset threshold, the machining feature is used as machining feature information.
[0072] S3, based on the mold processing feature information, associates the processing area, surface to be processed, hole and groove structure, curved surface boundary, and allowance area in the target mold with the tool, fixture, machine tool posture, post-processor and process rules in the processing resource data, and combines the historical toolpath strategy, historical processing parameters, processing quality inspection results and actual processing feedback data in the historical processing case data to construct a mold processing feature semantic map;
[0073] The three-dimensional model, process model and machining coordinate system of the target mold are uniformly processed. Feature nodes are established for the machining area, the surface to be machined, the hole and groove structure, the curved surface boundary and the allowance area. For each feature node, its spatial position, normal direction, depth, width, curvature, open state, machining accuracy, surface roughness and remaining material distribution are recorded.
[0074] The machining resource data is structured and divided into tool nodes, fixture nodes, machine tool posture nodes, post-processor nodes, and process rule nodes. The tool node records the tool type, diameter, cutting edge length, extension length, and applicable materials; the fixture node records the clamping area, avoidance area, and clamping boundary; the machine tool posture node records the reachable direction, rotation range, and travel limit; the post-processor node records the types of machine tool commands that can be output and coordinate transformation rules; and the process rule node records the recommended cutting parameter ranges for different materials and machining accuracies.
[0075] Semantic associations between features and resources are established based on the geometric and technological attributes of machining characteristics. For example, deep holes and narrow grooves are associated with cutting tools that meet diameter, cutting length, and rigidity requirements; curved surface boundaries are associated with ball end mills, nose end mills, and their corresponding machine tool postures; allowance areas are associated with roughing, semi-finishing, or end-cleaning toolpath strategies; and machining areas near fixture clamping boundaries are associated with fixture avoidance relationships and safety distance requirements. For resources that do not meet accessibility requirements, pose interference risks, or do not conform to technological rules, usability associations are not established, or risk associations are established.
[0076] Then, retrieve cases from historical machining case data that are similar to the current machining feature in terms of material, geometry, size range, accuracy requirements, surface roughness requirements, and clamping methods. Add historical toolpath strategies, historical machining parameters, machining quality inspection results, and actual machining feedback data as case nodes to the semantic graph. If a certain tool, posture, or parameter combination in a historical case achieves acceptable machining quality, enhance its recommendation association with the current feature; if oscillation, overcutting, undercutting, fixture interference, surface tool marks, or dimensional deviations occur in a historical case, the corresponding problems are reverse-associated with related features, tools, postures, or process parameters to form a risk warning relationship.
[0077] By connecting the processing feature nodes, processing resource nodes, historical case nodes, quality result nodes, and feedback risk nodes, a semantic graph of mold processing features is formed. The relationships in the semantic graph include at least the following: "processable", "recommended use", "risk exists", "should be avoided", "parameters are applicable", "historical success", and "historical failure".
[0078] S4, using the target machining feature to be generated in the CNC program as the seed node, performs a limited-depth traversal of the mold machining feature semantic map along geometric adjacency relationships, machining sequence relationships, allowance transfer relationships, tool reachability relationships, fixture interference relationships, and protective boundary constraint relationships; among them, tool reachability relationships, fixture interference relationships, machine tool motion boundaries, and machining safety boundaries are determined at least based on machining resource data, and are trimmed in conjunction with blank boundaries, clamping boundaries, machine tool motion boundaries, and machining safety boundaries to generate the machining influence domain corresponding to the target machining feature:
[0079] The process involves parsing the target machining features and standardizing the traversal parameters. The target machining features to be generated in the CNC program are structurally decomposed, identifying their respective machining areas, surface types, hole / groove structures, surface boundaries, allowance distribution, machining accuracy, surface roughness requirements, and corresponding machining coordinate systems. This information is then mapped to seed node attributes in the mold machining feature semantic graph. Simultaneously, the types of relationships that can participate in the traversal are standardized and encoded. These relationships must include at least geometric adjacency, machining sequence, allowance transfer, tool reachability, fixture interference, and protective boundary constraints, ensuring that subsequent traversals only revolve around nodes that have an actual machining impact on the target machining features.
[0080] The machining resource constraint extraction process extracts tool diameter, cutting edge length, extension length, tool material, fixture clamping boundaries, fixture avoidance areas, machine tool linear axis travel, rotary axis angle range, machine tool posture reachability range, post-processor supported motion forms, and preset process rules from the machining resource data. Based on this, the tool reachability relationship, fixture interference relationship, machine tool motion boundary, and machining safety boundary are determined. Specifically, the tool reachability relationship is used to determine whether the candidate tool and its corresponding posture can reach the target machining feature; the fixture interference relationship is used to determine whether the tool sweep area, tool holder area, or machine tool head enters the fixture avoidance area; the machine tool motion boundary is used to determine whether the candidate posture and motion trajectory exceed the machine tool travel or rotation angle range; and the machining safety boundary is used to limit the safety height, transition area, prohibited machining surface, and protective surface.
[0081] The process involves determining seed nodes and setting depth limits. The corresponding node in the mold machining feature semantic graph representing the target machining feature is used as the seed node, and different upper limits for traversable levels are set based on different relationship types. Preferably, geometric adjacency relationships traverse to machining surfaces directly adjacent to or secondarily adjacent to the target machining feature; machining sequence relationships traverse to preceding and succeeding machining features that affect the current machining allowance or clamping state; allowance transfer relationships traverse to upstream features that generate residual allowance or require clearing in the current machining area; tool reachability relationships, fixture interference relationships, and protective boundary constraint relationships primarily focus on resource nodes and risk nodes that directly affect the current target machining feature, preventing further diffusion to unrelated resources. This depth limit setting avoids including distant features, unrelated tools, or unrelated clamping information that have no machining impact on the target machining feature within the influence domain.
[0082] A depth-limited traversal process is performed along multiple types of relationships. Starting from the seed node in the mold machining feature semantic graph, the traversal proceeds sequentially along geometric adjacency, machining sequence, allowance transfer, tool reachability, fixture interference, and protective boundary constraints according to preset relationship priorities. This process identifies nodes and their associated edges that are spatially adjacent to the target machining feature, have process associations, allowance inheritance, tool adaptation, posture constraints, fixture avoidance, or protective boundary constraints. During the traversal, the source, propagation level, resource constraint type, and risk identifier of the relationship between each node and the seed node are recorded. When a relationship edge is encountered that does not satisfy tool reachability, has fixture interference, exceeds the machine tool motion boundary, or violates the machining safety boundary, the traversal stops along that relationship direction, and the corresponding node is marked as a restricted node or a risk node.
[0083] The process involves generating a candidate impact set, which comprises the obtained machining feature nodes, tool nodes, fixture nodes, machine tool posture nodes, process rule nodes, historical toolpath strategy nodes, historical machining parameter nodes, and quality feedback nodes. For historical case nodes that share the same material, similar geometry, similar allowance, or the same clamping method as the target machining feature, if their corresponding machining quality is acceptable, they are retained as a recommendation basis. If their corresponding feedback data shows issues such as tool vibration, overcutting, undercutting, fixture interference, surface tool marks, or dimensional deviations, they are retained as a risk basis, and a risk warning relationship is established between them and the current target machining feature.
[0084] The process involves boundary trimming and influence domain generation. Based on the blank boundary, clamping boundary, machine tool motion boundary, and machining safety boundary of the target mold, the candidate influence set is trimmed in multiple dimensions. Nodes and relationships that exceed the effective machining range of the blank are eliminated; toolpaths, postures, or machining surface relationships that fall into the fixture clamping area or fixture avoidance zone are eliminated or marked as unusable; posture relationships that exceed the machine tool axial travel, rotation angle range, or the motion form that the post-processor can output are eliminated; and relationships that cross protective surfaces, have insufficient safety height, or may damage non-machined surfaces are eliminated. During the trimming process, a traceable relationship link between nodes and seed nodes is preserved for subsequent toolpath strategy selection, process parameter recommendation, and risk verification.
[0085] After the above processing, the machining influence domain corresponding to the target machining feature is obtained. The machining influence domain includes the target machining feature itself, adjacent features that affect its machining sequence, the preceding machining area that affects the state of the remaining quantities, the tool and machine tool posture that can be used to machine the feature, the fixture area that needs to be avoided, the protection boundary that needs to be followed, and similar historical machining cases and quality feedback results. As a result, the subsequent CNC program generation no longer relies solely on toolpath matching based on a single geometric feature, but simultaneously considers geometric adjacency, process transfer, resource accessibility, fixture safety, and historical quality feedback, forming a machining influence domain that is well-defined, has controlled boundaries, and is traceable.
[0086] S5, calculate the complexity coefficient of the processing influence domain based on the processing influence domain;
[0087] The processing influence domain is formalized as a directed weighted graph. , where the set of nodes It should include at least processing feature nodes, processing resource nodes, processing constraint nodes, historical case nodes, and quality feedback nodes, and an edge set. For two nodes , The edge between A set of components.
[0088] Edge complexity centrality is defined as the average of the complexity centralities of the starting and ending nodes of an edge. It is used to characterize the basic contribution of a single associated edge to the complexity of the processing influence domain. The calculation formula is as follows:
[0089] ;in, For the edge The centrality of a node is used to represent the influence of importance between two connected nodes. , This represents a measure of node centrality; the larger the value, the greater the influence of the two nodes connected by the edge, and the stronger the contribution of this association to the overall complexity.
[0090] The steps to obtain the node centrality metric are as follows: Determine the number of edges between the node and other nodes in the directed weighted graph, and the set of edges in the directed weighted graph. The number of edges in the graph is the sum of the number of edges between the node and other nodes in the directed weighted graph. The ratio of the number of edges in a node is denoted as the node centrality measure.
[0091] To mitigate the computational bias caused by dense connections of highly central nodes and suppress the excessive amplification effect of densely associated regions, a logarithmic transformation is first performed on the complexity centrality of the edges. Then, through normalization mapping, hyperparameter tuning, and maximum value truncation, the complexity association probability of each edge is obtained:
[0092] Applying the natural logarithm transformation to the complexity centrality of each edge yields the initial value of the edge complexity:
[0093]
[0094] This is a very small positive value, used to avoid the logarithmic operation being meaningless when the edge centrality is 0. The logarithmic transformation can compress the numerical range of highly central edges, reducing the excessive influence of dense node associations on the overall computation. Initial values for the complexity of all edges in the entire graph are calculated, obtaining the maximum and average values, respectively... , express;
[0095] The complexity correlation probability of each edge is calculated through normalization mapping, overall probability control, and maximum value truncation: ;
[0096] in, This is a global probability control hyperparameter, with a value range of [value range missing]. This is used to control the overall complexity association probability level of the edges in the entire graph. It can be adjusted according to the evaluation granularity of the processing scenario, and the default value is 0.8. The upper limit threshold of probability satisfies This is used to limit the maximum complexity association probability of a single edge, preventing the contribution of a single edge from excessively dominating the overall result. The default value is 0.95.
[0097] The physical meaning of this probability: the lower the complexity centrality of an edge, the higher the corresponding... The smaller, The larger the value, the higher the probability of complexity association. The higher the value, the weaker the association, and the higher the uncertainty in the process influence domain. This means that the process uncertainty is higher and the contribution to deterministic complexity is lower. Conversely, strong associations and high-influence edges belong to explicit process constraints, have lower complexity association probabilities, and contribute more significantly to the overall complexity.
[0098] Calculate the average complexity of the association probability of all edges in the entire graph. ,in, For the set of edges The number of sides in;
[0099] Final processing influence domain complexity coefficient : ;
[0100] Complexity coefficient The range of values is A larger value indicates more strongly coupled constraints and closer relationships between elements within the processing influence domain, resulting in higher overall complexity of the processing influence domain; a smaller value indicates a higher proportion of weak relationships within the processing influence domain, resulting in simpler process constraints and coupling relationships.
[0101] S6, Calculate the executable risk value of the process based on the complexity coefficient of the process influence domain;
[0102] The complexity coefficient of the processing influence domain is compared with a preset complexity threshold;
[0103] The preset complexity threshold is a value between 0 and 1, preferably set to 0.6; when the target mold is a high-precision curved surface, deep cavity or multi-axis linkage machining scenario, the preset complexity threshold can be set to 0.5 to 0.6; when the target mold is a normal plane, open groove or rough machining scenario, the preset complexity threshold can be set to 0.6 to 0.7.
[0104] When the complexity coefficient of the processing influence domain is less than the preset complexity threshold, the first risk calculation method is used to calculate the executable risk value of the processing.
[0105] The first risk calculation method consists of resource adaptation risk sub-features, boundary security risk sub-features, and historical anomaly risk sub-features. It is suitable for situations where there are few correlations within the processing influence domain and the risk transmission path is short.
[0106] Resource adaptation risk sub-features Calculate using the following formula:
[0107]
[0108] in, Indicates the first [item] within the processing influence domain Resource matching coefficient for each processing feature; This indicates the number of processing features within the processing influence domain that participate in the current target processing feature processing decision. The larger the value, the lower the resource compatibility.
[0109] Sub-characteristics of border security risks Calculate using the following formula:
[0110]
[0111] in, Indicates the first The minimum distance between the tool sweep body, tool holder sweep body or machine tool head and the blank boundary, clamping boundary, machine tool motion boundary or machining safety boundary at each detection position. Indicates the preset safe distance; Indicates the number of detection locations. The larger the value, the closer the processing path is to the safety boundary.
[0112] Historical anomaly risk sub-features Calculate using the following formula:
[0113]
[0114] in, Indicates the first The similarity between a historical processing case and the current target processing feature in terms of material, geometry, size range, clamping method, and surface quality requirements is obtained through the following process: Standardization is performed on the material, geometry, size range, clamping method, and surface quality requirements dimensions to form five sub-feature vectors. The similarity of each sub-feature vector to the first is calculated. The cosine similarity between the sub-feature vectors corresponding to the current target processing feature and the historical processing case is denoted as the average cosine similarity among the sub-feature vectors. The similarity between historical processing cases and current target processing features in terms of materials, geometry, size range, clamping method, and surface quality requirements; This indicates an anomaly in the historical processing case. If there are records of oscillating blade, overcutting, undercutting, fixture interference, dimensional deviation, or rework, the value is 1; otherwise, the value is 0. This indicates the number of similar historical processing cases;
[0115] The executable risk value for processing using the first risk calculation method is:
[0116]
[0117] in, , and All are weighting coefficients. To ensure that the risk value of processing can be executed is implemented in a feasible way, for example, , , .
[0118] When the complexity coefficient of the processing influence domain is greater than or equal to a preset complexity threshold, the second risk calculation method is used to calculate the executable risk value of the processing. The second risk calculation method consists of resource conflict risk sub-features and historical anomaly propagation risk sub-features, and is suitable for situations where there are many nodes in the processing influence domain, the constraint relationships are strongly coupled, and the risk may be propagated along the relationship link.
[0119] Computational resource conflict risk sub-features :
[0120]
[0121] in, Indicates the first The node centrality measure of a machining feature node; when there is no available combination of resources that satisfies tool reachability, fixture safety, machine tool posture, and process rules for the machining feature. ,otherwise . The larger the value, the more severe the resource conflict at the high-influence node.
[0122] The risk sub-characteristics of historical anomalous propagation are calculated using the following formula:
[0123]
[0124] in, Indicates the first When there is a direct "historical failure - risk warning" relationship between historical anomaly case nodes and target processing feature seed nodes, the shortest propagation level from each historical anomaly case node to the target processing feature seed node is specified. When the value is 1, historical abnormal case nodes reach the target processing feature through historical processing features and then through feature similarity relationships. The value is 2. When a historical anomaly node reaches the target machining feature via a historical tool node and the current candidate tool node, The value is 3. When a historical anomaly node reaches the target processing feature via historical processing parameter nodes, current process parameter nodes, previous processing features, and allowance transfer relationships, The value is 4. The larger the value, the more significant the impact of similar historical anomalies on the current processing task.
[0125] The executable risk value for the second risk calculation method is:
[0126]
[0127] in, This represents the complexity coefficient of the processing influence domain. , These are the weighting coefficients. Considering that the impact of the historical anomaly propagation risk sub-feature is greater than that of the resource conflict risk sub-feature, Set to 0.4. Set to 0.6.
[0128] Using the above method, when the machining influence domain is relatively simple, a linear weighted approach is used to quickly calculate the risk; when the machining influence domain is more complex, a coupled risk calculation method considering node centrality, edge centrality, and anomaly propagation hierarchy is adopted. This differs from existing methods that rely solely on single tool parameters or fixed process rules to determine machinability. It can dynamically switch the risk calculation model according to the complexity of the machining influence domain, improving the accuracy of risk assessment before CNC program generation.
[0129] S7, Generate process constraint intersection strategy based on process executable risk value;
[0130] In one specific implementation, after obtaining the executable risk value of the target machining feature, the target machining feature is divided into low-risk, medium-risk, and high-risk machining features according to a preset risk level. Low-risk machining features indicate that their tool accessibility, fixture safety, machine tool posture, material cutting parameters, and historical machining feedback all meet the conditions for directly generating a CNC program; medium-risk machining features indicate that they have local boundary proximity, parameters deviating from the recommended range, or slight abnormal feedback in historical cases; high-risk machining features indicate that they have limited tool accessibility, fixture interference risk, limited machine tool motion boundaries, sudden changes in machining allowance, or risk of historical anomaly propagation.
[0131] A candidate process set is established for the target machining features. This set includes AI-recommended processes, mold machining rules, machine tool capability constraints, tool and fixture constraints, material cutting parameter constraints, machining allowance constraints, surface quality requirements, safety boundary constraints, post-processing constraints, and historical qualified process constraints. Specifically, the AI-recommended processes are generated by the AI recognition model based on the type, geometry, machining stage, and similar historical cases of the target machining features; mold machining rules are provided by preset process rule data; machine tool capability constraints, tool and fixture constraints, and post-processing constraints are derived from machining resource data; and historical qualified process constraints are derived from machining cases in historical machining case data that have passed quality inspection and have no abnormal feedback.
[0132] Constraint standardization is performed to convert process constraints from different sources into comparable constraint items. These constraint items include at least the available machine tools, available coordinate systems, available machining postures, available tool types, tool diameter range, cutting edge length range, overhang length range, fixture clearance range, spindle speed range, feed rate range, depth of cut range, cutting width range, stepover range, allowance retention range, safety height, tool approach / retract method, toolpath strategy, tool change rules, tool compensation method, and post-processing output format.
[0133] Perform process constraint intersection calculation. For hard constraints, such as machine tool travel, rotary axis angle, fixture avoidance area, protective surface, safety boundary, tool accessibility, and post-processor supported instruction format, an intersection rule that must be satisfied simultaneously is applied; if any candidate process does not meet the above hard constraints, it is removed from the candidate set. For recommended constraints, such as recommended cutting speed, recommended feed rate, recommended stepover, recommended toolpath strategy, and historical optimization parameters, tightening or relaxing them within the intersection range according to the machining executability risk value.
[0134] When the machining executable risk value is low, a more efficient process combination can be selected within the parameter range jointly covered by mold machining rules, AI recommended processes, and historical qualified processes. When the machining executable risk value is in the medium range, tools, parameters, and toolpath strategies that have been verified and stabilized in historical qualified cases are given priority, and the safety height is increased and the cutting depth or step distance is reduced. When the machining executable risk value is high, only conservative process combinations that simultaneously meet the constraints of machine tool capability, tool and fixture safety, material cutting limits, machining allowance limits, surface quality requirements, and historical qualified processes are retained, and target machining features that cannot form an effective intersection are marked as requiring manual review or adjustment of clamping, tool changing, or step-by-step machining.
[0135] The retained process combinations generate a process constraint intersection strategy. This strategy includes at least the target machining feature number, machining stage, allowed machining area, prohibited machining area, recommended tools, spare tools, available machine tool orientation, recommended toolpath type, cutting parameter range, allowance retention rules, tool approach / retraction rules, safety avoidance rules, post-processing output rules, and historical qualified process references. Therefore, the AI recommendation results cannot directly cover the actual machining constraints; they must undergo intersection verification with machining resources, mold rules, safety boundaries, and historical qualified experience before entering the subsequent CNC program generation process.
[0136] In one specific implementation, after obtaining the process constraint intersection strategy, the processing task decomposition process is first performed. Based on the processing stage, allowance status, spatial adjacency, processing sequence, and protective boundary of each processing feature in the target mold, the processing tasks of the target mold are divided into roughing tasks, semi-finishing tasks, finishing tasks, corner clearing tasks, residual material processing tasks, hole and groove processing tasks, and local finishing tasks. For processing features with allowance transfer relationships, roughing areas for removing large allowances are prioritized, followed by semi-finishing and finishing areas requiring high precision and surface quality. For deep cavities, narrow grooves, thin walls, sharp corners, and areas adjacent to protective surfaces, independent processing tasks are set according to the safety rules determined in the process constraint intersection strategy.
[0137] Then, the machining sequence generation process is executed. Based on the mold machining rules, historical qualified process sequences, and the machining sequence relationships in the current machining influence domain, the execution order of each machining task is determined. Preferably, the initial machining sequence is generated according to the following principles: reference surface first, then cavity and core; roughing first, then finishing; large tool first, then small tool; open area first, then restricted area; stable area first, then thin-walled area; main machining surface first, then corner clearing and residual material area. If there is a risk of fixture interference or machine tool posture restriction in the machining influence domain, the machining sequence is automatically adjusted so that machining tasks requiring special postures or special tools are executed in a concentrated manner, thereby reducing repeated tool changes and repeated turntable movements.
[0138] Next, toolpath generation is performed. For each machining task, a corresponding toolpath is automatically generated based on the toolpath type and machining boundary in the process constraint intersection strategy. For roughing areas, layered, wraparound, equidistant, or adaptive clearing paths are prioritized; for curved surface finishing areas, contour, parallel, wraparound, or projected toolpaths are generated; for hole and slot structures, drilling, reaming, milling, or helical entry toolpaths are generated; for residual material and corner clearing areas, the corner clearing range is automatically limited based on the residual allowance of the preceding tool. When generating the toolpath, the system simultaneously calls the safety boundary, fixture avoidance area, blank boundary, and protective surface information to check the tool position point, tool axis direction, tool approach and retraction segments, and cross-region movement segments to prevent the tool, tool holder, or machine head from entering prohibited areas.
[0139] Subsequently, cutting parameters and auxiliary motion generation are performed. Within the parameter range given by the process constraint intersection strategy, the spindle speed, feed rate, depth of cut, width of cut, stepover, depth of layer, cooling method, and safety height are determined based on material type, tool diameter, tool material, machining stage, allowance size, and surface quality requirements. For medium- to high-risk machining features, the system automatically adopts smaller depth of cut, smaller stepover, lower feed rate, or adds intermediate tool retraction checkpoints to reduce risk. For tool changes, tool change instructions are generated based on tool number, tool length compensation, tool radius compensation, and machine tool magazine information. For tasks with different machining coordinate systems or different clamping directions, coordinate system selection instructions and necessary coordinate transformation instructions are generated.
[0140] Finally, post-processing and verification are performed. The toolpath, tool position point, tool axis vector, cutting parameters, tool approach / retract motion, tool change motion, coordinate system information, and tool compensation information are input into a post-processor matched to the target machine tool. The post-processor generates the post-processed CNC program for the target mold according to its program header format, program tail format, coordinate system output rules, tool compensation output rules, tool change command format, spindle command format, feed command format, circular interpolation rules, and multi-axis linkage output rules. After generation, the CNC program undergoes machine tool travel verification, rotary axis angle verification, coordinate system consistency verification, tool compensation consistency verification, tool approach / retract motion safety verification, and fixture interference verification. When verification passes, an executable CNC program is output; when verification fails, the process backtracks to the corresponding process constraint intersection strategy, reselecting the tool, attitude, toolpath, or cutting parameters until a post-processed CNC program that satisfies machining resource constraints and safety boundary constraints is generated.
[0141] This invention also provides an AI-based automatic generation system for CNC programs of molds. Figure 3 This is a block diagram of an AI-based automatic mold CNC program generation system according to an embodiment of the present invention, such as... Figure 3 As shown, the system includes:
[0142] The data acquisition unit is used to acquire mold design data, processing resource data, and historical processing case data of the target mold;
[0143] The feature recognition unit is used to standardize the mold design data, converting the 3D model topology, 2D engineering annotations, and material, blank, and allowance information into identifiable geometric information and process attributes; it uses the 3D geometric recognition branch of the AI recognition model to generate a candidate set of processing features, and supplements its structural features, geometric processing features, process constraint features, and processing safety features through the 2D engineering drawing recognition branch and the process attribute recognition branch.
[0144] The feature semantic graph construction unit is used to determine tool reachability, fixture interference, and process rule adaptation based on machining resource data to obtain mold machining feature information; and to construct a mold machining feature semantic graph by combining the mold machining feature information, machining resource data, and historical machining case data.
[0145] The CNC program generation unit is used to traverse the semantic graph according to multiple types of machining relationships with the target machining features as seed nodes and generate a machining influence domain through boundary trimming; determine the machining executable risk based on the machining influence domain, and generate a process constraint intersection strategy accordingly; and generate tool paths, auxiliary actions, and CNC programs verified by post-processing based on the process constraint intersection strategy.
Claims
1. A method for automatically generating CNC programs for molds based on AI recognition, characterized in that the method... include: Obtain mold design data, processing resource data, and historical processing case data for the target mold; Standardize the mold design data by converting the 3D model topology, 2D engineering annotations, and material, blank, and allowance information into identifiable geometric information and process attributes. The three-dimensional geometric recognition branch of the AI recognition model is used to generate a candidate set of processing features, and the structural features, geometric processing features, process constraint features and processing safety features are supplemented by the two-dimensional engineering drawing recognition branch and the process attribute recognition branch. Based on machining resource data, tool reachability, fixture interference, and process rule adaptation are determined for machining features to obtain mold machining feature information; the mold machining feature information, machining resource data, and historical machining case data are used to construct a mold machining feature semantic graph. Using the target machining features as seed nodes, the semantic graph is traversed according to multiple machining relationships and boundary trimming to generate a machining influence domain; the machining executable risk is determined based on the machining influence domain, and a process constraint intersection strategy is generated accordingly; based on the process constraint intersection strategy, tool paths, auxiliary actions, and CNC programs verified by post-processing are generated.
2. The method for automatically generating CNC programs for molds based on AI recognition according to claim 1, characterized in that, Standardizing mold design data includes: converting the 3D model of the target mold into a unified geometric expression, extracting faces, edges, vertices and topological connections; parsing the dimensions, tolerances, roughness, materials, heat treatment, datum and machining instructions in the 2D engineering drawings, and mapping them to the corresponding machining objects in the 3D model according to the view projection relationship, datum relationship and annotation pointing relationship; converting material parameters, blank parameters and machining allowance data into process attribute vectors.
3. The method for automatically generating CNC programs for molds based on AI recognition according to claim 1, characterized in that, The process for determining tool reachability, fixture interference, and process rule adaptation based on machining resource data includes: generating candidate tool and candidate machining posture combinations for each machining feature; determining tool reachability based on entry geometry matching, axial penetration matching, and sweep interference relationships; determining fixture interference based on fixture entity, clamping boundary, protection boundary, and tool sweep area; determining process rule compliance based on material, tool, allowance, surface requirements, and preset process rules; marking machining features that do not meet the adaptation conditions as restricted machining features, and adding corresponding process constraint features or machining safety features.
4. The method for automatically generating CNC programs for molds based on AI recognition according to claim 1, characterized in that, Constructing a semantic graph of mold processing features includes: establishing processing feature nodes for processing areas, surfaces to be processed, hole and groove structures, curved surface boundaries, and allowance areas; establishing processing resource nodes for cutting tools, fixtures, machine tool postures, post-processors, and process rules; establishing historical case nodes, quality result nodes, and feedback risk nodes for historical toolpath strategies, historical processing parameters, quality inspection results, and actual processing feedback; and establishing semantic association edges based on processing attributes, resource adaptation status, and similarity relationships of historical cases.
5. The method for automatically generating CNC programs for molds based on AI recognition according to claim 4, characterized in that, The generation of the machining influence domain includes: parsing the target machining features of the CNC program to be generated into seed nodes in the mold machining feature semantic graph, and mapping the machining area, surface type, hole and groove structure, surface boundary, allowance distribution, machining accuracy, surface requirements, and machining coordinate system of the target machining features into seed node attributes; typifying the relation types that can participate in the traversal, including geometric adjacency relations, machining sequence relations, allowance transfer relations, tool reachability relations, fixture interference relations, and protective boundary constraint relations; and extracting tool reachability constraints, fixture avoidance constraints, machine tool motion constraints, post-processing support constraints, and machining safety constraints from the machining resource data to determine the resource constraint boundaries required for traversal.
6. The method for automatically generating CNC programs for molds based on AI recognition according to claim 5, characterized in that, The generation of the machining influence domain also includes: starting from the seed node, performing a limited traversal in the mold machining feature semantic graph according to the relationship type to obtain nodes and relationship edges that are spatially adjacent to the target machining feature, process-related, allowance-inherited, resource-adapted, posture-constrained, fixture-avoided, or protected by boundary constraints; when the traversal reaches a relationship edge that is unreachable by the tool, interferes with the fixture, causes the machine tool to move out of bounds, or does not meet the machining safety boundary, the expansion along the relationship direction is stopped and the restricted node or risk node is marked; the traversed machining feature nodes, machining resource nodes, process rule nodes, historical toolpath strategy nodes, historical machining parameter nodes, and quality feedback nodes are combined into a candidate influence set, and the candidate influence set is trimmed based on the blank boundary, clamping boundary, machine tool movement boundary, and machining safety boundary, while retaining the traceable relationship links from each node in the candidate influence set to the seed node.
7. The method for automatically generating CNC programs for molds based on AI recognition according to claim 1, characterized in that, Determining the executable risk of processing based on the processing influence domain includes: converting the processing influence domain into a directed weighted graph containing processing feature nodes, processing resource nodes, processing constraint nodes, historical case nodes, and quality feedback nodes; determining the complexity of the processing influence domain based on the degree of node association, edge association, and the distribution of association strength; selecting different processing executable risk calculation methods according to the complexity of the processing influence domain; and calculating the processing executable risk based on the different processing executable risk calculation methods.
8. The method for automatically generating CNC programs for molds based on AI recognition according to claim 7, characterized in that, Different risk calculation methods include: when the complexity of the processing influence domain meets the first complexity condition, the processing executable risk is determined based on resource adaptation risk, boundary security risk, and historical anomaly risk; when the complexity of the processing influence domain meets the second complexity condition, the processing executable risk is determined based on resource conflict risk and historical anomaly propagation risk, wherein the historical anomaly propagation risk is determined based on the relationship propagation path from the historical anomaly case node to the target processing feature seed node.
9. The method for automatically generating CNC programs for molds based on AI recognition according to claim 1, characterized in that, The strategy for generating process constraint intersection includes: establishing a candidate process set for the target machining features, wherein the candidate process set includes AI recommended processes, mold machining rules, machine tool capability constraints, tool and fixture constraints, material cutting constraints, machining allowance constraints, surface quality constraints, safety boundary constraints, post-processing constraints, and historical qualified process constraints; converting constraints from different sources into comparable constraint items, using intersection retention rules for hard constraints, and screening recommended constraints according to machining feasibility risk.
10. An AI-based automatic mold CNC program generation system, characterized in that, The method for automatically generating CNC programs for molds based on AI recognition, applicable to any one of claims 1 to 9, comprises: The data acquisition unit is used to acquire mold design data, processing resource data, and historical processing case data of the target mold; The feature recognition unit is used to standardize the mold design data, converting the 3D model topology, 2D engineering annotations, and material, blank, and allowance information into identifiable geometric information and process attributes; it uses the 3D geometric recognition branch of the AI recognition model to generate a candidate set of processing features, and supplements its structural features, geometric processing features, process constraint features, and processing safety features through the 2D engineering drawing recognition branch and the process attribute recognition branch. The feature semantic graph construction unit is used to determine tool reachability, fixture interference, and process rule adaptation based on machining resource data to obtain mold machining feature information; and to construct a mold machining feature semantic graph by combining the mold machining feature information, machining resource data, and historical machining case data. The CNC program generation unit is used to traverse the semantic graph according to multiple types of machining relationships with the target machining features as seed nodes and generate a machining influence domain through boundary trimming; determine the machining executable risk based on the machining influence domain, and generate a process constraint intersection strategy accordingly; and generate tool paths, auxiliary actions, and CNC programs verified by post-processing based on the process constraint intersection strategy.