Adaptive compensation method and system for three-dimensional model
By scanning the workpiece to generate the actual surface and positioning points, and using CAD software to create and compensate the theoretical STL model, the problem that simulation cannot reflect the real deformation in the machining of large thin-walled skins is solved, and the pre-verification and deformation reflection of the machining process are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional simulation methods cannot reflect the actual deformation of large thin-walled skins during the clamping process, and cannot perform effective pre-verification of the machining process.
The actual surface and positioning points are generated by scanning the actual workpiece. A theoretical STL model is created using CAD software and then compensated onto the actual surface. The normal offset distance is calculated to generate the actual STL model.
It realizes the realistic deformation simulation of large thin-walled skin processing, solves the pre-verification problem of the processing process, and generates a model that can reflect the actual workpiece deformation.
Smart Images

Figure CN115408785B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mechanical processing, in particular to a self-adaptive compensation method and system for a three-dimensional model. BACKGROUND
[0002] Since a large thin skin is extremely easy to deform during clamping, and the deformation is very large, simulation of the processing process is needed before processing, and the traditional simulation can only be directed to a theoretical skin model, and cannot reflect the simulation situation under the real deformation situation, nor can it simulate the real deformation situation and pre-check the processing process.
[0003] In the patent literature with publication number CN110480075B, a workpiece surface contour compensation system and method based on point cloud data and a medium are disclosed, which includes the following modules: a scanning control module: scanning the actual surface shape to obtain a point cloud data set of the actual surface shape; obtaining the actual positioning point coordinates corresponding to the preset positioning hole on the actual surface; a theoretical model processing module: obtaining the theoretical positioning point coordinates on the theoretical surface model; obtaining discrete points on the theoretical surface model to obtain a discrete point cloud data set of the theoretical surface; a mapping compensation module: constructing the mapping relationship between the theoretical surface and the actual surface according to the point cloud data set of the actual surface shape and the discrete point cloud data set of the theoretical surface through the geodesic equidistance principle; and compensating the theoretical tool path to obtain the actual machining tool path according to the mapping relationship between the theoretical surface and the actual surface. However, this method can only compensate the tool path, and cannot generate the actual model required for simulation.
[0004] Therefore, a new technical solution is needed to improve the above technical problems. SUMMARY
[0005] In view of the defects in the prior art, the present application provides a self-adaptive compensation method and system for a three-dimensional model.
[0006] According to the self-adaptive compensation method and system for a three-dimensional model provided by the present application, the scheme is as follows:
[0007] In a first aspect, a self-adaptive compensation method for a three-dimensional model is provided, which includes:
[0008] Step S1: creating a theoretical model using CAD software, and discretizing the theoretical model into a theoretical STL model;
[0009] Step S2: extracting the surface of the theoretical model, and calculating the normal distance of each point in the theoretical STL model to the theoretical surface;
[0010] Step S3: scanning the actual workpiece to obtain the actual surface and the positioning point of the workpiece;
[0011] Step S4: compensate each point in the theoretical STL model to the actual surface;
[0012] Step S5: calculate the normal of each point on the actual surface after compensation;
[0013] Step S6: offset each point after compensation by a certain distance according to the normal to obtain the actual point, and the distance is equal to the distance calculated in step S2;
[0014] Step S7: combine the actual points to generate the actual STL model.
[0015] Preferably, the step S1 specifically comprises:
[0016] The theoretical model is composed of a plurality of parameter surfaces. For each parameter surface, let its mapping function from the parameter domain to the spatial domain be f(u, v), then a point P(up, vp) in the parameter domain domain is transformed into a three-dimensional point P(xp, yp, zp) on the surface by the mapping function f(up, vp);
[0017] For each parameter surface, a set of points is obtained in the f(u, v) domain, which is divided into a planar triangular mesh by the Delaunay algorithm, and a three-dimensional triangular mesh is obtained by the mapping function transformation, and a set of triangular meshes is combined to generate a theoretical STL model.
[0018] Preferably, the step S2 comprises: after generating the STL model, traversing the facet, loop in the STL model level by level, and obtaining all vertexes.
[0019] The surface refers to the machining surface or back plate surface of the skin part, which is also a parameter surface, which is extracted by the function in the CAD software.
[0020] Preferably, the step S3 comprises: by punching a hole on the workpiece, then scanning the hole with a line laser, the hole center is calculated to obtain the actual positioning point coordinates, and two points are marked at the same position of the theoretical model, which are the theoretical positioning points.
[0021] Preferably, the step S5 comprises: the actual surface is also a parameter surface, and the point cloud scanned by the line laser is generated in the CAD software, and the normal of the parameter surface is calculated as follows:
[0022] Let the equation of the parameter surface Σ be:
[0023] x=x(u,v),y=y(u,v),z=z(u,v)
[0024] Solve the normal vector T(i, j, k) at the point p(x, y, z) corresponding to (u, v);
[0025] With v fixed, we obtain a curve about u, whose tangent vector at p is:
[0026]
[0027] With u fixed, we obtain a curve with respect to v, and its tangent vector at p is:
[0028]
[0029] Then the normal vector of point p at surface Σ is the cross product of the two tangent vectors:
[0030] T p =T u ×T v
[0031]
[0032] Where x, y, z represent the coordinates of point p; u, v represent the coordinates of point p on the parametric surface Σ; Tu, Tv represent the tangent vectors of p in the u and v directions, respectively; Tp represents the normal vector of point P on the parametric surface Σ; and i, j, k represent the vector values of Tp, respectively.
[0033] Secondly, an adaptive compensation system for a three-dimensional model is provided, the system comprising:
[0034] Module M1: Uses CAD software to create theoretical models and discretizes the theoretical models into theoretical STL models;
[0035] Module M2: Extracts the surface of the theoretical model and calculates the normal distance from each point in the theoretical STL model to the theoretical surface;
[0036] Module M3: Scans the actual workpiece to obtain its actual surface and positioning points;
[0037] Module M4: Compensates each point in the theoretical STL model onto the actual surface;
[0038] Module M5: Calculates the normal vector of each point on the actual surface after compensation;
[0039] Module M6: The actual point is obtained by offsetting each compensated point by a certain distance along the normal direction. This distance is equal to the distance calculated in step S2.
[0040] Module M7: Combines actual points to generate an actual STL model.
[0041] Preferably, the module M1 includes:
[0042] The theoretical model is composed of several parametric surfaces. For each parametric surface, let its mapping function from the parametric domain to the spatial domain be f(u,v). Then, a point P(up,vp) in the domain of the parametric domain is transformed by the mapping function to obtain a three-dimensional point P(xp,yp,zp) = f(up,vp) on the surface.
[0043] For each parametric surface, a set of points is obtained in the f(u,v) domain. The points are divided into planar triangular meshes using the Delaunay algorithm, and then a three-dimensional triangular mesh is obtained by transforming the meshes using a mapping function. A set of triangular meshes is combined to generate a theoretical STL model.
[0044] Preferably, module M2 includes: after generating the STL model, iterating through the facets and loops in the STL model level by level to obtain all vertices;
[0045] Among them, the profile refers to the machined surface or back plate surface of the skin part, which is also a parametric surface, extracted using the function in CAD software.
[0046] Preferably, the module M3 includes: by drilling a hole in the workpiece, then scanning the hole with a line laser to calculate the center of the hole, the actual positioning point coordinates are obtained, and two points are also marked at the same position in the theoretical model, which are the theoretical positioning points.
[0047] Preferably, module M5 includes: the actual surface is also a parametric surface, generated in CAD software from the point cloud scanned by line laser, and the normal calculation method for the parametric surface is as follows:
[0048] Let the parametric surface Σ equation be:
[0049] x=x(u,v),y=y(u,v),z=z(u,v)
[0050] Find the normal vector T(i,j,k) at the point p(x,y,z) corresponding to (u,v);
[0051] With v fixed, we obtain a curve about u, whose tangent vector at p is:
[0052]
[0053] With u fixed, we obtain a curve with respect to v, and its tangent vector at p is:
[0054]
[0055] Then the normal vector of point p at surface Σ is the cross product of the two tangent vectors:
[0056] T p =T u ×T v
[0057]
[0058] Where x, y, z represent the coordinates of point p; u, v represent the coordinates of point p on the parametric surface Σ; Tu, Tv represent the tangent vectors of p in the u and v directions, respectively; Tp represents the normal vector of point P on the parametric surface Σ; and i, j, k represent the vector values of Tp, respectively.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] This invention uses actual workpieces to generate actual surfaces and positioning points, discretizes the theoretical model into an STL model, and compensates the points in the STL model onto the actual surface to generate an actual STL model. This can intuitively reflect the deformation of the actual workpiece and can be used with a simulation platform and a compensated toolpath program to solve the problem of not being able to pre-verify the actual deformation during skinning simulation. Attached Figure Description
[0061] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0062] Figure 1 This is a schematic diagram of the overall process of the present invention;
[0063] Figure 2 This is a schematic diagram of a planar Delaunay mesh.
[0064] Figure 3 Generate an STL model diagram for the 3D model;
[0065] Figure 4 This is a schematic diagram of the theoretical positioning point;
[0066] Figure 5 Schematic diagrams of the theoretical surface and the actual surface;
[0067] Figure 6 Schematic diagrams of the theoretical surface and the actual surface;
[0068] Figure 7 Schematic diagrams of the theoretical and practical models;
[0069] Figure 8 This is a schematic diagram of the theoretical model and the actual model. Detailed Implementation
[0070] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0071] This invention provides an adaptive compensation method for a three-dimensional model, referring to... Figure 1 As shown, the method specifically includes:
[0072] Step S1: Use CAD software to create a theoretical model, and discretize the theoretical model into a theoretical STL model;
[0073] Reference Figure 2 and Figure 3 As shown, the theoretical model is composed of several parametric surfaces. For each parametric surface, let its mapping function from the parametric domain to the spatial domain be f(u,v). Then, a point P(up,vp) in the domain of the parametric domain can be transformed by the mapping function to obtain a three-dimensional point P(xp,yp,zp) = f(up,vp) on the surface.
[0074] For each parametric surface, a set of points is obtained in the f(u,v) domain. The points are divided into planar triangular meshes using the Delaunay algorithm, and then a three-dimensional triangular mesh is obtained by transforming the meshes using a mapping function. A set of triangular meshes is combined to generate a theoretical STL model.
[0075] Step S2: Extract the surface of the theoretical model and calculate the normal distance from each point in the theoretical STL model to the theoretical surface.
[0076] The STL model consists of triangular meshes, roughly in the following form:
[0077]
[0078] Vertex corresponds to the (x, y, z) coordinates of a point, facet corresponds to a triangular facet; loop represents the three points that make up the facet arranged counterclockwise;
[0079] The STL model is composed of millions of triangles, where each point refers to all the vertexes.
[0080] The STL model has already been generated. Here, we only need to iterate through the facet and loop of the STL model level by level to obtain all the vertices.
[0081] The profile refers to the machined surface or back panel surface of the skin part, which is also a parametric surface. It is extracted using functions in CAD software and referenced. Figure 4As shown, the two points on both sides are the theoretical positioning points.
[0082] Step S3: Refer to Figure 5 and Figure 6 As shown, the actual workpiece is scanned to obtain the actual surface and positioning points of the workpiece.
[0083] By drilling a hole in the workpiece and then scanning the hole with a line laser to calculate the center of the hole, the coordinates of the actual positioning point are obtained. Correspondingly, two points are also marked at the same position in the theoretical model, and these two points are the theoretical positioning points.
[0084] Step S4: Compensate each point in the theoretical STL model onto the actual surface.
[0085] Reference Figure 7 and Figure 8 As shown, step S5: Calculate the normal of each point on the actual surface after compensation;
[0086] The actual surface is also a parametric surface, generated in CAD software from the point cloud scanned by line laser. The normal of the parametric surface is calculated as follows:
[0087] Let the parametric surface Σ equation be:
[0088] x=x(u,v),y=y(u,v),z=z(u,v)
[0089] Find the normal vector T(i,j,k) at the point p(x,y,z) corresponding to (u,v);
[0090] With v fixed, we obtain a curve about u, whose tangent vector at p is:
[0091]
[0092] With u fixed, we obtain a curve with respect to v, and its tangent vector at p is:
[0093]
[0094] Then the normal vector of point p at surface Σ is the cross product of the two tangent vectors:
[0095] T p =T u ×T v
[0096]
[0097] Where x, y, and z represent the coordinates of point p; u and v represent the coordinates of point p on the parametric surface Σ; T u T v Let T represent the tangent vectors of p in the directions u and v, respectively. pLet i, j, and k represent the normal vector of point P on the parametric surface Σ, respectively. p The vector value.
[0098] Step S6: Offset each compensated point by a certain distance along the normal direction to obtain the actual point. This distance is equal to the distance calculated in step S2.
[0099] Step S7: Reinsert the actual point coordinates according to the structure in the theoretical STL model to generate the actual STL model.
[0100] This invention provides an adaptive compensation method and system for a three-dimensional model. By scanning the surface and positioning points of the actual skin workpiece with a laser, the theoretical skin STL lightweight model is compensated to generate the deformed actual skin STL lightweight model, which intuitively reflects the deformation of the actual workpiece and solves the problem that the actual deformation cannot be pre-verified during skin processing simulation.
[0101] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0102] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. An adaptive compensation method for a three-dimensional model, characterized in that, include: Step S1: Use CAD software to create a theoretical model, and discretize the theoretical model into a theoretical STL model; Step S2: Extract the surface of the theoretical model and calculate the normal distance from each point in the theoretical STL model to the theoretical surface; Step S3: Scan the actual workpiece to obtain the actual surface and positioning points of the workpiece; Step S4: Compensate each point in the theoretical STL model onto the actual surface; Step S5: Calculate the normal vector of each point on the actual surface after compensation; Step S6: Offset each compensated point by a certain distance along the normal direction to obtain the actual point. This distance is equal to the distance calculated in step S2. Step S7: Combine the actual points to generate the actual STL model; Step S2 includes: after generating the STL model, traversing the facets and loops in the STL model level by level to obtain all vertices; Among them, the profile refers to the machined surface or back plate surface of the skin part, which is also a parametric surface, extracted using the function in CAD software; Step S3 includes: drilling a hole in the workpiece, then scanning the hole with a line laser to calculate the center of the hole, thus obtaining the actual positioning point coordinates. Correspondingly, two points are also marked at the same position in the theoretical model, and these two points are the theoretical positioning points. Step S5 includes: the actual surface is also a parametric surface, generated in CAD software from the point cloud scanned by line laser. The normal calculation method for the parametric surface is as follows: Let the parametric surface Σ equation be: Find the normal vector T(i,j,k) at the point p(x,y,z) corresponding to (u,v); With v fixed, we obtain a curve about u, whose tangent vector at p is: With u fixed, we obtain a curve with respect to v, and its tangent vector at p is: Then the normal vector of point p at surface Σ is the cross product of the two tangent vectors: Where x, y, and z represent the coordinates of point p; u and v represent the coordinates of point p on the parametric surface Σ; T u T v Let T represent the tangent vectors of p in the directions u and v, respectively. p Let i, j, and k represent the normal vector of point P on the parametric surface Σ, respectively. p The vector value.
2. The adaptive compensation method for a three-dimensional model according to claim 1, characterized in that, Step S1 specifically includes: The theoretical model consists of several parametric surfaces. For each parametric surface, let its mapping function from the parametric domain to the spatial domain be... ; For each parametric surface, in Within the domain, a set of points is obtained, which is then divided into planar triangular meshes using the Delaunay algorithm. A three-dimensional triangular mesh is then obtained by transforming the meshes using a mapping function. Finally, a set of triangular meshes is combined to generate a theoretical STL model.
3. An adaptive compensation system for a three-dimensional model, characterized in that, include: Module M1: Uses CAD software to create theoretical models and discretizes the theoretical models into theoretical STL models; Module M2: Extracts the surface of the theoretical model and calculates the normal distance from each point in the theoretical STL model to the theoretical surface; Module M3: Scans the actual workpiece to obtain its actual surface and positioning points; Module M4: Compensates each point in the theoretical STL model onto the actual surface; Module M5: Calculates the normal vector of each point on the actual surface after compensation; Module M6: The actual point is obtained by offsetting each compensated point by a certain distance along the normal direction. This distance is equal to the distance calculated in step S2. Module M7: Combines actual points to generate an actual STL model; The module M2 includes: after generating the STL model, iterating through the facets and loops in the STL model level by level to obtain all vertices; Among them, the profile refers to the machined surface or back plate surface of the skin part, which is also a parametric surface, extracted using the function in CAD software; The module M3 includes: by drilling a hole in the workpiece, scanning the hole with a line laser, calculating the center of the hole, the actual positioning point coordinates are obtained, and two points are also marked at the same position in the theoretical model, which are the theoretical positioning points. The module M5 includes: the actual surface is also a parametric surface, generated in CAD software from the point cloud scanned by line laser. The normal calculation method for the parametric surface is as follows: Let the parametric surface Σ equation be: Find the normal vector T(i,j,k) at the point p(x,y,z) corresponding to (u,v); With v fixed, we obtain a curve about u, whose tangent vector at p is: With u fixed, we obtain a curve with respect to v, and its tangent vector at p is: Then the normal vector of point p at surface Σ is the cross product of the two tangent vectors: Where x, y, z represent the coordinates of point p; u, v represent the coordinates of point p on the parametric surface Σ; Tu, Tv represent the tangent vectors of p in the u and v directions, respectively; Tp represents the normal vector of point P on the parametric surface Σ; and i, j, k represent the vector values of Tp, respectively.
4. The adaptive compensation system for a three-dimensional model according to claim 3, characterized in that, The module M1 includes: The theoretical model consists of several parametric surfaces. For each parametric surface, let its mapping function from the parametric domain to the spatial domain be... ; For each parametric surface, in Within the domain, a set of points is obtained, which is then divided into planar triangular meshes using the Delaunay algorithm. A three-dimensional triangular mesh is then obtained by transforming the meshes using a mapping function. Finally, a set of triangular meshes is combined to generate a theoretical STL model.
Citation Information
Patent Citations
A workpiece surface contour compensation system, method, and medium based on point cloud data.
CN110480075B
Workpiece curved surface profile compensation system and method based on point cloud data, and medium
CN110480075A
On-machine inspection and compensation method employing point clouds and applied to complex surface processing
US20220057194A1