A method for 3D modeling of a double-layer structure workpiece

CN122987392APending Publication Date: 2026-10-27WUXI LICHENG INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611282593.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

本发明针对现有工件三维建模的技术短板,打破双层复杂结构工件仅能依赖手工建模的局限,弥补现有自动建模技术无法识别处理双层结构的空白,针对双侧立板、连接件拼接的特殊工件,仅需对原始二维CAD图纸做简易规则修改,导入后可实现图纸到三维模型的全自动转化与一键生成,解决传统建模失效、精度不达标的难题,还相较于纯手工绘制将建模时效平均提升70%-80%,大幅降低人力与时间成本,适配批量快速建模场景;同时通过线条分类解析、闭合轮廓校验、分区差异化拉伸与拼接,能避免人工操作带来的尺寸偏差、轮廓错位问题,保障建模精度与规整度,最终输出标准STEP格式文件,兼容性极强,可直接应用于仿真分析、数控加工、装配检测等各类依赖三维模型的工作,具备突出的技术优势和实用价值。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122987392A_ABST
    Figure CN122987392A_ABST
Patent Text Reader

Abstract

This application discloses a three-dimensional modeling method for a double-layer structure workpiece, belonging to the field of three-dimensional modeling technology. The method includes the following steps: acquiring and preprocessing the workpiece CAD drawing, using different colors and line types to distinguish the base plate, vertical plate, and connecting plate, and setting the thickness of the base plate, the height of the vertical plate, and the height of the connecting plate; importing the preprocessed drawing, automatically resolving the base plate line, weld line, and connecting line according to the line color and line type; dividing the upper part line and the lower part line according to the x-coordinate of the midpoint of the line connecting the centroids of the two surfaces; after constructing the upper part line and the lower part line respectively, stretching the base plate surface, weld surface, and connecting surface according to the set thickness to form the upper part solid and the lower part solid; assembling and merging the upper part solid and the lower part solid to output a STEP format three-dimensional model; only simple rule modifications are needed to the original two-dimensional CAD drawing, and after importing, the fully automatic conversion and one-click generation of the drawing into a three-dimensional model can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of 3D modeling technology, specifically a 3D modeling method for a double-layer structure workpiece. Background Technology

[0002] In the fields of mechanical manufacturing and digital design of welded components, 3D models are the core carrier for workpiece processing, assembly and data exchange. Especially for double-layer welded workpieces with double-sided upright plates and connecting parts, the accuracy of the model directly affects production efficiency.

[0003] Currently, the mainstream method for obtaining 3D models of workpieces in the industry still relies on manual modeling and drawing, which depends on the experience of operators. This results in long modeling cycles, high error rates, and problems such as contour misalignment and dimensional deviations for complex workpieces. Batch modeling efficiency is extremely low. At the same time, although there are related solutions for automated modeling based on engineering drawings, the adaptability of such solutions is obviously limited. For complex double-layer workpieces with vertical plates on both sides, it is difficult to complete contour recognition and partition modeling, and the modeling is difficult and the forming effect is poor. Summary of the Invention

[0004] To address the aforementioned issues, this invention provides a method for three-dimensional modeling of double-layer structure workpieces. By processing two-dimensional CAD drawings, automatic partitioning and accurate assembly of the workpiece can be achieved, generating a standard three-dimensional model and significantly improving modeling efficiency and accuracy.

[0005] A method for 3D modeling of a double-layer structure workpiece includes the following steps: S1: Drawing preprocessing: Obtain and preprocess the workpiece CAD drawing so that the lines of the vertical plate, the base plate, and the connecting plate can form a unique closed figure. Different colors and line types are used to distinguish the base plate, the vertical plate, and the connecting plate. The thickness of the base plate, the height of the vertical plate, and the height of the connecting plate are set. S2: Line Analysis: Import the pre-processed drawing and automatically analyze the base plate line, weld line and connecting line according to the line color and line type; S3: Surface and Partition: Connect the ends of the connecting lines to form a closed line segment and construct a surface. Select two surfaces with equal areas and divide all lines into upper and lower parts based on the x-coordinate of the midpoint of the line connecting the centroids of the two surfaces. S4: Extrusion Modeling: After constructing the upper and lower lines separately, extrude the base plate, weld, and connection surfaces according to the set thickness to form the upper and lower solids; S5: Model Assembly and Export: Based on the connection surface relationship between the upper and lower solids, assemble and merge the upper and lower solids to output a STEP format 3D model.

