Mes system pipe and control method and system based on precision mold production and manufacturing
By acquiring the rigid body transformation and deviation analysis of the measured point cloud and theoretical model, an adaptive finishing program was constructed, which solved the problems of data lag and disconnection between processing status in the MES system, and realized real-time quality monitoring and adaptive processing in precision mold production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-10
AI Technical Summary
Existing MES systems rely on manual scanning and data entry in precision mold production, resulting in delayed information feedback, inability to monitor processing quality in real time, and a disconnect between the processing process and the actual state of the workpiece, making it impossible to adaptively adjust and easily leading to cutting errors and scrap.
By acquiring the rigid body transformation matrix of the measured point cloud coordinate data and the theoretical 3D design model data, the registered point cloud data is constructed, the geometric deviation is calculated and a 3D deviation vector is constructed, the risk of insufficient allowance is identified by combining the machining allowance and safety threshold, the CNC program is analyzed and the compensation distance is calculated, and an adaptive finishing program is generated.
It achieves precise matching between the CNC machining process and the physical state of the workpiece, avoiding the risk of overcutting due to insufficient allowance and ensuring machining quality.
Smart Images

Figure CN121541578B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of production process control, and in particular to a MES system management and control method and system based on precision mold production and manufacturing. BACKGROUND
[0002] The technical field of production process control relates to a technology category that utilizes automated equipment and computer systems to monitor, adjust and manage process parameters, material flow states and equipment operation data in industrial manufacturing links. Among them, the traditional MES system management and control method refers to that an operator reads the paper flow card bar code attached to the mold part by using a handheld barcode scanner, manually enters the current process start time and finished quantity through the terminal keyboard of the industrial control machine deployed on site, and the data is transmitted to the server relational database in the central computer room for storage through the wired local area network. The production management personnel generates an electronic scheduling report by calling the database record through a desktop computer, and distributes the printed paper dispatching sheet to the operation stations of each numerical control machining station.
[0003] The prior art relies on manual scanning and keyboard input to collect process data, and highly depends on manual intervention, which not only has the risk of input delay and record deviation, but also causes information feedback lag due to the process of data transmission to the background to generate a report. Based on the paper dispatching sheet, the fixed instructions are issued, which makes the machining process and the actual physical state of the workpiece disconnected, the control dimension is limited to the logistics progress and cannot perceive the part geometric precision or allowance state, lacks real-time monitoring mechanism for entity machining quality data, and causes the machine table to only blindly work according to the preset static program, cannot make adaptive adjustment according to the actual deformation or insufficient allowance of the workpiece, and is easy to cause cutting errors or generate waste products due to the mismatch between the machining instructions and the entity state. SUMMARY
[0004] The purpose of the present application is to solve the shortcomings in the prior art, and to provide a MES system management and control method and system based on precision mold production and manufacturing.
[0005] In order to achieve the above-mentioned purpose, the present application adopts the following technical scheme, a MES system management and control method based on precision mold production and manufacturing, comprising the following steps:
[0006] S1: Obtain measurement point cloud coordinate data and theoretical three-dimensional design model data, calculate the rigid body transformation matrix of the measurement point cloud coordinate data and the theoretical three-dimensional design model data, and generate registration point cloud data based on the rigid body transformation matrix registration of the measurement point cloud coordinate data;
[0007] S2: searching for the nearest projection point of the registration point cloud data on the surface of the theoretical three-dimensional design model data, measuring the geometric deviation value of the registration point cloud data from the nearest projection point along the normal, and constructing a three-dimensional deviation vector data by assigning a positive or negative sign to the geometric deviation value;
[0008] S3: obtaining a target machining allowance value and a minimum safety allowance threshold, calculating the difference between the geometric deviation value in the three-dimensional deviation vector data and the target machining allowance value to obtain an actual remaining material thickness, and screening the three-dimensional deviation vector data whose actual remaining material thickness is less than the minimum safety allowance threshold to generate insufficient allowance risk point data;
[0009] S4: analyzing the original numerical control machining program code to extract a coordinate instruction sequence, retrieving the insufficient allowance risk point data closest to the target position coordinates of the coordinate instruction sequence, calculating a compensation distance based on the actual remaining material thickness and a safety factor, and adjusting the target position coordinates to generate an adaptive finishing program code.
[0010] As a further scheme of the present application, the step S1 is specifically:
[0011] S11: using a high-precision three-dimensional laser scanner to perform multi-angle scanning on the mold surface to obtain complete measurement point cloud coordinate data, and simultaneously calling and extracting the theoretical three-dimensional design model data corresponding to the mold from a pre-set digital design archive;
[0012] S12: using principal component analysis to calculate the center of mass position and principal axis direction of the measurement point cloud coordinate data and the theoretical three-dimensional design model data, respectively, constructing an initial alignment transformation matrix by aligning the centers of mass and principal axes, and then optimizing the initial alignment transformation matrix using an iterative closest point algorithm to obtain the rigid body transformation matrix;
[0013] S13: applying the optimized rigid body transformation matrix to uniformly rotate and translate all data points in the measurement point cloud coordinate data to make them in the same geometric coordinate system as the theoretical three-dimensional design model data, and generating the registration point cloud data.
[0014] As a further scheme of the present application, the calculation process of the rigid body transformation matrix comprises:
[0015] Convergence threshold and maximum iteration number are set, in each iteration loop, each spatial point in the captured measurement point cloud coordinate data is traversed to capture the corresponding nearest point on the theoretical three-dimensional design model data surface, a rotation matrix and a translation vector that minimizes the sum of squared Euclidean distances between all corresponding point pairs are calculated, and the rigid transformation matrix is updated according to the calculation result until the error change between adjacent two iterations is less than the convergence threshold or the iteration number reaches the maximum iteration number, and the rigid transformation matrix is generated.
[0016] As a further scheme of the present application, the step S2 is specifically:
[0017] S21: for each data point in the registration point cloud data, a KD tree search algorithm is used to quickly traverse and search the triangular mesh surface of the theoretical three-dimensional design model data to find the projection position closest in spatial distance to the data point, and a nearest projection point is generated;
[0018] S22: the straight line Euclidean distance between the data point in the registration point cloud data and the corresponding nearest projection point is calculated, and the straight line Euclidean distance is taken as the absolute value of the geometric deviation value of the data point relative to the theoretical model;
[0019] S23: according to the surface normal direction of the theoretical three-dimensional design model data at the nearest projection point, it is determined whether the data point is located on the outside or the inside of the model surface, if it is located on the outside, the geometric deviation value is assigned a positive sign, if it is located on the inside, the geometric deviation value is assigned a negative sign, the signed geometric deviation value is associated and bound with the spatial coordinates of the data point, and the three-dimensional deviation vector data is constructed.
[0020] As a further scheme of the present application, the construction process of the three-dimensional deviation vector data includes:
[0021] the coordinates of the i-th point in the registration point cloud data are obtained , and the nearest projection point coordinates of the i-th point on the theoretical three-dimensional design model data are obtained , the unit normal vector at is obtained , and the formula:
[0022] ;
[0023] the signed geometric deviation is calculated , and is combined to form a record item in the three-dimensional deviation vector data;
[0024] wherein, represents the i-th The signed geometric deviation value of each data point Represents the first in the registered point cloud data The three-dimensional spatial coordinate vector of a point represent The coordinate vector of the corresponding projection point on the surface of the theoretical model. The surface of the representative theoretical model at a point The unit normal vector at that location, The dot product operator represents vectors.
[0025] As a further aspect of the present invention, step S3 specifically comprises:
[0026] S31: Read the preset target machining allowance value and the allowable minimum safety margin threshold for the current machining process from the system's process specification database;
[0027] S32: Traverse each record point in the three-dimensional deviation vector data, and subtract the target machining allowance value from the geometric deviation value of each point to obtain the actual remaining material thickness of the point;
[0028] S33: Compare the calculated actual remaining material thickness with the minimum safety margin threshold, extract all records whose values are less than the minimum safety margin threshold, and generate the data of insufficient margin risk points by set the spatial locations corresponding to the records.
[0029] As a further aspect of the present invention, step S4 specifically comprises:
[0030] S41: Read the original CNC machining program code used by the CNC machine tool, identify the G code instructions in it through the syntax parser, and extract all the coordinate instruction sequences that control the movement of the tool and their corresponding tool radius compensation parameters;
[0031] S42: For each target position coordinate in the sequence, search for the risk point with the closest Euclidean distance in the data of insufficient margin risk points. If the closest distance is less than the influence radius of the current tool, it is determined that the command point is affected by the risk of insufficient margin.
[0032] S43: For the affected instruction points, based on the actual remaining material thickness of the corresponding risk point and the preset safety factor, calculate the compensation distance that needs to be retreated or fed along the normal direction of the tool machining surface, superimpose the compensation distance onto the original coordinates to correct the tool path, and recompile to generate the adaptive finishing program code.
[0033] As a further aspect of the present invention, the process of calculating the compensation distance includes:
[0034] Obtain the actual remaining material thickness corresponding to the current command point. and the target machining allowance value Obtain the preset safety factor Using the formula:
[0035] ;
[0036] Calculate the correction amount ,Will The compensation distance is used to adjust the toolpath;
[0037] in, This represents the compensation distance that the cutting tool needs to be adjusted along the normal to the machined surface. This represents the preset target machining allowance value. This represents the actual remaining material thickness calculated based on measurement data. This represents a safety factor with a value greater than 1.
[0038] As a further aspect of the present invention, the process of generating the adaptive finishing program code includes:
[0039] Obtain the original coordinates from the original CNC machining program code. and the corresponding machined surface normal vector Obtain the calculated compensation distance Using the formula:
[0040] ;
[0041] Calculate the corrected new coordinates ,use Replace the original code Meanwhile, the original feed rate and spindle speed commands are retained, and the modified command sequence is encapsulated according to the format requirements of the CNC system to generate the adaptive finishing program code.
[0042] in, This represents the corrected target location coordinates. Represents the target position coordinates in the original CNC code. represent The unit normal vector of the machined surface at the point. This represents the calculated compensation distance along the normal direction.
[0043] A MES system management and control system based on precision mold manufacturing, wherein the MES system management and control system based on precision mold manufacturing is used to implement the above-mentioned MES system management and control method based on precision mold manufacturing, the system includes:
[0044] A data registration module is configured to obtain measured point cloud coordinate data and theoretical three-dimensional design model data, calculate a rigid body transformation matrix of the measured point cloud coordinate data and the theoretical three-dimensional design model data, and register the measured point cloud coordinate data based on the rigid body transformation matrix to generate registered point cloud data.
[0045] A deviation analysis module is configured to search for a nearest projection point of the registered point cloud data on a surface of the theoretical three-dimensional design model data, calculate a geometric deviation value of the registered point cloud data and the nearest projection point along a normal line, and construct a three-dimensional deviation vector data by assigning a positive or negative sign to the geometric deviation value.
[0046] A risk identification module is configured to obtain a target machining allowance value and a minimum safety allowance threshold, calculate a difference between the geometric deviation value in the three-dimensional deviation vector data and the target machining allowance value to obtain an actual remaining material thickness, and generate an insufficient allowance risk point data by screening the three-dimensional deviation vector data with an actual remaining material thickness less than the minimum safety allowance threshold.
[0047] A path optimization module is configured to parse an original numerical control machining program code to extract a coordinate instruction sequence, search for the insufficient allowance risk point data closest to a target position coordinate of the coordinate instruction sequence, calculate a compensation distance based on the actual remaining material thickness and a safety coefficient, and generate an adaptive finishing machining program code by adjusting the target position coordinate.
[0048] Compared with the prior art, the application has the advantages and positive effects that:
[0049] In the application, the rigid body transformation and registration of the measured point cloud and the theoretical model are performed, the geometric deviation is calculated in the normal direction to construct a three-dimensional deviation vector to represent the entity state, the insufficient allowance risk area is screened in combination with the machining allowance and the safety threshold, the original numerical control instruction is parsed and the target coordinate associated with the risk point is searched, the compensation distance is calculated according to the actual remaining material thickness and the safety coefficient, the adaptive finishing machining program is generated by dynamically adjusting the coordinate instruction, the machining path is automatically corrected according to the actual appearance of the workpiece, the overcut risk caused by insufficient allowance is effectively avoided, and the numerical control machining process is accurately matched with the physical state of the workpiece. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 The application is based on the MES system control method flowchart for precise mold production and manufacturing;
[0051] Figure 2 The application is based on the registered point cloud data generation flowchart;
[0052] Figure 3 The application is based on the three-dimensional deviation vector data construction flowchart;
[0053] Figure 4 A flowchart is generated for the risk point data of the remainder of the application;
[0054] Figure 5 A flowchart is generated for the adaptive finishing program code of the application. DETAILED DESCRIPTION
[0055] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions realized based on software are described in detail below in combination with system architecture diagrams and embodiments. It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and do not constitute a limitation on the scope of protection.
[0056] In the description of the present application, the system architecture relationship or data processing flow indicated by the terms "hierarchy", "module", "interface", "data flow", "client", "server" and the like are defined based on the corresponding architecture diagram or flowchart of the embodiments. This way of expression is only used to clearly explain the logical relationship of each element in the technical solution, and is not limited to the physical deployment form. The "multiple" includes two or more technical units, including but not limited to multiple data nodes, processing threads, service instances or functional components, and other scalable elements. The specific number is determined according to the actual business scenario.
[0057] Please refer to Figure 1 and Figure 2 The present application provides a technical solution: an MES system management and control method based on precision mold production and manufacturing, comprising the following steps:
[0058] S1: Obtain the measured point cloud coordinate data and the theoretical three-dimensional design model data, calculate the rigid body transformation matrix of the measured point cloud coordinate data and the theoretical three-dimensional design model data, and generate registration point cloud data based on the rigid body transformation matrix registration measured point cloud coordinate data;
[0059] The steps of S1 are specifically:
[0060] S11: Use a high-precision three-dimensional laser scanner to scan the mold surface from multiple angles to obtain complete measured point cloud coordinate data, and simultaneously call and extract the corresponding theoretical three-dimensional design model data of the mold from the pre-set digital design archive;
[0061] S12: Calculate the center of mass position and principal axis direction of the measured point cloud coordinate data and the theoretical three-dimensional design model data respectively using principal component analysis, construct an initial alignment transformation matrix by aligning the centers of mass and principal axes of the two, and then optimize the initial alignment transformation matrix using the iterative closest point algorithm to obtain the rigid body transformation matrix;
[0062] S13: Apply the optimized rigid body transformation matrix to perform a unified rotation and translation spatial transformation on all data points in the measured point cloud coordinate data, so that they are in the same geometric coordinate system as the theoretical 3D design model data, and generate registration point cloud data.
[0063] The calculation process of the rigid body transformation matrix includes:
[0064] Set a convergence threshold and a maximum number of iterations. In each iteration loop, traverse the nearest point on the surface of the theoretical 3D design model data for each spatial point in the captured point cloud coordinate data. Calculate the rotation matrix and translation vector that minimize the sum of squared Euclidean distances between all corresponding point pairs. Update the rigid body transformation matrix based on the calculation results until the error change between two adjacent iterations is less than the convergence threshold or the number of iterations reaches the maximum number of iterations, and generate the rigid body transformation matrix.
[0065] In the machining site of precision injection molds, a high-precision data acquisition environment is established. A resolution of 0.02 mm and a volumetric accuracy of [missing information] are selected. A blue light raster 3D scanner was used as the data acquisition device. To prevent ambient light interference, the ambient light intensity was controlled at [specific level]. The mold surface is then powder-coated to eliminate high-gloss reflections. During the scanning process, the operator holds a handheld scanner and performs a full-range, multi-angle scan around the mold, maintaining an overlap rate of over 30% to ensure the integrity of the data stitching. The generated original point cloud contains approximately... The coordinates of a scattered point.
[0066] The aforementioned blue light grating 3D scanner refers to a non-contact measurement device that uses projected grating stripes and reconstructs the three-dimensional shape of an object's surface based on the principle of triangulation.
[0067] Because the raw data contains outliers caused by dust or measurement noise, preprocessing is necessary. A statistical outlier removal filtering algorithm is used, with a set number of neighborhood points for each query point. The threshold is 50, which is the multiple of the standard deviation. The value is 1.0. For each point, calculate its distance to... If the average distance of the nearest neighbors is greater than the global average distance plus... Points with a standard deviation greater than one-fold are considered noise points and removed. The processed clean point cloud is recorded as the measured point cloud coordinate data. Simultaneously, the Manufacturing Execution System (MES) retrieves the STEP format theoretical 3D design model data of the mold from the digital design archive of the Product Lifecycle Management System via a high-speed industrial Ethernet interface, and discretizes it into triangular mesh data containing vertex and normal information. .
[0068] To achieve a rough alignment between measured and theoretical data, the following were performed respectively: and Perform principal component analysis. First, calculate the centroid of two groups of data and . Take the point cloud as an example, the centroid is equal to the sum of all point coordinates divided by the number of points . After centering the data, construct covariance matrix. Use singular value decomposition algorithm to decompose the covariance matrix to get three eigenvectors and corresponding eigenvalues. The eigenvector with the largest eigenvalue corresponds to the principal axis direction of the data. By aligning the centroid of and and the three principal axis directions, i.e. the eigenvectors corresponding to the smallest, intermediate and largest eigenvalues, construct the initial alignment transformation matrix .
[0069] On this basis, use the iterative closest point algorithm for fine registration. Set the maximum number of iterations to 50 and the convergence threshold to . In the th iteration, use KD-tree data structure to speed up the search: for each measurement point transformed by the current transformation matrix , find the corresponding point with the smallest Euclidean distance in . Construct the objective function , solve the rotation matrix and translation vector that minimize the sum of squared errors by singular value decomposition, and update the rigid body transformation matrix. When the root mean square error change of the adjacent two iterations is less than , the algorithm converges and outputs the final rigid body transformation matrix .
[0070] The system calls the graphics processing unit computing core, and applies the calculated rigid body transformation matrix to each point in the measurement point cloud coordinate data. The rigid body transformation matrix contains a rotation matrix and a translation vector . The transformation formula is . After this spatial transformation operation, about measurement points are uniformly mapped to the same geometric coordinate system as the theoretical three-dimensional design model, generating registration point cloud data . Experimental data show that in the complex curvature area of the mold surface, the registration accuracy root mean square error can reach .
[0071] Table 1: Key data table for the registration process:
[0072] ;
[0073] As shown in Table 1, through the above steps, the measurement data and theoretical model achieved high-precision spatial unification, laying a precise data foundation for subsequent deviation analysis.
[0074] Please see Figure 1 and Figure 3 S2: Search for the nearest projection point of the registration point cloud data on the surface of the theoretical 3D design model data, calculate the geometric deviation value between the registration point cloud data and the nearest projection point along the normal, and assign positive and negative signs to the geometric deviation value to construct 3D deviation vector data;
[0075] The specific steps of S2 are as follows:
[0076] S21: For each data point in the registration point cloud data, use the KD tree search algorithm to quickly traverse the triangular mesh surface of the theoretical 3D design model data to find the projection position that is closest to the data point in space, and generate the nearest projection point.
[0077] S22: Calculate the straight-line Euclidean distance between the data point and its nearest corresponding projection point in the registered point cloud data, and use the straight-line Euclidean distance as the absolute value of the geometric deviation of the data point relative to the theoretical model.
[0078] S23: Based on the surface normal direction of the theoretical 3D design model data at the nearest projection point, determine whether the data point is located on the outside or inside of the model surface. If it is located on the outside, assign a positive sign to the geometric deviation value; if it is located on the inside, assign a negative sign to the geometric deviation value. Associate and bind the signed geometric deviation value with the spatial coordinates of the data point to construct 3D deviation vector data.
[0079] The process of constructing three-dimensional deviation vector data includes:
[0080] In obtaining the registration point cloud data, the first Coordinates of points and the coordinates of its nearest projection point on the theoretical 3D design model data. , obtain Unit normal vector at the location Using the formula:
[0081] ;
[0082] Calculate the signed geometric deviation and will and This is combined to form a record item in the three-dimensional deviation vector data;
[0083] where, represents the signed geometric deviation value of the i-th data point, represents the three-dimensional spatial coordinate vector of the i-th point in the registered point cloud data, represents the corresponding projection point coordinate vector on the theoretical model surface, represents the unit normal vector of the theoretical model surface at point represents the point product operator.
[0084] For each data point in the registered point cloud data , the system constructs a KD-tree index structure of the triangular mesh of the theoretical three-dimensional design model data . Set the search radius to 5.0 mm, and use the efficient nearest neighbor search capability of the KD-tree to quickly locate the nearest triangular patch in all triangular patches . After determining the nearest patch, calculate the orthogonal projection of point on the plane of the triangular patch. If the projection point falls inside the triangle, then the projection point is the nearest projection point ; if the projection point falls outside the triangle, calculate the distances of to the three edges and three vertices of the triangle, and take the minimum value corresponding to the point as the nearest projection point . This process ensures that the projection point is strictly located on the geometric surface of the theoretical model. Call the Euclidean distance calculation function to calculate the straight-line distance between the registered point
[0085] and the projection point . Let the coordinates of be , and the coordinates of be , then is equal to plus plus the square root of . This distance represents the absolute geometric deviation amplitude of the actual manufacturing surface relative to the theoretical design surface.
[0086] In order to clarify the directionality of the deviation, i.e., whether the material is over-accumulated or over-cut, the surface normal direction of the theoretical model at point is combined. First, extract the unit normal vector of the triangular patch where point This normal vector is predefined during the computer-aided design model export, and its direction points outward from the model entity. Next, the process of constructing the 3D deviation vector data is applied. The first normal vector in the registration point cloud data is obtained. Coordinates of points and the coordinates of its nearest projection point on the theoretical 3D design model data. , obtain Unit normal vector at the location Calculate the signed geometric deviation using the formula. :
[0087] ;
[0088] in, Representing the The signed geometric deviation value of each data point The first point cloud data representing the registration The three-dimensional spatial coordinate vector of a point represent The coordinate vector of the corresponding projection point on the surface of the theoretical model. The surface of the representative theoretical model at a point The unit normal vector at that location, The dot product operator represents vectors.
[0089] Assuming the coordinates of the registration point cloud are obtained at a certain curved surface position of the mold. for The coordinates of its nearest projection point on the surface of the theoretical model. for The unit normal vector of the theoretical surface at this location. for First, calculate the difference vector. for Substitute the parameters into the formula to calculate the signed geometric deviation. The result is ,Right now The result A positive value indicates that the actual machined surface lies outside the theoretical surface, meaning there is a material surplus of 0.08 mm. Finally, the system calculates the signed deviation. Coordinates of the original point The data is bound and formatted into a data structure containing coordinate components, normal components, and deviation values, then stored in the database to form complete three-dimensional deviation vector data.
[0090] Please see Figure 1 and Figure 4S3: Obtain the target machining allowance value and the minimum safety allowance threshold, calculate the difference between the geometric deviation value in the three-dimensional deviation vector data and the target machining allowance value to obtain the actual remaining material thickness, and filter the three-dimensional deviation vector data with the actual remaining material thickness less than the minimum safety allowance threshold to generate data on insufficient allowance risk points.
[0091] The specific steps for S3 are as follows:
[0092] S31: Read the preset target machining allowance value and the minimum allowable safety margin threshold for the current machining process from the system's process specification database;
[0093] S32: Traverse each record point in the three-dimensional deviation vector data, subtract the target machining allowance value from the geometric deviation value of each point, and obtain the actual remaining material thickness of the point.
[0094] S33: Compare the calculated actual remaining material thickness with the minimum safety margin threshold, extract all records whose values are less than the minimum safety margin threshold, and generate the set of spatial locations corresponding to the records to generate data on insufficient margin risk points.
[0095] The Manufacturing Execution System (MES) reads key control parameters from the process specification database based on the current semi-finishing stage of the mold. It then sets the target machining allowance value. The allowance is 0.50mm, meaning that after semi-finishing, a 0.5mm finishing allowance is expected to remain on the mold surface from the final theoretical size. Simultaneously, to prevent uneven allowance during subsequent finishing from causing sudden changes in tool stress or resulting in scrap, a minimum safety allowance threshold is set. for This threshold was set based on cutting mechanics experiments using a ball end mill with a tool diameter of 10 mm.
[0096] The system iterates through the three-dimensional deviation vector data generated in S2. For each record point, it extracts its signed geometric deviation value. Here, the deviation value... This reflects the current position of the actual surface relative to the final theoretical surface. Calculate the actual remaining material thickness. The calculation logic is to subtract the target machining allowance from the geometric deviation value. For example, for point A, its geometric deviation... The target margin is 0.60mm. If it is 0.50mm, then The value is 0.10 mm. For point B, its geometric deviation is... The target margin is 0.20mm. If it is 0.50mm, then for .
[0097] The calculation result is compared with the minimum safety margin threshold value for screening. Records with actual remaining material thickness less than the minimum safety margin threshold value are screened. For the above example, for point B, the calculation result is less than the threshold value , which meets the screening condition and is determined as a risk point of insufficient margin. For point A, the calculation result 0.10mm is greater than the threshold value , which is determined as a normal point. The system aggregates all point B data that meet the condition to generate a set of insufficient margin risk point data.
[0098] Table 2: Deviation calculation and risk determination data table
[0099] ;
[0100] As shown in Table 2, the difference of Pt_102 point is lower than the threshold value, which is accurately identified as a risk point and enters the subsequent step for compensation processing.
[0101] Please refer to Figure 1 and Figure 5 , S4: Analyze the original NC machining program code to extract the coordinate instruction sequence, search for the insufficient margin risk point data closest to the target position coordinates of the coordinate instruction sequence, calculate the compensation distance based on the actual remaining material thickness and the safety factor, and adjust the target position coordinates to generate adaptive finishing program code;
[0102] The steps of S4 are as follows:
[0103] S41: Read the original NC machining program code used by the NC machine tool, identify the G code instructions therein through a syntax parser, and extract all coordinate instruction sequences controlling tool movement and their corresponding tool radius compensation parameters;
[0104] S42: For each target position coordinate in the sequence, search for the closest risk point in the insufficient margin risk point data based on the Euclidean distance, and if the closest distance is less than the influence radius of the current tool, determine that the instruction point is affected by the insufficient margin risk;
[0105] S43: For the affected instruction point, calculate the compensation distance required for retreat or feed along the normal of the tool machining surface based on the actual remaining material thickness of the corresponding risk point and the preset safety factor, add the compensation distance to the original coordinates to correct the tool path, and recompile to generate adaptive finishing program code;
[0106] The process of calculating the compensation distance includes:
[0107] Obtain the actual remaining material thickness corresponding to the current instruction point and the target machining margin value , obtain the preset safety factor , using the formula:
[0108] ;
[0109] Calculate the correction amount , and as the compensation distance for adjusting the tool path;
[0110] wherein, represents the compensation distance value that the tool needs to adjust along the normal of the machined surface, represents the preset target machining allowance value, represents the actual remaining material thickness calculated based on the measurement data, represents a safety factor with a value greater than 1;
[0111] The generation process of the adaptive finishing program code includes:
[0112] Obtain the original coordinates in the original numerical control machining program code and the corresponding machined surface normal vector , obtain the calculated compensation distance , using the formula:
[0113] ;
[0114] Calculate the corrected new coordinates , replace in the original code with , while retaining the original feed speed and spindle speed instructions, encapsulate the modified instruction sequence according to the format requirements of the numerical control system, and generate the adaptive finishing program code;
[0115] wherein, represents the corrected target position coordinates, represents the target position coordinates in the original numerical control code, represents the machined surface unit normal vector at the point, represents the calculated compensation distance along the normal.
[0116] The system loads the original numerical control machining program code to be used for the next finishing process, reads the code line by line through the written G code syntax parser. Identify the instruction line starting with G01 linear interpolation, G02 or G03 circular arc interpolation. Extract the coordinate parameters in it using regular expressions. For example, for the instruction line N1020G01X100.500Y50.000Z10.000F2000, the target coordinates are .
[0117] For each extracted command point , a nearest neighbor search is performed in the set of generated risk points of insufficient stock data in S3 using a spatial index algorithm. The Euclidean distance to each risk point in the set is calculated . If a nearest risk point is found, whose distance is less than the current tool radius of 50. mm, it is determined that the command point is located in a machining area affected by insufficient stock and path adjustment is needed to adapt to the actual stock state.
[0118] For the command points determined to be affected, adaptive compensation calculation is performed. First, the actual remaining material thickness corresponding to the risk point associated with the current command point is obtained , which is the Pt_102 data in Table 2, i.e. . The preset target machining stock value is 0.50 mm. The preset safety factor is . The correction amount is calculated using the formula:
[0119] ;
[0120] wherein, represents the compensation distance value by which the tool needs to be adjusted along the normal of the machining surface, represents the preset target machining stock value, represents the actual remaining material thickness calculated based on the measurement data, represents the safety factor with a value greater than .
[0121] Substituting the actual values, the value of equals times 1.2, i.e. 0.36 mm. This result indicates that in order to adapt to the current actual stock of only 0.20 mm and make a safety adjustment based on the target, the tool path needs to be offset outward along the normal by 0.36 mm.
[0122] Next, the adaptive finishing program code is generated. The original coordinates in the original numerical control machining program code are obtained as . The machining surface normal vector corresponding to this position is obtained , assuming that the point is located in a planar area, the normal vector is . The corrected new coordinates are calculated using the formula:
[0123] ;
[0124] wherein, represents the corrected target position coordinates, representing target position coordinates in original NC code, representing a processing surface unit normal vector at the point, representing a calculated compensation distance along the normal.
[0125] substitute numerical values, equal to plus 0.36 times , the result is The system replaces the coordinates in the original code with the new coordinates , keeping G01 and F2000 unchanged, and recombines to generate a new instruction line. The result shows that the tool height is lifted by 0.36mm when passing through the risk area, thus dynamically adjusting the cutting depth according to the actual shortage of the margin, realizing adaptive machining. Finally, the system recompiles all the modified instruction lines, adds file headers and tails, and generates a complete adaptive finishing program code.
[0126] The MES system control system based on precision mold production and manufacturing is used to execute the above-mentioned MES system control method based on precision mold production and manufacturing, and the system comprises:
[0127] A data registration module is configured to obtain measured point cloud coordinate data and theoretical three-dimensional design model data, calculate a rigid body transformation matrix of the measured point cloud coordinate data and the theoretical three-dimensional design model data, and register the measured point cloud coordinate data to generate registered point cloud data based on the rigid body transformation matrix;
[0128] A deviation analysis module is configured to search for a nearest projection point of the registered point cloud data on a surface of the theoretical three-dimensional design model data, measure a geometric deviation value of the registered point cloud data and the nearest projection point along a normal line, and construct a three-dimensional deviation vector data by assigning a positive or negative sign to the geometric deviation value;
[0129] A risk identification module is configured to obtain a target machining margin value and a minimum safety margin threshold, calculate a difference between the geometric deviation value in the three-dimensional deviation vector data and the target machining margin value to obtain an actual remaining material thickness, and filter the three-dimensional deviation vector data with an actual remaining material thickness less than the minimum safety margin threshold to generate margin insufficient risk point data;
[0130] A path optimization module is configured to parse an original NC machining program code to extract a coordinate instruction sequence, search for margin insufficient risk point data closest to a target position coordinate of the coordinate instruction sequence, calculate a compensation distance based on the actual remaining material thickness and a safety factor, and adjust the target position coordinate to generate an adaptive finishing program code.
[0131] The above embodiments demonstrate the preferred embodiments of the present application, and any equivalent adjustment of the technical solutions based on software engineering methods is within the protection scope, including but not limited to: implementing algorithm logic in different programming languages, service reconstruction of function modules, adjustment of data interaction protocol, optimization of resource scheduling strategy and other technical improvements. Any implementation derived by reasonable modification of the data processing flow, service calling link or system architecture level without deviating from the technical core of the present application shall be considered within the protection scope defined by the technical solutions of the present application.
Claims
1. A MES system management and control method based on precision mold production and manufacturing, characterized in that, The method comprises the following steps: S1: obtaining measured point cloud coordinate data and theoretical three-dimensional design model data, calculating a rigid body transformation matrix of the measured point cloud coordinate data and the theoretical three-dimensional design model data, and registering the measured point cloud coordinate data to generate registered point cloud data based on the rigid body transformation matrix; S2: searching for the nearest projection point of the registered point cloud data on the surface of the theoretical three-dimensional design model data, calculating the geometric deviation value of the registered point cloud data and the nearest projection point along the normal line, and constructing a three-dimensional deviation vector data by assigning the positive and negative signs of the geometric deviation value; S3: obtaining a target machining allowance value and a minimum safety allowance threshold, calculating the difference between the geometric deviation value in the three-dimensional deviation vector data and the target machining allowance value to obtain an actual remaining material thickness, and screening the three-dimensional deviation vector data whose actual remaining material thickness is less than the minimum safety allowance threshold to generate a shortage risk point data; S4: analyzing the original numerical control machining program code to extract a coordinate instruction sequence, searching for the shortage risk point data closest to the target position coordinates of the coordinate instruction sequence, calculating a compensation distance based on the actual remaining material thickness and a safety factor, and adjusting the target position coordinates to generate an adaptive finishing program code.
2. The MES system management and control method based on precision mold production and manufacturing according to claim 1, characterized in that, The step S1 specifically comprises: S11: using a high-precision three-dimensional laser scanner to perform multi-view scanning on the mold surface to obtain complete measured point cloud coordinate data, and calling and extracting the theoretical three-dimensional design model data corresponding to the mold from a preset digital design archive; S12: calculating the center of mass position and the principal axis direction of the measured point cloud coordinate data and the theoretical three-dimensional design model data respectively by using a principal component analysis method, constructing an initial alignment transformation matrix by aligning the centers of mass and the principal axes, and then optimizing the initial alignment transformation matrix by using an iterative closest point algorithm to obtain the rigid body transformation matrix; S13: applying the optimized rigid body transformation matrix to perform unified rotation and translation space transformation on all data points in the measured point cloud coordinate data, so that they are in the same geometric coordinate system as the theoretical three-dimensional design model data, and generating the registered point cloud data. 3.The MES system management and control method based on precision mold production and manufacturing according to claim 2, characterized in that, The calculation process of the rigid body transformation matrix comprises: setting a convergence threshold and a maximum number of iterations, capturing the corresponding nearest point of each space point in the measured point cloud coordinate data on the surface of the theoretical three-dimensional design model data in each iteration loop, calculating a rotation matrix and a translation vector that minimize the sum of squared Euclidean distances between all corresponding point pairs, and updating the rigid body transformation matrix according to the calculation result until the error change between adjacent two iterations is less than the convergence threshold or the number of iterations reaches the maximum number of iterations, and generating the rigid body transformation matrix.
4. The MES system management and control method based on precision mold production and manufacturing according to claim 1, characterized in that, The step S2 specifically comprises: S21: for each data point in the registered point cloud data, using a KD tree search algorithm to quickly traverse and search for the nearest projection position on the triangular mesh surface of the theoretical three-dimensional design model data from the spatial distance of the data point, and generating the nearest projection point; S22: calculating a straight line Euclidean distance between the data point in the registration point cloud data and the nearest projection point corresponding to the data point, taking the straight line Euclidean distance as an absolute value of the geometric deviation value of the data point relative to the theoretical model; S23: determining whether the data point is located on the outside or the inside of the model surface according to a surface normal direction of the theoretical three-dimensional design model data at the nearest projection point, assigning a positive sign to the geometric deviation value if the data point is located on the outside, assigning a negative sign to the geometric deviation value if the data point is located on the inside, and associating and binding the signed geometric deviation value with the spatial coordinates of the data point to construct the three-dimensional deviation vector data.
5. The MES system management and control method based on precision mold production and manufacturing according to claim 4, characterized in that, The construction process of the three-dimensional deviation vector data comprises: Obtain the first point cloud data from the registration point cloud data Coordinates of points and the coordinates of the nearest projection point on the theoretical three-dimensional design model data. , obtain Unit normal vector at the location Using the formula: ; Computing signed geometric deviations and combining with to form a record in the three-dimensional deviation vector data wherein, a signed geometric deviation value representing a th data point, a three-dimensional spatial coordinate vector representing a th point in the registered point cloud data, a corresponding projected point coordinate vector on the theoretical model surface, a unit normal vector representing the theoretical model surface at the point , a point product operator symbol representing 6. The MES system management and control method based on precision mold production and manufacturing according to claim 1, characterized in that, The step of S3 is specifically: S31: reading the target machining allowance value and the minimum safety allowance threshold value preset for the current machining process from a process specification database of the system; S32: traversing each record point in the three-dimensional deviation vector data, subtracting the target machining allowance value from the geometric deviation value of each point to obtain the actual remaining material thickness of the point; S33: comparing the calculated actual remaining material thickness with the minimum safety allowance threshold value in a numerical manner, extracting all records with a numerical value less than the minimum safety allowance threshold value, and generating the insufficient allowance risk point data by collecting the spatial positions corresponding to the records.
7. The MES system management and control method based on precision mold production and manufacturing according to claim 1, characterized in that, The step of S4 is specifically: S41: reading the original numerical control machining program code used by the numerical control machine tool, identifying the G code instructions therein through a syntax parser, and extracting all coordinate instruction sequences controlling tool movement and corresponding tool radius compensation parameters; S42: for each target position coordinate in the sequence, searching for the risk point closest to the target position coordinate in the insufficient allowance risk point data in terms of Euclidean distance, and determining that the instruction point is affected by the insufficient allowance risk if the closest distance is less than the influence radius of the current tool; S43: for the affected instruction point, calculating a compensation distance required for retreat or feed along the tool surface normal according to the actual remaining material thickness of the corresponding risk point and a preset safety coefficient, adding the compensation distance to the original coordinates to correct the tool path, and recompiling to generate the adaptive finishing program code.
8. The MES system management and control method based on precision mold production and manufacturing according to claim 7, characterized in that, The process of calculating the compensation distance comprises: acquiring the actual residual material thickness corresponding to the current instruction point and the target machining allowance value , acquiring a preset safety coefficient , using the formula: ; calculating a correction amount , the as a compensation distance for adjusting the tool path; wherein, a compensation distance value representing the distance the tool needs to be adjusted along the normal of the machined surface, a target machining allowance value representing a pre-set value of the target machining allowance, an actual remaining material thickness value representing the actual remaining material thickness calculated based on the measurement data, a safety factor value representing a value greater than 1.
9. The MES system management and control method based on precision mold production and manufacturing according to claim 8, characterized in that, The generation process of the adaptive finishing program code comprises: obtaining original coordinates in the original numerical control machining program code and a corresponding machining surface normal vector , obtaining the calculated compensation distance using the formula: ; Calculate the corrected new coordinates ,use Replace the original code Meanwhile, the original feed rate and spindle speed commands are retained, and the modified command sequence is encapsulated according to the format requirements of the CNC system to generate the adaptive finishing program code. wherein, represents the modified target position coordinate, represents the target position coordinate in the original NC code, represents the machining surface unit normal vector at the point, represents the calculated compensation distance along the normal.
10. The MES system management and control system based on precision mold production and manufacturing, characterized in that, The system is used to implement the MES system management and control method based on precision mold production and manufacturing according to any one of claims 1-9, and the system comprises: A data registration module is configured to obtain measured point cloud coordinate data and theoretical three-dimensional design model data, calculate a rigid body transformation matrix of the measured point cloud coordinate data and the theoretical three-dimensional design model data, and register the measured point cloud coordinate data based on the rigid body transformation matrix to generate registration point cloud data. a deviation analysis module configured to search for a nearest projection point of the registration point cloud data on a surface of the theoretical three-dimensional design model data, measure a geometric deviation value of the registration point cloud data from the nearest projection point along a normal line, and construct a three-dimensional deviation vector data by assigning a positive or negative sign to the geometric deviation value; a risk identification module configured to obtain a target machining allowance value and a minimum safety allowance threshold, calculate a difference between the geometric deviation value in the three-dimensional deviation vector data and the target machining allowance value to obtain an actual remaining material thickness, and generate an insufficient allowance risk point data by screening the three-dimensional deviation vector data with the actual remaining material thickness less than the minimum safety allowance threshold; a path optimization module configured to analyze an original numerical control machining program code to extract a coordinate instruction sequence, search for the insufficient allowance risk point data closest to a target position coordinate of the coordinate instruction sequence, calculate a compensation distance based on the actual remaining material thickness and a safety coefficient, and generate an adaptive finishing program code by adjusting the target position coordinate.
Citation Information
Patent Citations
Error analysis and intelligent compensation method for mold assembly part
CN119472501A
Numerical control machine tool machining reference point correction method and system, terminal and medium
CN120428649A