A method and system for simplifying a three-dimensional model base body
By using an improved PointNet++ semantic segmentation network and dynamic precision mesh generation, combined with parametric primitive fitting, intelligent semantic parsing and automated simplification of 3D models are achieved. This solves the problems of blind simplification and insufficient fidelity in existing technologies, and improves the efficiency of virtual assembly simulation and the quality of model simplification.
Patent Information
- Application Number
- CN202511344305.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-09-19
AI Technical Summary
Existing 3D model simplification techniques lack semantic understanding, resulting in blind simplification, low processing efficiency, limited applicability, and insufficient fidelity of the simplified model. It is difficult to effectively reduce the amount of model data while ensuring the accuracy of verification.
An improved PointNet++ semantic segmentation network is constructed. Through semantic segmentation, clustering and component labeling, non-subject structures are removed, the bounding boxes of core subjects are calculated, dynamic precision meshing and semantic enhancement interference checks are performed, and a simplified model is generated by combining parametric primitive fitting and Boolean operations.
It achieves intelligent simplification based on semantic understanding, significantly reduces the amount of model data, improves the efficiency of virtual assembly simulation, ensures high-fidelity preservation and automated simplification of key features, and solves the problems of blindness and insufficient fidelity of traditional simplification methods.
Smart Images

Figure CN121236340B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of three-dimensional model simplification, and particularly relates to a three-dimensional model basic body simplification method and system. BACKGROUND
[0002] In the digital design process of large-scale equipment manufacturing industry, virtual assembly checking using high-precision three-dimensional models has become a key link to ensure product manufacturability. However, the models provided by equipment suppliers usually contain extremely complex internal structures and fine external features, resulting in a large amount of model data. When multiple such models are loaded simultaneously in a virtual environment for assembly interference checking, space planning and other applications, serious software performance bottlenecks will be caused, including loading failure, rendering lag and simulation interruption, which seriously restricts the efficiency and feasibility of design checking. Existing model simplification techniques mostly focus on geometric-level mesh simplification or feature suppression, lack semantic understanding of model functions, cannot intelligently distinguish between key assembly interfaces that need to be retained and internal structures that can be simplified, and are difficult to effectively reduce model data volume while ensuring checking accuracy.
[0003] The prior art has the problems of lack of semantic understanding leading to blind simplification, low processing efficiency, limited applicability and insufficient fidelity of the simplified model. SUMMARY
[0004] (I) Technical problems solved
[0005] To solve the problems in the related art, the application provides a three-dimensional model basic body simplification method and system to overcome the above technical problems existing in the prior art.
[0006] (II) Technical solutions
[0007] To solve the above technical problems, the application is implemented by the following technical solutions:
[0008] S1, a PointNet++ model is constructed, the PointNet++ model is improved, and a three-dimensional model semantic segmentation network is obtained;
[0009] S2, the semantic labels of the original three-dimensional model to be simplified are extracted by the three-dimensional model semantic segmentation network, and semantic clustering and componentization marking processing are performed to obtain a three-dimensional model with additional semantic labels;
[0010] S3, based on the three-dimensional model with additional semantic labels and a non-main body structure exclusion rule, the non-main body structure is removed, and a core main body bounding box is calculated;
[0011] S4, dynamic precision grid division is carried out based on the core main body bounding box, and interference checking is carried out in combination with the three-dimensional model with additional semantic labels to obtain a three-dimensional occupation matrix with semantic information;
[0012] S5, based on the three-dimensional occupation matrix with semantic information, a simplified model main body is obtained through region segmentation and basic body fitting operations;
[0013] S6, the key feature parts and the secondary feature parts with semantic labels are separated from the three-dimensional model with additional semantic labels, and are respectively introduced into the simplified model main body, and a final simplified model is obtained through global Boolean merging;
[0014] The improved PointNet++ semantic segmentation network is constructed to realize intelligent semantic analysis of the three-dimensional model, and then the non-main body structure is removed based on the semantic label and the core bounding box is generated; the three-dimensional occupation matrix is generated through dynamic precision grid division and semantic enhanced interference checking, and then the simplified main body is constructed through parameterized basic body fitting and Boolean operation, and finally the key features with semantic labels are precisely assembled with the main body; The application greatly reduces the model data amount and improves the virtual assembly simulation efficiency, realizes the high-fidelity reservation and automatic simplification of key features based on semantic understanding, and effectively solves the problems of blindness and insufficient fidelity of traditional simplification methods.
[0015] Preferably, the S1 comprises the following steps:
[0016] S11, constructing a PointNet++ model; based on the characteristics of the three-dimensional model, the PointNet++ model is improved to obtain an initial three-dimensional model semantic segmentation network;
[0017] S12, collecting historical industrial model samples; the historical industrial models are semantically labeled to obtain the historical industrial model samples with semantic labels;
[0018] S13, setting an accuracy threshold and a maximum number of training times; the initial three-dimensional model semantic segmentation network is repeatedly trained and the network parameters are adjusted using the historical industrial model samples with semantic labels; after each round of training, the similarity between the predicted results output by the initial three-dimensional model semantic segmentation network and the semantic label data in the historical industrial model sample data with semantic labels is calculated through a similarity calculation formula to obtain the model accuracy; when the model accuracy is greater than or equal to the accuracy threshold or the maximum number of training times is reached, the training is stopped, and a three-dimensional model semantic segmentation network is obtained;
[0019] The application obtains a deep learning network capable of accurately identifying semantic features of a three-dimensional model by constructing and improving a PointNet++ network structure, performing supervised training by using a labeled historical industrial model sample, and setting an accuracy threshold and an iteration number as a training termination condition; an automatic process from construction to training completion of a semantic segmentation model is realized, the accuracy and generalization ability of the network for semantic recognition of industrial components are effectively ensured, and a reliable semantic understanding foundation is provided for subsequent model simplification.
[0020] Preferably, the S11 comprises the following steps:
[0021] S111, in the Set Abstraction layer of the PointNet++ model, an attention mechanism is introduced;
[0022] S112, an input channel is added to the input layer of the PointNet++ model for transmitting a normal vector and a local curvature estimation value of each point, and the coordinate information is sent into the PointNet++ model together;
[0023] The application significantly enhances the perception ability of the model to subtle geometric features of an industrial model and the accuracy of component semantic classification by introducing an attention mechanism in the Set Abstraction layer and adding a normal vector and curvature channel to the input layer.
[0024] Preferably, the S2 comprises the following steps:
[0025] S21, converting an original three-dimensional model to be simplified into a triangular mesh model;
[0026] sampling point cloud from the mesh surface of the triangular mesh model to obtain model point cloud data; based on a local neighborhood of the point cloud, a unit normal vector and a local curvature estimation value of each point in the model point cloud data are calculated to obtain model point cloud data with additional features; the additional features are the unit normal vector and the local curvature estimation value;
[0027] S22, inputting the model point cloud data with additional features into a three-dimensional model semantic segmentation network to obtain a point cloud semantic probability matrix;
[0028] S23, using a clustering algorithm based on Euclidean distance and semantic label constraint to gather points with close spatial positions and the same label in the point cloud semantic probability matrix together to form a point cloud cluster, and obtaining a point cloud cluster set;
[0029] assigning a unique identifier and a refined semantic label to each point cloud cluster in the point cloud cluster set to obtain a three-dimensional model with additional semantic labels;
[0030] The application converts a CAD model into point cloud data with normal vectors and curvature characteristics, uses a trained semantic segmentation network for prediction, and finally converts semantic labels into physical structure identification at the component level through a clustering algorithm; the automatic analysis from a geometric model to semantic components is realized, an accurate semantic basis is provided for subsequent intelligent simplification, and the problem of feature misjudgment in traditional simplification methods is effectively avoided.
[0031] Preferably, the S3 comprises the following steps:
[0032] S31, coordinates of all vertices in the three-dimensional model with additional semantic labels are traversed, minimum and maximum values in X, Y and Z directions are found out respectively, and a global axial bounding box is obtained;
[0033] S32, a non-main structure exclusion rule is constructed; the non-main structure exclusion rule comprises exclusion structures, reserved structures and optional structures; the non-main structure in the three-dimensional model with additional semantic labels is excluded according to the non-main structure exclusion rule, and a main structure is obtained;
[0034] S33, coordinates of all vertices of the main structure are traversed, minimum and maximum values in X, Y and Z directions are found out respectively, and the global axial bounding box is taken as a reference to obtain a main bounding box;
[0035] The application establishes a space reference by calculating a global bounding box, intelligently identifies and excludes non-main components such as internal structures based on a preset semantic rule, and finally accurately extracts the space range of the core main body; the automatic extraction from a semantic model to a core structure is realized, the simplification process is focused on the main functional components, an accurate space basis is provided for subsequent fine processing, and the simplification efficiency and accuracy are significantly improved.
[0036] Preferably, the S4 comprises the following steps:
[0037] S41, a grid precision range is set, the grid precision range comprises a maximum precision and a minimum precision; the geometric complexity of the three-dimensional model with additional semantic labels in the core main bounding box is analyzed through voxel gradient analysis, and geometric complexity data is obtained;
[0038] A geometric complexity threshold is set; for the region with a geometric complexity data greater than or equal to the geometric complexity threshold, a minimum precision is used for fine division; for the region with a geometric complexity data less than the geometric complexity threshold, a maximum precision is used for rough division, and a three-dimensional grid with dynamic precision is obtained;
[0039] S42, an interference checking rule is set; according to the interference checking rule, the grid units in the three-dimensional grid with dynamic precision are traversed, and interference detection is performed on the original three-dimensional model to be simplified, and a three-dimensional placeholder matrix with semantic information is obtained;
[0040] The present application dynamically evaluates the geometric complexity of different regions through voxel gradient analysis, and accordingly adopts a grid division strategy with adaptive precision, and generates a three-dimensional occupancy matrix in combination with a semantic-driven interference checking rule; while ensuring high-precision expression of key feature regions, the overall calculation resource consumption is significantly reduced, the unification of refinement and efficiency is realized, and an optimal spatial data basis is provided for subsequent parameterized fitting.
[0041] Preferably, the S5 comprises the following steps:
[0042] S51, using a clustering algorithm, clustering the cells marked as occupied in the three-dimensional occupancy matrix with semantic information to obtain an occupancy region list;
[0043] S52, setting a basic body set; setting a fitting error threshold; for the occupancy regions in the occupancy region list, fitting through a single basic body of the basic body set to obtain a fitting error set; if the minimum fitting error in the fitting error set is ≤ the fitting error threshold, selecting the basic body with the minimum fitting error and calculating its optimal parameters; otherwise, segmenting the occupancy regions in the occupancy region list into a convex sub-region set, fitting the sub-regions in the convex sub-region set using the basic bodies in the basic body set, and calculating their optimal parameters to obtain a parameterized basic body scheme list;
[0044] S53, creating parameterized basic bodies based on the basic body schemes in the parameterized basic body scheme list to obtain a parameterized basic body set; globally performing Boolean merging on the basic bodies in the parameterized basic body set to obtain a model simplification main body;
[0045] The present application converts the three-dimensional occupancy matrix into continuous occupancy regions through a clustering algorithm, intelligently fits using parameterized basic bodies, automatically decomposes complex regions into convex sub-regions for segmented fitting, and finally merges into a simplified model main body through Boolean operation; the automatic conversion from discrete grid to parameterized CAD model is realized, the geometric feature is highly restored, the model data amount is greatly reduced, and the model simplification efficiency and quality are significantly improved.
[0046] Preferably, the S6 comprises the following steps:
[0047] S61, separating the feature components with semantic labels from the three-dimensional model with additional semantic labels to obtain a feature component set with semantic labels; finding the corresponding installation position of each feature component in the feature component set with semantic labels in the simplified model main body according to the semantic label to obtain an interface-main body positioning matching pair list;
[0048] For each matching pair in the interface-main body positioning matching pair list, assembling through a constraint assembly method in CAD assembly to obtain a temporary sub-assembly body;
[0049] S62, simplify the secondary feature part to obtain a simplified secondary feature part;
[0050] The simplified secondary feature part is placed on the temporary sub-assembly body according to the original coordinate position through rigid transformation to obtain a complete geometric assembly containing the main body, the accurate interface and the simplified secondary feature;
[0051] S63, all geometric entities in the complete geometric assembly containing the main body, the accurate interface and the simplified secondary feature are merged through global Boolean merging to obtain a final simplified model;
[0052] The application accurately constrains and assembles the key feature part and the simplified main body through semantic label matching, positions the secondary feature after lightweight processing, and finally generates an integrated simplified model through global Boolean operation; while ensuring the accuracy of the assembly interface and the integrity of the functional features, the model data is extremely simplified, the loading speed and the running efficiency of the large-scale virtual assembly scene are significantly improved, and the technical problem that the traditional simplification method cannot balance feature fidelity and model lightweight is completely solved.
[0053] A three-dimensional model basic body simplification system for implementing the above-mentioned three-dimensional model basic body simplification method, comprising an improved PointNet++ semantic segmentation network module, a three-dimensional model semantic analysis and partization module, a non-main body structure exclusion and core main body extraction module, a dynamic grid division and semantic interference checking module, a parameterized basic body fitting and simplified main body generation module, and a key feature reorganization and final model assembly module;
[0054] The improved PointNet++ semantic segmentation network module is used to construct and train an improved three-dimensional point cloud semantic segmentation network; by introducing an attention mechanism in the Set Abstraction layer of the original PointNet++ model, the perception ability of the model for small but key features in industrial models is enhanced; the channels of the input layer are expanded to incorporate geometric information such as point normal vectors and local curvatures, thereby improving the classification accuracy of functional features and assembly interfaces; the labeled historical industrial model samples are trained until the preset accuracy threshold or the maximum number of training times is reached, and a neural network capable of performing fine component-level semantic segmentation on three-dimensional models is obtained;
[0055] The 3D model semantic parsing and componentization module is used to convert the original 3D CAD model to be processed into a componentized model with semantic labels; convert the 3D model into a triangular mesh and sample to generate a point cloud, while calculating the normal vector and curvature of each point as additional features; use a trained semantic segmentation network to predict the point cloud and assign a semantic probability label to each point; use a clustering algorithm based on Euclidean distance and semantic labels to group points belonging to the same physical component and with the same label together to form independent point cloud clusters, and assign a unique identifier and refined semantic label to each component, thereby completing the semantic parsing and componentization labeling of the model;
[0056] The non-core structure exclusion and core subject extraction module is used to identify and exclude non-core structures from the labeled semantic model, accurately extract the main body of the model; calculate the global axial bounding box of the entire model; filter the components according to the preset non-core structure exclusion rules, calculate the main bounding box of the filtered main structure based on the vertex coordinates of the main structure, and verify its validity by comparing it with the global bounding box, thereby obtaining the bounding box representing the core subject of the model.
[0057] The dynamic mesh partitioning and semantic interference checking module generates a three-dimensional occupancy matrix with semantic information based on the core subject bounding box; according to the geometric complexity of different regions of the model, it dynamically uses meshes of different precision to partition the bounding box; according to the semantically driven interference checking rules, it traverses all mesh units to check their interference with various semantic components in the original model, and finally outputs a three-dimensional matrix that records the occupancy status and required precision of each mesh unit in detail.
[0058] The parameterized primitive fitting and simplified model generation module transforms the placeholder matrix into a simplified model body composed of parameterized primitives; it clusters adjacent units with the same state in the placeholder matrix into continuous placeholder regions; for each region, it attempts to fit it with a preset set of primitives; if the fitting error of a single primitive exceeds a threshold, it is divided into simpler convex sub-regions and then fitted separately; by creating all these parameterized primitives and performing a global Boolean merge operation on them, a simplified model body is generated.
[0059] The key feature recombination and final model assembly module recombines the separated key features with the simplified main body to generate the final model. It separates labeled key feature components and secondary feature components from the original semantic model. The key components are precisely installed onto the corresponding positions on the simplified main body using a constraint assembly method. For secondary features, lightweight processing such as mesh simplification is performed before placing them in approximately the correct positions through rigid transformation. A global Boolean merge is performed on all geometric entities to obtain a complete, unbiased, and watertight B-Rep format final simplified model.
[0060] (III) Beneficial Effects
[0061] The present application has the following beneficial effects:
[0062] The present application realizes intelligent semantic analysis of three-dimensional models by constructing an improved PointNet++ semantic segmentation network, and then removes non-main body structures and generates a core bounding box based on semantic labels; a three-dimensional occupancy matrix is generated by dynamic precision grid division and semantic enhanced interference checking, and then a simplified main body is constructed through parameterized basic body fitting and Boolean operation; finally, the key features with semantic labels are accurately fitted with the main body; the present application not only greatly reduces the model data volume and improves the virtual assembly simulation efficiency, but also realizes key feature high-fidelity preservation and automatic simplification based on semantic understanding, effectively solving the problems of blindness and insufficient fidelity of traditional simplification methods.
[0063] The present application realizes intelligent and semantic-driven model simplification; by introducing an improved PointNet++ network, the model can deeply understand the semantic information of the three-dimensional model, intelligently distinguish key assembly interfaces, functional features and removable internal structures; it overcomes the drawbacks of blind simplification and dependence on manual intervention of traditional methods, and realizes automatic and high-fidelity feature preservation and removal, ensuring the usability and accuracy of the simplified model in virtual assembly verification.
[0064] The present application significantly improves the processing efficiency and ensures the simplification quality; by using the strategy based on dynamic precision grid division and semantic interference checking, fine processing can be performed in areas with high geometric complexity, and coarse-grained processing can be performed in simple areas, thereby greatly reducing unnecessary computational load while ensuring high-precision restoration of key features, improving the efficiency of the overall simplification process. The final model is composed of parameterized basic bodies, with extremely small data volume, greatly relieving the loading and rendering pressure of large virtual scenes.
[0065] The present application has good generality and practicality; the present application does not depend on specific types of models, and the semantic segmentation network trained by machine learning can adapt to various industrial models; through the rule-driven processing flow (such as non-main body structure exclusion rules, interference checking rules), users can flexibly configure according to specific application scenarios, balance simplification intensity and feature fidelity, and make it widely applicable to digital design, virtual simulation, industrial meta-universe and other fields.
[0066] Of course, any product implementing the present application does not necessarily need to achieve all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0067] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can be obtained from these drawings without creative labor.
[0068] Figure 1 A flowchart of a three-dimensional model basic body simplification method of the application is shown in the figure.
[0069] Figure 2 A module diagram of a three-dimensional model basic body simplification system of the application is shown in the figure. DETAILED DESCRIPTION
[0070] The technical solutions in the embodiments of the application will be described clearly and completely in the following with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only some embodiments of the application, not all the embodiments. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.
[0071] In the description of the application, it should be understood that the terms "opening", "upper", "lower", "top", "middle", "inner" and the like indicate the orientation or positional relationship, which are only for the convenience of describing the application and simplifying the description, and do not indicate or imply that the indicated component or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the application.
[0072] Embodiment one:
[0073] Please refer to Figure 1 The application discloses a three-dimensional model basic body simplification method, comprising the following steps:
[0074] S1, constructing a PointNet++ model, improving the PointNet++ model to obtain a three-dimensional model semantic segmentation network;
[0075] The S1 comprises the following steps:
[0076] S11, constructing a PointNet++ model; improving the PointNet++ model based on three-dimensional model characteristics to obtain an initial three-dimensional model semantic segmentation network;
[0077] The S11 comprises the following steps:
[0078] S111, in the Set Abstraction layer of the PointNet++ model, an attention mechanism is introduced; by introducing the attention mechanism in the Set Abstraction layer, when grouping and extracting local features, the model can not only be based on geometric distance, but also be based on feature importance to adaptively weight the contributions of different points, which enables the PointNet++ model to pay more attention to points that are important for identifying key features such as small holes and edges. Specifically, by calculating the feature correlation between points within a group, the sampling weight is dynamically allocated, thereby enhancing the model's ability to perceive features of industrial models with large scale differences, especially the recall rate of small assembly interface features; solve the problem that the original model easily loses subtle features when identifying industrial models;
[0079] S112, increase the input channel of the input layer of the PointNet++ model to transmit the normal vector (nx, ny, nz) and the local curvature estimation value of each point, and input the coordinate information into the PointNet++ model together to obtain an initial three-dimensional model semantic segmentation network; this improvement enables the model to deeply integrate the geometric and morphological information of the model, significantly improving the classification accuracy of functional features (such as heat dissipation fins) and assembly interface features (such as flanges);
[0080] S12, collect historical industrial model samples; perform semantic labeling on the historical industrial models to obtain historical industrial model samples with semantic labeling;
[0081] S13, set an accuracy threshold and a maximum number of training times; use the historical industrial model samples with semantic labeling to repeatedly train and adjust the network parameters of the initial three-dimensional model semantic segmentation network; after each round of training, calculate the similarity between the predicted results output by the initial three-dimensional model semantic segmentation network and the semantic labeling data in the historical industrial model sample data with semantic labeling using a similarity calculation formula to obtain the model accuracy; when the model accuracy is greater than or equal to the accuracy threshold or the maximum number of training times is reached, stop training to obtain a three-dimensional model semantic segmentation network;
[0082] S2, extract the semantic labels of the original three-dimensional model to be simplified through the three-dimensional model semantic segmentation network, and perform semantic clustering and component labeling processing to obtain a three-dimensional model with additional semantic labels;
[0083] The S2 comprises the following steps:
[0084] S21, convert the BREP format of the original three-dimensional model (CAD model) to be simplified into a triangular mesh model through a CAD kernel interface (such as ACIS, Parasolid, OCC);
[0085] Poisson-Disk Sampling or uniform sampling algorithm is used to sample point cloud from the mesh surface of the triangular mesh model, to obtain model point cloud data P = {p1, p2,..., pN} with a generation number of N (usually N = 50000-200000), each point in the model point cloud data contains its three-dimensional coordinates; based on the local neighborhood of the point cloud, the principal component analysis (PCA) method is used to calculate the unit normal vector (nx, ny, nz) and the local curvature estimation value of each point in the model point cloud data, to obtain model point cloud data with additional features; the additional features are the unit normal vector and the local curvature estimation value;
[0086] S22, input the model point cloud data with additional features into a three-dimensional model semantic segmentation network to obtain a point cloud semantic probability matrix; the size of the point cloud semantic probability matrix is N x K, K is the total number of preset semantic categories (for example, K = 5, corresponding to: background, assembly interface, functional feature, thin-walled shell, internal structure);
[0087] Exemplarily, the point cloud semantic feature extraction step is as follows,
[0088] Uniformly sample N = 10000 points from the surface of the CAD model, each point containing coordinates, unit normal vector (nx, ny, nz) and local curvature estimation value;
[0089] In the SA Layer 1, input N = 10000 points, output M1 = 1024 center points, each point representing a local region, feature dimension C1 = 128; in the SA Layer 2, input 1024 points, output M2 = 256 center points, feature dimension C2 = 256; in the SA Layer 3, input 256 points, output M3 = 64 center points, feature dimension C3 = 512; (integrate the attention mechanism described above in each SA layer)
[0090] Up-sampling is performed through the feature propagation (FP) layer, and the global feature (C3 = 512) is gradually transmitted back to the original 10000 points;
[0091] The output is a K-dimensional probability vector for each point (K is the number of semantic categories, such as: background, assembly interface, heat dissipation feature, thin-walled shell, decorative part, etc.);
[0092] The semantic label of each point is obtained by argmax, thereby realizing fine part-level segmentation;
[0093] S23, using a clustering algorithm based on Euclidean distance and semantic label constraint (such as DBSCAN), the points with close spatial position and same label in the point cloud semantic probability matrix are gathered together to form independent point cloud clusters, each cluster represents an independent physical component, such as a specific bolt hole, a flange, a heat dissipation fin, and a point cloud cluster set is obtained;
[0094] A unique identifier and refined semantic label are assigned to each point cloud cluster in the point cloud cluster set to obtain a three-dimensional model with additional semantic labels;
[0095] S3, based on the three-dimensional model with additional semantic labels and the non-main structure exclusion rule, the non-main structure is removed, and a core main bounding box is calculated;
[0096] The S3 comprises the following steps:
[0097] S31, the coordinates of all vertices in the three-dimensional model with additional semantic labels are traversed to find the minimum and maximum values in X, Y and Z directions respectively, i.e. (Xmin, Ymin, Zmin) and (Xmax, Ymax, Zmax), and a global axial bounding box is obtained; the cuboid space defined by the two points is the global AABB box;
[0098] S32, a non-main structure exclusion rule is constructed; the non-main structure exclusion rule includes exclusion structures, retention structures and optional structures; the exclusion structures include internal structures, cables and fasteners that do not need to be retained (such as internal screws at non-interface positions); the retention structures include assembly interfaces (such as flanges and connectors), functional features (such as operation buttons and nameplates); the optional structures include decorative parts and heat dissipation fins (whether they are considered as part of the core main body can be determined according to user configuration); the non-main structure in the three-dimensional model with additional semantic labels is excluded according to the non-main structure exclusion rule to obtain a main structure;
[0099] S33, the coordinates of all vertices of the main structure are traversed to find the minimum and maximum values in X, Y and Z directions respectively, and the global axial bounding box is taken as a reference to obtain a main bounding box; the global axial bounding box is taken as a reference to determine whether the obtained main bounding box is within the global axial bounding box; when the main bounding box is not within the global axial bounding box, the global axial bounding box and the main bounding box are recalculated in S31 until the main bounding box is within the global axial bounding box;
[0100] S4, based on the core main bounding box, a dynamic precision grid division is performed, and a semantic enhanced interference check is performed in combination with the three-dimensional model with additional semantic labels to obtain a three-dimensional occupancy matrix with semantic information;
[0101] The S4 comprises the following steps:
[0102] S41. Set the mesh accuracy range, which includes the maximum accuracy and the minimum accuracy (e.g., minimum accuracy amin = 2mm, maximum accuracy amax = 20mm); obtain the geometric complexity data by analyzing the geometric complexity of the 3D model with added semantic labels within the bounding box of the core body through voxel gradient analysis.
[0103] Set a geometric complexity threshold; for regions in the geometric complexity data that are ≥ the geometric complexity threshold (such as near rounded corners or holes), use the minimum precision for fine subdivision; for regions in the geometric complexity data that are < the geometric complexity threshold (flat or simple regions), use the maximum precision for coarse subdivision, resulting in a three-dimensional mesh with dynamic precision.
[0104] S42. Set interference check rules; the interference check rules include: if the unit only interferes with the internal structure label component, it is directly marked as "unoccupied" (achieving complete removal of the internal structure); if the unit interferes with the assembly interface label component, it is marked as "high-precision occupied" and its precision parameter is increased to the minimum precision for more refined fitting later; if the unit interferes with the thin-walled shell label component, it is marked as "occupied".
[0105] According to the interferometric inspection rules, the grid cells in the dynamic precision 3D grid are traversed to perform interferometric detection on the original 3D model to be simplified, and a 3D occupancy matrix with semantic information is obtained.
[0106] S5. Based on the three-dimensional occupancy matrix with attached semantic information, a simplified model body is obtained through region segmentation and basic volume fitting operations.
[0107] S5 includes the following steps:
[0108] S51. Using a clustering algorithm (such as connected component analysis), the cells marked as occupied in the three-dimensional occupancy matrix with semantic information are clustered to obtain a list of occupancy regions. Specifically, a three-dimensional mesh is created, whose cell values correspond to the "occupancy status" values of the input occupancy matrix. Using a 26-neighborhood (3D) based connected component analysis algorithm, all cells marked as "occupied (1)" and "high-precision occupancy (2)" are traversed. The algorithm groups spatially adjacent cells with the same state value into connected regions. For each connected region, the system records the index of all its cells, its unified state label (1 or 2), and the preliminary spatial range calculated based on its cell position. A list of occupancy regions is obtained. Each entry in the list represents a continuous three-dimensional region that needs to be simplified to one or more basic units, and includes its spatial range and the required processing precision label. This is the first step in transforming discrete mesh cells into meaningful "parts".
[0109] S52, set a basic body set; the basic body set includes a cuboid, a cylinder, a circular truncated cone (including a circular cone) body, a circular ring body, a fan ring body, a sphere, a spherical cap body; set a fitting error threshold; for the placeholder region in the placeholder region list, fitting is performed by a single basic body in the basic body set to obtain a fitting error set; if the minimum fitting error in the fitting error set is less than or equal to the fitting error threshold, the basic body with the minimum fitting error is selected, and the optimal parameters thereof are calculated; otherwise, the placeholder region in the placeholder region list is segmented into a convex sub-region set, a basic body in the basic body set is used to fit the sub-regions in the convex sub-region set, and the optimal parameters thereof are calculated to obtain a parameterized basic body scheme list; specifically, for a simple region, a single basic body (a cuboid, a cylinder, a sphere, etc.) is used to fit the point cloud; by calculating the principal component, the minimum bounding box, the symmetry and other geometric features of the point cloud, a basic body type with the minimum fitting error is selected, and the optimal parameters (such as the length, width, height and pose of the cuboid, the radius, height and axis direction of the cylinder) are calculated;
[0110] For a complex region, if the fitting error of a single basic body exceeds the threshold, a decomposition process is started; a plane cutting, an iterative PCA or other shape decomposition algorithm is used to try to segment the complex region into several simpler convex sub-regions, and then basic body fitting is independently performed on each sub-region; the system records the Boolean operation relationship between the basic bodies of the sub-regions;
[0111] S53, based on the basic body scheme in the parameterized basic body scheme list, a parameterized basic body is created by using a CAD kernel API (such as ACIS or Parasolid) to obtain a parameterized basic body set; the basic bodies in the parameterized basic body set are globally Boolean-merged to obtain a model simplification main body;
[0112] S6, separate the key feature components and the secondary feature components with semantic labels from the three-dimensional model with the semantic labels, respectively import the simplified model main body, and obtain a final simplified model by global Boolean merging;
[0113] The S6 includes the following steps:
[0114] S61, separate the feature components with semantic labels from the three-dimensional model with the semantic labels to obtain a feature component set with semantic labels; find the corresponding installation position of each feature component in the feature component set with semantic labels in the simplified model main body according to the semantic label to obtain an interface-main body positioning matching pair list; the corresponding relationship is uniquely determined by the semantic label in S100 (for example, a cylindrical boss fitted on the simplified main body, and the label may be flange-001 derived from the assembly interface)
[0115] For each matching pair in the interface-body positioning matching pair list, a temporary sub-assembly is obtained by assembling through the constraint assembly method in the CAD assembly; for example, align the bolt hole axis of the flange plate with the axis of the corresponding hole on the body, and fit the end face of the flange plate with the mounting surface of the body; this ensures that the assembly relationship between the interface component and the body is completely consistent with the original design without any deviation;
[0116] S62, the secondary feature components are simplified to obtain simplified secondary feature components; the simplification process is to traverse the functional features, decorative parts and other types of components, without basic body replacement, but mesh simplification or lightweight CAD processing; (such as edge collapse, detail removal) reduce the number of faces and data volume while retaining the overall shape and position to the maximum extent; for example, the small fillet on the heat dissipation fin is simplified to a right angle, reducing unnecessary surface segmentation number;
[0117] The simplified secondary feature components are placed on the temporary sub-assembly according to their original coordinate positions through rigid transformation (translation and rotation) (since these features do not have high assembly accuracy requirements, complex constraint assembly is not required, only the position and orientation need to be roughly correct), to obtain a complete geometric assembly containing the main body, accurate interface and simplified secondary features;
[0118] S63, all geometric entities in the complete geometric assembly containing the main body, accurate interface and simplified secondary features are merged through global Boolean merging to obtain a single watertight B-Rep final simplified model.
[0119] Example two:
[0120] Please refer to Figure 2 A three-dimensional model basic body simplification system for implementing the above-mentioned three-dimensional model basic body simplification method, including an improved PointNet++ semantic segmentation network module, a three-dimensional model semantic analysis and componentization module, a non-main body structure exclusion and core main body extraction module, a dynamic mesh division and semantic interference checking module, a parameterized basic body fitting and simplified main body generation module, and a key feature reorganization and final model assembly module.
[0121] The improved PointNet++ semantic segmentation network module is used to construct and train an improved three-dimensional point cloud semantic segmentation network; an attention mechanism is introduced in the Set Abstraction layer of the original PointNet++ model to enhance the perception ability of the model to the tiny but key features in the industrial model; the channels of the input layer are expanded to integrate geometric information such as point normal vectors and local curvatures, thereby improving the classification accuracy of functional features and assembly interfaces; the neural network capable of performing fine component-level semantic segmentation on three-dimensional models is obtained by training the labeled historical industrial model samples until the preset accuracy threshold or the maximum number of training times is reached;
[0122] The three-dimensional model semantic analysis and componentization module is used to convert the original three-dimensional CAD model to be processed into a componentized model with semantic labels; the three-dimensional model is converted into a triangular mesh and sampled to generate a point cloud, and the normal vector and curvature of each point are calculated as additional features; the trained semantic segmentation network is used to predict the point cloud, and each point is assigned a semantic probability label; a clustering algorithm based on Euclidean distance and semantic labels is used to gather points belonging to the same physical component and having the same label to form independent point cloud clusters, and a unique identifier and refined semantic label are assigned to each component, thereby completing the semantic analysis and componentization labeling of the model;
[0123] The non-main structure exclusion and core body extraction module is used to identify and exclude non-core structures from the labeled semantic model, and accurately extract the main part of the model; the global axial bounding box of the entire model is calculated; the components are filtered according to the preset non-main structure exclusion rules, and the main body bounding box is calculated based on the vertex coordinates of the filtered main structure, and verified by comparison with the global bounding box to ensure its effectiveness, thereby obtaining the bounding box representing the core body of the model;
[0124] The dynamic grid division and semantic interference checking module generates a three-dimensional occupancy matrix with semantic information based on the core body bounding box; different precision grids are dynamically used to divide the bounding box according to the geometric complexity of different regions of the model; all grid cells are traversed according to the semantic-driven interference checking rules to check their interference with various semantic components in the original model, and finally a three-dimensional matrix recording the occupancy state and required precision of each grid cell is output;
[0125] The parameterized primitive fitting and simplified body generation module converts the occupancy matrix into a simplified model body composed of parameterized primitives; clusters the adjacent cells with the same state in the occupancy matrix into continuous occupancy regions; for each region, attempts to fit the pre-set primitive set, if the single primitive fitting error exceeds the threshold, divides it into simpler convex sub-regions and then fits them respectively; creates all these parameterized primitives and performs global Boolean merge operation to generate the simplified model body;
[0126] The key feature recombination and final model assembly module recombines the separated key features and the simplified body to generate the final model; separates the labeled key feature components and the secondary feature components from the original semantic model; accurately installs the key components to the corresponding positions on the simplified body through the constraint assembly method; for the secondary features, performs lightweight processing such as mesh simplification and then places them to the approximately correct positions through rigid transformation; performs global Boolean merge on all geometric entities to obtain a complete, unbiased, watertight B-Rep format final simplified model.
[0127] In the description of the present specification, the description referring to the terms "one embodiment", "an example", "a specific example" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the invention. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0128] The above disclosed preferred embodiments of the invention are only used to help explain the invention. The preferred embodiments do not describe all the details and limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of the present specification. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the invention, so that those skilled in the art can well understand and utilize the invention.
Claims
1. A method of simplifying a three-dimensional model primitive, characterized by, Comprise the following steps: S1, constructing PointNet++ model, improving PointNet++ model, obtaining three-dimensional model semantic segmentation network; S2, extracting the semantic label of the original three-dimensional model to be simplified through the three-dimensional model semantic segmentation network, and performing semantic clustering and component marking processing to obtain a three-dimensional model with additional semantic labels; S3, removing non-main body structures based on the three-dimensional model with additional semantic labels and the non-main body structure exclusion rule, and calculating a core main body bounding box; The S3 comprises the following steps: S31, traversing the coordinates of all vertices in the three-dimensional model with additional semantic labels, finding the minimum and maximum values in X, Y and Z directions respectively, and obtaining a global axial bounding box; S32, constructing a non-main body structure exclusion rule; the non-main body structure exclusion rule includes exclusion structure, reserved structure and optional structure; according to the non-main body structure exclusion rule, the non-main body structure in the three-dimensional model with additional semantic labels is excluded to obtain a main body structure; S33, traversing the coordinates of all vertices of the main body structure, finding the minimum and maximum values in X, Y and Z directions respectively, and taking the global axial bounding box as a reference to obtain a main body bounding box; S4, performing dynamic precision grid division based on the core main body bounding box, and combining the three-dimensional model with additional semantic labels to perform semantic enhanced interference checking to obtain a three-dimensional occupancy matrix with semantic information; The S4 comprises the following steps: S41, setting a grid precision range, the grid precision range including maximum precision and minimum precision; the geometric complexity data is obtained by voxel gradient analysis of the geometric complexity of the three-dimensional model with additional semantic labels in the core main body bounding box; Set a geometric complexity threshold; for the region with ≥ geometric complexity threshold in the geometric complexity data, fine division is performed with minimum precision; for the region with < geometric complexity threshold in the geometric complexity data, coarse division is performed with maximum precision to obtain a three-dimensional grid with dynamic precision; S42, setting an interference checking rule; according to the interference checking rule, traversing the grid units in the three-dimensional grid with dynamic precision, performing interference detection on the original three-dimensional model to be simplified to obtain a three-dimensional occupancy matrix with semantic information; S5, based on the three-dimensional occupancy matrix with semantic information, through region segmentation and basic body fitting operation, obtaining a simplified model main body; S6, separating the key feature components and secondary feature components with semantic labels from the three-dimensional model with additional semantic labels, respectively importing the simplified model main body, and obtaining a final simplified model through global Boolean merging.
2. The method of claim 1, wherein The S1 comprises the following steps: S11, constructing PointNet++ model; based on three-dimensional model features, improving PointNet++ model to obtain an initial three-dimensional model semantic segmentation network; S12, collecting historical industrial model samples; performing semantic annotation on the historical industrial models to obtain historical industrial model samples with semantic annotation; S13, set an accuracy threshold and a maximum number of training times; repeatedly train the initial three-dimensional model semantic segmentation network using the historical industrial model samples with semantic labels and adjust the network parameters; after each round of training, calculate the similarity between the predicted results output by the initial three-dimensional model semantic segmentation network and the semantic label data in the historical industrial model samples with semantic labels by a similarity calculation formula to obtain the model accuracy; when the model accuracy is greater than or equal to the accuracy threshold or the maximum number of training times is reached, stop training to obtain the three-dimensional model semantic segmentation network.
3. The method of claim 2, wherein The S11 comprises the following steps: S111, introducing an attention mechanism in a Set Abstraction layer of a PointNet++ model; S112, increasing an input channel in an input layer of the PointNet++ model to transmit a normal vector and a local curvature estimation value of each point, and feeding the coordinate information and the normal vector and the local curvature estimation value into the PointNet++ model.
4. The method of claim 1, wherein The S2 comprises the following steps: S21, converting the original three-dimensional model to be simplified into a triangular mesh model; sampling point cloud from the mesh surface of the triangular mesh model to obtain model point cloud data; based on a local neighborhood of the point cloud, calculating a unit normal vector and a local curvature estimation value of each point in the model point cloud data to obtain model point cloud data with additional features; the additional features are the unit normal vector and the local curvature estimation value; S22, inputting the model point cloud data with additional features into the three-dimensional model semantic segmentation network to obtain a point cloud semantic probability matrix; S23, using a clustering algorithm based on Euclidean distance and semantic label constraints to gather points with similar spatial positions and the same label in the point cloud semantic probability matrix together to form a point cloud cluster to obtain a point cloud cluster set; assigning a unique identifier and a refined semantic label to each point cloud cluster in the point cloud cluster set to obtain a three-dimensional model with additional semantic labels.
5. The method of claim 1, wherein The S5 comprises the following steps: S51, using a clustering algorithm to cluster the cells marked as occupied in the three-dimensional placeholder matrix with semantic information to obtain an occupied area list; S52, setting a basic body set; setting a fitting error threshold; for the occupied areas in the occupied area list, fitting a single basic body in the basic body set to obtain a fitting error set; if the minimum fitting error in the fitting error set is less than or equal to the fitting error threshold, selecting the basic body with the minimum fitting error and calculating its optimal parameters; otherwise, segmenting the occupied areas in the occupied area list into a convex sub-region set, fitting the sub-regions in the convex sub-region set using the basic bodies in the basic body set and calculating their optimal parameters to obtain a parameterized basic body scheme list; S53, creating parameterized basic bodies based on the basic body schemes in the parameterized basic body scheme list to obtain a parameterized basic body set; globally merging the basic bodies in the parameterized basic body set to obtain a model simplification main body.
6. The method of claim 1, wherein The S6 comprises the following steps: S61, separate the feature components with semantic labels from the three-dimensional model with additional semantic labels to obtain a set of feature components with semantic labels; find the corresponding installation position of each feature component in the set of feature components with semantic labels in the simplified model body according to the semantic label to obtain a list of interface-body positioning matching pairs; For each matching pair in the list of interface-body positioning matching pairs, assemble by the constraint assembly method in CAD assembly to obtain a temporary sub-assembly; S62, simplify the secondary feature components to obtain simplified secondary feature components; Place the simplified secondary feature components on the temporary sub-assembly according to the original coordinate position by rigid transformation to obtain a complete geometric assembly containing the main body, accurate interfaces and simplified secondary features; S63, merge all geometric entities in the complete geometric assembly containing the main body, accurate interfaces and simplified secondary features by global Boolean merging to obtain a final simplified model.
7. A system for simplifying a three-dimensional model primitive, the system comprising: A three-dimensional model basic body simplification method as claimed in any one of claims 1-6 is implemented, and the system comprises an improved PointNet++ semantic segmentation network module, a three-dimensional model semantic analysis and componentization module, a non-main body structure exclusion and core main body extraction module, a dynamic grid division and semantic interference checking module, a parameterized basic body fitting and simplified main body generation module, and a key feature reorganization and final model assembly module.
8. A storage medium, characterized by A program is stored thereon, and when the program is executed by a processor, a three-dimensional model basic body simplification method as claimed in any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Three-dimensional building model simplification method based on structure perception point cloud semantic segmentation
CN117523134A
Building three-dimensional model lightweight design method and system based on artificial intelligence
CN120429937A