[0006] In step S3, the closed line segment is used to generate a surface using the openCascade geometry engine, and the centroid coordinates of the surface are calculated.

[0007] In step S3, the method for determining whether a line belongs to the upper or lower part is as follows: if the x-coordinates of all endpoints of the line are greater than the x-coordinate of the midpoint, then it is classified as the upper part; if they are all less than the x-coordinate of the midpoint, then it is classified as the lower part.

[0008] Step S4 further includes drilling holes in the base plate surface, weld surface, and connection surface before performing the contour stretching operation.

[0009] In step S4, the stretching direction of the weld surface is opposite to that of the bottom plate surface and the connecting surface.

[0010] The specific steps for the hole-drilling process are as follows: For the base plate: Rule 1: For base plates containing only a single-layer independent closed shape, direct stretching and forming are performed without drilling. Rule 2: For a base surface containing two nested closed shapes, remove the entire area enclosed by the inner closed shape, and retain the area between the outer and inner shapes; For weld surfaces and joint surfaces: Rule 1: For the connection surface and weld surface containing two nested closed shapes, the area enclosed by the inner closed shape shall be completely removed, and the area between the outer and inner layers shall be retained. Rule 2: For the connecting surfaces and weld surfaces of multi-layered nested closed shapes, take two adjacent closed shapes as a group and remove the area enclosed by the innermost closed shape and the interlayer area between two adjacent groups of closed shapes.

[0011] The specific content of assembling and merging the upper and lower parts of the entity in step S5 is as follows: (1) Extract the centroid pt1 and normal vector normal1 of the upper part of the entity connection surface face1 and the centroid pt2 and normal vector normal2 of the lower part of the entity connection surface face2, and invert normal2 to make the normals of the two consistent; (2) Calculate the angle between the two normal vectors in the same direction by using the dot product of the two normal vectors, call the OpenCASCADE interface to generate the rotation transformation matrix, and virtually rotate face2 to obtain the target face3 and the centroid pt3; (3) Calculate the three-axis translation components based on the coordinate difference between pt1 and pt3, and construct the translation matrix; (4) Extract the rotation transformation matrix and translation matrix calculated above, and perform global spatial transformation on the lower part of the entity.

[0012] Beneficial effects: This invention addresses the shortcomings of existing 3D workpiece modeling technologies, overcoming the limitation that complex double-layered workpieces can only be modeled manually. It fills the gap in existing automatic modeling technologies' inability to recognize and handle double-layered structures. For special workpieces with double-sided uprights and spliced ​​connectors, only simple rule modifications to the original 2D CAD drawings are needed. After importing, the drawings can be automatically converted to 3D models with a single click, solving the problems of traditional modeling failures and insufficient accuracy. Compared to purely manual drawing, it improves modeling efficiency by an average of 70%-80%, significantly reducing labor and time costs, and is suitable for batch rapid modeling scenarios. Simultaneously, through line classification and analysis, closed contour verification, and zoned differentiated stretching and splicing, it avoids dimensional deviations and contour misalignments caused by manual operation, ensuring modeling accuracy and regularity. The final output is a standard STEP format file with strong compatibility, which can be directly applied to various 3D model-dependent tasks such as simulation analysis, CNC machining, and assembly inspection, demonstrating outstanding technical advantages and practical value. Attached Figure Description

[0013] Figure 1 This is a flowchart of the invention; Figure 2 It is the original CAD drawing of the workpiece; Figure 3 These are pre-processed CAD drawings; Figure 4 It is the loaded CAD drawing; Figure 5 This is a demonstration image of the model's effect. Detailed Implementation

[0014] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described in this application are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0015] This invention provides a method for three-dimensional modeling of a double-layer structure workpiece; the detailed process is described in [link to detailed process]. Figure 1 The implementation steps of this method will be explained in detail below.

[0016] S1: Obtain the workpiece CAD drawing, see Figure 2 And make modifications according to the specified rules.

[0017] The workpiece drawings must meet the following rules: (1) To ensure the accuracy and completeness of subsequent 3D modeling, the following must be met during the drawing preprocessing stage: the contour lines corresponding to the upright plate, base plate, and connecting plate must all be connected end to end with the other contour lines that constitute their own closed shapes and form independent closed shapes; there must be no broken lines, forked structures, ambiguous closed areas, or suspended endpoints. This setting can ensure that the modeling algorithm can stably identify the boundaries of each structure, avoid model surface defects, realize solid modeling based on the original drawing contours, and ensure that the modeling results fit the actual design structure of the workpiece.

[0018] (2) Distinguish the vertical plate and the base plate using continuous lines of different colors; connecting plate lines can be distinguished using dashed lines such as EB_DASH or EB_DASHDOT, or by using specific colors. Line segments that do not conform to the above color and line type specifications are all judged as invalid line segments. Invalid line segments are displayed as white lines after the drawing is loaded, which can easily interfere with normal contour observation and cause misjudgment by the recognition algorithm. Therefore, all invalid line segments need to be deleted in advance before the drawing is imported and analyzed to ensure the stability and smoothness of the subsequent line analysis process.

[0019] (3) The weld area is a key part of the modeling and requires special cleaning. Remove redundant and small line segments on the weld path; strictly limit the connection position of each weld line segment to only retain a unique endpoint, and prohibit multiple line segments from intersecting, overlapping, or crossing. This operation can eliminate minor geometric deviations, so that the weld contour forms a continuous, regular, and logically unique complete path, preventing problems such as modeling gaps, surface failures, and abnormal solid stretching caused by small line segments.

[0020] (4) The following parameters need to be precisely specified in advance: the solid thickness of the base plate, the solid height of the upright plate, and the height of the connecting plate. Among them, the height of the connecting plate has a clear limiting rule, that is, its value should be set to half of the overall height of the complete workpiece. By specifying these parameters, the thickness mapping relationship from the two-dimensional drawing to the three-dimensional solid is established, ensuring that the three-dimensional solid generated by the subsequent stretching operation conforms to the physical specifications of the actual workpiece in terms of size, and ensuring the accuracy and manufacturability of the modeling results.

[0021] (5) Before modeling, it is necessary to ensure that the drawings are complete and matched. In addition to the drawings of the workpiece itself, the drawings of the matching parts that have contact, connection and assembly interference with the workpiece should also be provided. Complete and matched drawings are the basis for achieving correct assembly modeling. They can ensure that the final three-dimensional model accurately reflects the actual assembly structure and connection relationship, and avoid modeling deviations caused by missing drawings.

[0022] The CAD drawings after S1 preprocessing are shown below. Figure 3 .

[0023] S2: Import the pre-processed CAD drawings. The system automatically reads the line information in the drawings and classifies and analyzes all compliant lines in the drawings according to the preset line type and color recognition rules. In this embodiment, red lines are analyzed as weld lines, yellow lines as connecting lines, and green lines as base plate lines. After analysis, the system clearly displays the three types of lines according to their corresponding colors and preset line types, which makes it easy for operators to intuitively view the distribution of various lines and verify the accuracy of the analysis results. At the same time, redundant lines with non-compliant line types and colors identified during the analysis process are removed to ensure that the contour lines used for subsequent modeling are neat and correct and clearly classified, providing accurate basic data support for subsequent steps such as closed contour construction and line partitioning.

[0024] See the loaded CAD drawing. Figure 4 , Figure 4 The connecting lines, weld lines and base plate lines in the middle section overlap and appear to be a single color, but in reality, the line segments are not missing and remain continuous and complete, forming a closed outline.

[0025] S3: Based on the closed connection line obtained in S2, the upper and lower parts of the workpiece are structurally distinguished. The specific method is as follows: (1) All the connecting lines obtained from the analysis in S2 are spliced ​​end to end to ensure that each connecting line can be correctly connected according to its endpoint relationship. Through this step, all the scattered connecting lines are spliced ​​together to form multiple independent, complete and unbroken closed line segments, providing a clear and continuous boundary foundation for the subsequent generation of three-dimensional surface structures.

[0026] (2) Based on the openCascade geometry engine, each closed line segment obtained in the previous step is converted into a surface. That is, a connecting surface is constructed based on the closed line contour: by calling the ToPoDs_Face structure in openCascade, each group of closed line segments is converted into a connecting surface.

[0027] (3) Perform area attribute analysis on all generated ToPoDs_Face. By traversing all connected faces and calculating the area of ​​each face, the traversal is immediately terminated when a face with the same area as the first connected face (face1) (face2) is found. Then, the centroid coordinates of face1 and face2 are solved using the geometric calculation tools provided by openCascade, and the two centroids are recorded as pt1 and pt2 respectively, providing a geometric basis for determining the upper and lower partition datum. If no two connected faces with the same area can be found, the modeling fails.

[0028] (4) Connect the centroids pt1 and pt2 to form a line segment, and calculate the midpoint ptCenter of this line segment using geometric midpoint calculation. Further extract the coordinate value of the midpoint ptCenter on the x-axis, denoted as ptCenter_x. This coordinate value will serve as the basis for subsequent classification of the upper and lower parts of all lines, ensuring the accuracy and uniqueness of the partition position.

[0029] (5) Traverse all weld lines, connecting lines, and base plate lines obtained in step S2, and check the x-coordinate values ​​of all endpoints of each line. The judgment rule is: if the x-coordinates of all endpoints of a line are less than ptCenter_x, then the line is classified into the lower part of the lines; if the x-coordinates of all endpoints of a line are greater than ptCenter_x, then the line is classified into the upper part of the lines. Under the conventional drawing layout, the endpoints of the lines will not be located on both sides of the center horizontal coordinate, so there is no need to set up cross-area classification.

[0030] After the classification is completed, two complete sets of lines are obtained: Upper section line set: Upper weld seam line WeldEdges1; Upper connecting line ConnectEdges1; Upper base plate line Edges1; The lower part of the line set includes: lower weld seam line WeldEdges2; lower connecting line ConnectEdges2; and lower base plate line Edges2.

[0031] S4: For separate modeling of the upper and lower parts, the specific approach is as follows: The lines in the upper part of the line set are constructed into surfaces: the upper weld line WeldEdges1 forms the weld surface, the upper connecting line ConnectEdges1 forms the connecting surface, and the upper base plate line Edges1 forms the base plate surface; the lower part of the line set is also constructed into surfaces in sequence: the lower weld line WeldEdges2 forms the weld surface, the lower connecting line ConnectEdges2 forms the connecting surface, and the lower base plate line Edges2 forms the base plate surface.

[0032] Due to the scale shown in the attached diagram, the weld line and connecting line appear to be a single line, but in reality, they are two closely spaced lines.

[0033] Before stretching, holes need to be drilled on the weld surface, joint surface, and base plate surface. The drilling rules are as follows: For the base plate: Rule 1: For base plates containing only a single-layer independent closed shape, direct stretching and forming are performed without drilling. Rule 2: For a base surface containing two nested closed shapes, remove the entire area enclosed by the inner closed shape, and retain the area between the outer and inner layers.

[0034] For weld surfaces and joint surfaces: Rule 1: For the connection surface and weld surface containing two nested closed shapes, the area enclosed by the inner closed shape shall be completely removed, and the area between the outer and inner layers shall be retained. Rule 2: For the connecting surfaces and weld surfaces of multi-layered nested closed shapes, take two adjacent closed shapes as a group and remove the area enclosed by the innermost closed shape and the interlayer area between two adjacent groups of closed shapes.

[0035] For example: Closed figure A contains closed figure B, closed figure B contains closed figure C, and closed figure C contains closed figure D; then closed figure A and closed figure B are a group, and closed figure C and closed figure D are a group; the area enclosed by closed figure D, as well as the area between closed figure C and closed figure B, are removed.

[0036] Since both weld lines and connecting lines are double-lined closed shapes, there cannot be a situation where only one closed shape exists inside two closed shapes. That is, there cannot be a situation where closed shape A contains closed shape B, and closed shape B contains closed shape C.

[0037] Based on pre-set and input dimensional parameters, fixed-distance stretching and forming operations are performed on different types of surfaces: For the base plate surface, solid stretching is performed according to the specified forming height, with the lower part stretched and extended along the positive Z-axis and the upper part stretched and extended in the negative Z-axis, ultimately forming the base plate body; For the connecting surface, stretching processing is carried out according to the preset specified height, with the lower part stretched and formed along the positive Z-axis and the upper part stretched and formed in the negative Z-axis, thus constructing a complete connecting body; For the weld surface, stretching is strictly performed according to the given height parameters, with the lower part stretched and extended in the negative Z-axis and the upper part stretched and extended in the positive Z-axis, thereby forming the vertical plate.

[0038] All the upper stretched solids are combined to form shape1; all the lower stretched solids are combined to form shape2. The fusion process specifically refers to removing the overlapping and intersecting contact surfaces between adjacent solids, eliminating redundant geometric structures between solids, and splicing each independent solid into a continuous, non-overlapping, and non-redundant single solid. This ensures that the upper and lower solid structures are regular and uniform, providing a structural foundation for the subsequent assembly of the overall model.

[0039] S5: Merge and assemble the upper and lower solid structures obtained in S4. Since the geometry of the connecting surfaces of the upper and lower solids is completely identical, establish alignment constraints based on the spatial coordinate transformation relationship between the connecting surfaces of the upper and lower solids. Then, precisely adapt and align the overall solid shape2 to the standard connection and installation position of shape1 through rotational transformation. After completing the spatial transformation and alignment, the final overall 3D model is formed. The overall structure after transformation and assembly is as follows: Figure 5 As shown, the generated complete model can be exported as a universal STEP format file, which facilitates subsequent process manufacturing, simulation verification, and cross-platform data interaction.

[0040] The specific details of the spatial coordinate transformation relationship are as follows: (1) Extracting reference geometric parameters: Obtain the centroid pt1 and normal vector normal1 of the upper solid connection surface face1, and simultaneously obtain the centroid pt2 and normal vector normal2 of the lower solid connection surface face2. Since face1 and face2 are a set of mating surfaces pre-set for a double-layer structure workpiece, they have the same shape, are mating face to face, and their normal vectors are 180° opposite. Therefore, it is only necessary to perform a 180° directional flip (vector inversion) on normal2 once to make the flipped normal2 completely consistent with normal1 in direction and completely unified in spatial orientation, providing a stable reference for subsequent coordinate transformation.

[0041] (2) Calculate the rotation relationship between the flipped normal vector normal2 and the original normal vector normal1. The cosine of the included angle is calculated using the three-dimensional vector dot product formula:

[0042] In the formula, Let normal1 be the normal vector of the upper entity's connected surface face1. This is the flipped vector of the normal vector normal2 of the lower solid connection face2. Let be the spatial angle between the two normal vectors. Based on this angle, the rotation transformation matrix is ​​constructed using the gp_Trsf::SetTransformation(const gp_Ax3& theFromSystem1, const gp_Ax3& theToSystem2) interface of the OpenCASCADE geometry kernel. Face2 is then subjected to a spatial rotation transformation according to this rotation relationship to obtain the transformed target face3, and the centroid coordinates of face3 are extracted.

[0043] (3) Solve for the spatial translation transformation parameters: Calculate the translation relationship between the centroid pt3 of face3 and the centroid pt1 of face1. Let the coordinates of pt1 be... pt3 coordinates are Then the translation components along the X, Y, and Z axes are respectively: , , Based on the above components, a translation matrix is ​​constructed.

[0044] (4) Alignment of the lower part entity shape2 global coordinate transformation: Extract the rotation transformation matrix and translation matrix calculated above, and perform global spatial transformation on shape2; the transformation order is to first perform rotation transformation globally to unify the spatial orientation of the lower part entity docking surface, and then perform translation transformation globally to align the centroid points of the upper and lower docking surfaces, so that face2 and face1 are accurately aligned.

[0045] (5) Solid Merging Modeling and Export: After the upper and lower solids are accurately aligned and fitted, a Boolean merge operation is performed on the upper solid shape1 and the lower solid shape2 to integrate them into a complete 3D workpiece model; the fitting effect is as follows. Figure 5 As shown, the integrated workpiece model can be exported to the STEP general 3D format to complete the workpiece modeling task.

[0046] It should be noted that this application first uses individual facets for virtual pre-computation and solves transformation parameters, and then performs coordinate transformation uniformly on the complete lower-level entity, rather than directly performing trial calculations and adjustments on the entity. The reasons are as follows: a single facet only contains a small amount of geometric information such as the surface, normal vector, and centroid, and the computational power consumption of lightweight virtual computation is extremely low. However, the complete entity contains massive amounts of topology, vertex, and facet data. If the entity is repeatedly adjusted and aligned directly, the efficiency of modeling and computation will be greatly reduced. In terms of assembly accuracy, after the rotation and translation parameters are solved in advance, they are applied to the entity all at once, which can avoid the cumulative coordinate errors caused by moving the entity step by step, ensure that the mating surfaces of the upper and lower workpieces fit perfectly, and improve the stability of automated modeling and alignment.

Claims

1. A method of three-dimensional modeling of a double-layered structure workpiece, characterized by, The method comprises the following steps: S1: drawing preprocessing: obtaining and preprocessing the CAD drawing of the workpiece, so that the lines of the vertical plate, the bottom plate and the connecting plate can form a unique closed figure, and the bottom plate, the vertical plate and the connecting plate are distinguished by different colors and line types, and the thickness of the bottom plate, the height of the vertical plate and the height of the connecting plate are set; S2: line analysis: importing the preprocessed drawing, and automatically analyzing the bottom plate line, the weld line and the connecting line according to the line color and the line type; S3: surface and partition: connecting the connecting line at the head and tail to form a closed line segment and building a surface, selecting two surfaces with equal areas, and dividing all the lines into upper part lines and lower part lines according to the x coordinate of the midpoint of the centroid connecting line of the two surfaces; S4: stretching modeling: after the upper part lines and the lower part lines are built into surfaces, the bottom plate surface, the weld surface and the connecting surface are stretched according to the set thickness to form an upper part entity and a lower part entity; S5: model assembly and export: based on the connecting surface relationship of the upper part entity and the lower part entity, the upper part entity and the lower part entity are assembled and output in STEP format three-dimensional model.

2. The method of claim 1, wherein, In step S3, the closed line segment is generated into a surface by using an openCascade geometric engine, and the centroid coordinates of the surface are calculated.

3. The method of claim 1, wherein, In step S3, the way of judging whether the line belongs to the upper part or the lower part is that if the x coordinates of all the end points of the line are greater than the x coordinate of the midpoint, the line belongs to the upper part; if they are all less than the x coordinate of the midpoint, the line belongs to the lower part.

4. The method of claim 1, wherein, The step S4 further comprises, before performing the contour stretching operation, the bottom plate surface, the weld surface and the connecting surface need to be hole processing.

5. The method of claim 1, wherein, In step S4, the stretching direction of the weld surface is opposite to the stretching direction of the bottom plate surface and the connecting surface.

6. The method of claim 4, wherein, The specific operation of the hole processing is: For the bottom plate surface: Rule 1: for the bottom plate surface containing only a single layer of independent closed figure, directly stretch into shape without performing hole operation; Rule 2: for the bottom plate surface containing two nested closed figures, the area surrounded by the inner closed figure is removed as a whole, and the area between the outer and inner layers is reserved; For the weld surface and the connecting surface: Rule 1: for the connecting surface and the weld surface containing two nested closed figures, the area surrounded by the inner closed figure is removed as a whole, and the region between the outer and inner layers is reserved; Rule 2: for the connecting surface and the weld surface of multi-layer nested closed figures, take the adjacent two layers of closed figures as a group, remove the area surrounded by the innermost closed figure and the interlayer region between the adjacent two groups of closed figures.

7. The method of claim 1, wherein, In step S5, the specific content of the assembly of the upper part entity and the lower part entity is: (1) extracting the centroid pt1 and the normal vector normal1 of the upper part entity connecting surface face1, and the centroid pt2 and the normal vector normal2 of the lower part entity connecting surface face2, and taking the inverse of normal2 to make the two normal vectors consistent; (2) calculating the included angle by using the dot product of two same direction normal vectors, calling the OpenCASCADE interface to generate a rotation transformation matrix, virtually rotating face2 to obtain a target surface face3 and a centroid pt3; (3) calculating the three-axis translation components according to the coordinate difference between pt1 and pt3, and building a translation matrix; (4) extracting the rotation transformation matrix and the translation matrix completed by the aforementioned calculation, and performing global space transformation on the lower part entity.