Industrial model-oriented derivation method and electronic device
Patent Information
- Application Number
- CN202611101283.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-27
AI Technical Summary
1.重复B-Rep网格化导致处理效率低:批量处理或高频交互场景中,同一CAD文件可能被多次解析和网格化,造成大量重复I/O和计算开销
[0018]与现有技术相比,本发明具有以下有益效果:本发明通过引入三元特征哈希键与缓存机制,有效避免了重复B-Rep网格化,显著提升了批量处理效率。采用确定性点云生成策略,消除了采样随机性,确保了输入基准一致与结果高度复现。通过姿态归一化变换矩阵同步处理原始B-Rep实体,输出归一化STEP模型,实现了点云与几何数据的统一闭环。本发明解决了现有技术中效率低、复现性差及多模态输出不一致的问题。
Smart Images

Figure CN122990100A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model export technology, and in particular to a method and electronic device for exporting industrial models. Background Technology
[0002] In batch processing of industrial CAD models, 3D vision recognition, reverse engineering, and industrial AI data preprocessing, it is usually necessary to first convert 3D models such as STEP, STL, PLY, and OBJ into point clouds or meshes before performing pose normalization, quality inspection, or downstream recognition tasks. Existing systems often use geometric kernels such as OpenCASCADE for B-Rep parsing and meshing, and then generate fixed-scale point clouds through random sampling, uniform sampling, FPS sampling, or other point cloud sampling methods.
[0003] After normalization, the common outputs are point cloud files, transformation matrices, or rendered images. However, in industrial CAD scenarios, point clouds, meshes, B-Rep geometry, and visualization verification results are often generated independently by different toolchains, lacking a unified data loop.
[0004] The existing technology has the following drawbacks: 1. Repeated B-Rep meshing leads to low processing efficiency: In batch processing or high-frequency interaction scenarios, the same CAD file may be parsed and meshed multiple times, resulting in a large amount of repeated I / O and computational overhead.
[0005] 2. Randomness of sampling strategy leads to inconsistency in input baseline: Random sampling or conventional FPS sampling is affected by the selection of initial points, input order and device environment. Multiple runs of the same model may generate different point clouds, thus affecting the reproducibility of normalization results.
[0006] 3. Inconsistent multimodal output: Outputting only point clouds or matrices cannot guarantee that the original STEP geometry and the point cloud normalization results are synchronized, which affects the use of subsequent CAD processes, reverse engineering and industrial AI systems. Summary of the Invention
[0007] To address the problems existing in the prior art, the present invention aims to provide an export method and electronic device for industrial models that can reduce repetitive B-Rep meshing and I / O overhead.
[0008] To achieve the above objectives, the first objective of this invention is to provide a method for deriving industrial models, comprising: Obtain the original 3D model and configuration parameters; Geometric data is obtained by parsing the original 3D model, and ternary feature hash keys are generated for the original 3D model; If the cache pool does not have a ternary feature hash key, then the original 3D model is meshed to obtain a triangular mesh representation; Deterministic point cloud data is generated based on triangular mesh representation; The pose normalization of the deterministic point cloud data is calculated to obtain the transformation matrix; Using a transformation matrix, deterministic point cloud data is processed and written into a 3D model file, and the original B-Rep parametric geometric entities are transformed to generate a normalized STEP model.
[0009] As a further improvement of the present invention, the geometric data includes: parameterized geometric information and discrete data. The step of parsing the original 3D model to obtain the geometric data and generating a ternary feature hash key for the original 3D model includes: If the original 3D model is a solid model file, the parametric geometric information of the original 3D model can be obtained by parsing. If the original 3D model is a discrete format file, the discrete data of the original 3D model can be read. The absolute file path, gridded precision identifier, and source file modification timestamp are concatenated and then hashed to generate a ternary feature hash key.
[0010] As a further improvement of the present invention, if a ternary feature hash key exists in the cache pool, the triangular mesh can be read directly from the cache pool based on the ternary feature hash key.
[0011] As a further improvement of the present invention, the step of performing meshing calculation on the three-dimensional model to obtain a triangular mesh representation includes: For the solid model file, iterate through all the topological surfaces in B-Rep; Mesh parameters are set based on the local curvature of each topological surface; Discretize the meshing parameters into triangular patches and extract the node coordinates and triangular patch indices after local transformation; Merge the triangular meshes of all topological surfaces into a complete triangular mesh model; For discrete format files, vertex coordinates and face data are directly read as triangular meshes.
[0012] As a further improvement of the present invention, the step of generating deterministic point cloud data based on triangular mesh representation includes: Calculate the spatial bounding box of the original 3D model based on all vertex coordinates; Based on configuration parameters, the spatial bounding box is divided into uniform voxel units; The geometric center coordinates of the effective voxel units are calculated as candidate points to form a candidate point cloud; Perform fixed pseudo-random seed sampling on the candidate point cloud until the number of sampling points reaches the target number; Deterministic point cloud data is generated based on the sampling points.
[0013] As a further improvement of the present invention, if voxelization fails or the number of candidate points is insufficient, it further includes: Revert to the original vertices represented by the triangular mesh; Perform proportional fixed seed sampling on the original vertices to ensure that the number of output sampling points reaches the target number.
[0014] As a further improvement of the present invention, the step of performing pose normalization calculation on deterministic point cloud data to obtain a transformation matrix includes: Search for the Z-axis direction of deterministic point cloud data; Based on the Z-axis direction, the X-axis and Y-axis directions of the deterministic point cloud data are determined. A rotation matrix is constructed using the three orthogonal axes X, Y, and Z. The columns of the rotation matrix are the new X-axis, Y-axis, and Z-axis directions. Calculate the translation vector based on the X-axis direction, Y-axis direction, the bottom position of the original 3D model, and the centroid of the model; The transformation matrix is obtained by combining the rotation matrix and the translation vector.
[0015] As a further improvement of the present invention, the steps of processing deterministic point cloud data using a transformation matrix and writing it into a 3D model file, transforming the original B-Rep parametric geometric entities, and generating a normalized STEP model include: Using a transformation matrix, a mathematical transformation is performed on each point in the deterministic point cloud data to obtain a normalized point cloud. Write the normalized point cloud into the 3D model file; The transformation matrix is applied to the original B-Rep parametric geometry to generate a normalized STEP model.
[0016] As a further improvement of the present invention, the present invention also includes: The original 3D model and the normalized STEP model are displayed in dual views.
[0017] A second objective of this invention is to provide an electronic device, characterized in that it includes a processor, a communication interface, a memory, and a network communication component, wherein the processor, the communication interface, and the memory communicate with each other through the network communication component; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the above-described export method.
[0018] Compared with existing technologies, this invention has the following advantages: By introducing a ternary feature hash key and a caching mechanism, this invention effectively avoids repeated B-Rep meshing, significantly improving batch processing efficiency. It employs a deterministic point cloud generation strategy, eliminating sampling randomness and ensuring consistent input baselines and highly reproducible results. By synchronously processing the original B-Rep entities through a pose normalization transformation matrix, a normalized STEP model is output, achieving a unified closed loop between point cloud and geometric data. This invention solves the problems of low efficiency, poor reproducibility, and inconsistent multimodal outputs in existing technologies. Attached Figure Description
[0019] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0020] Figure 1 This is a flowchart of the RANSAC-free point cloud registration method described in this invention. Detailed Implementation
[0021] To make the technical problems solved by the present invention, the technical solutions adopted, and the technical effects achieved clearer, the technical solutions of the embodiments of the present invention will be further described in detail below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] This invention discloses a method for deriving industrial models, such as... Figure 1 As shown, it includes: S1. Obtain the original 3D model and configure parameters; the file types of the original 3D model include: STEP / STP, STL, PLY, OBJ, and the configuration parameters include: number of sampling points, voxel size, meshing accuracy, and skewness power.
[0023] Target_num_points: The number of target points in the final output deterministic point cloud, such as 2048 or 4096. Voxel size (voxel_size): The cell size when building a voxel mesh, for example, 0.005m; Mesh precision: Parameters such as chord height and angle during B-Rep meshing determine the fineness of the triangular mesh; Skewness power: The power parameter used in attitude normalization to determine the sign of skewness, which controls the sensitivity of determining the major axis direction.
[0024] Meshing accuracy determines the LRU cache key and mesh quality; voxel size determines the granularity of spatial adaptive voxelization; the number of sampling points determines the target scale of FPS downsampling; skewness power participates in the sign determination of the major axis direction in the XY plane.
[0025] S2. Analyze the original 3D model to obtain geometric data, and generate ternary feature hash keys for the original 3D model.
[0026] If the original 3D model is a solid model file, i.e., a STEP / STP file, a geometric kernel such as OpenCASCADE is used to parse the B-Rep topology shape to obtain parametric geometric information such as faces, edges, and vertices of the original 3D model. This B-Rep topology shape is the input for subsequent incremental meshing and is used to generate a triangular mesh representation.
[0027] If the original 3D model is a discrete file format, such as TL, PLY, or OBJ, its vertex coordinates, triangle patch indices, or point cloud data can be directly read. This discrete data can be directly used for voxelization or as a vertex set during degenerate backsampling.
[0028] The absolute file path, gridding precision identifier, and source file modification timestamp are concatenated and then hashed to generate a ternary feature hash key. The absolute file path identifies the source file; the gridding precision identifier records the precision parameter used for this gridding (e.g., the string "precision_0.01"), with different precisions generating different grids; and the source file modification timestamp records the file's last modification time (e.g., a Unix timestamp or an ISO format time string).
[0029] The specific generation method of the ternary feature hash key is as follows: Concatenate the above three fields with a delimiter (such as "|") to form a string key_string = file_path + "|" + precision_tag + "|" + mtime, and then hash the string using MD5 or SHA-1 to obtain a fixed-length cache key. This cache key uniquely identifies a set of grid data with a specific file, a specific precision, and a specific version.
[0030] S3. If the cache pool does not have a ternary feature hash key, then perform meshing calculation on the original 3D model to obtain a triangular mesh representation.
[0031] First, check if a triangular mesh representation exists in the globally limited capacity LRU cache pool that perfectly matches the current input file, meshing precision, and file modification time. If a match is found, directly read the vertices and faces of the triangular mesh from the cache, skipping B-Rep parsing and meshing.
[0032] The cache hit condition is: a key that is completely consistent with the ternary feature hash key generated in step S2 already exists in the cache pool, and the cache entry corresponding to the key has not been evicted by the LRU policy.
[0033] If the target is missed: For the solid model file, iterate through all topological faces (TopoDS_Face) in B-Rep; for each topological face, set meshing parameters (such as chord height, maximum side length) according to its local curvature; discretize the meshing parameters into triangular patches, and extract the node coordinates (vertices) and triangular face indices (faces) after local transformation; merge the triangular meshes of all topological faces into a complete triangular mesh model.
[0034] For discrete format files, vertex coordinates and face data are directly read as triangular meshes.
[0035] The newly generated triangular meshes (vertices and faces) and their corresponding ternary feature hash keys are stored in the LRU cache pool. When the cache pool capacity exceeds a preset threshold (e.g., storing 100 model meshes), old items are discarded according to the least recently used principle to make room for new items.
[0036] This approach eliminates repetitive B-Rep meshing calculations in batch or high-frequency requests; ensures consistency between cached data and source file status; and supports pose calculation, sampling, and visualization modules sharing the same underlying mesh. It reduces repetitive I / O and meshing time; improves system interaction response speed; and avoids errors caused by using outdated mesh data.
[0037] S4. Generate deterministic point cloud data based on triangular mesh representation.
[0038] In one implementation method, step S4 includes: S41. Calculate the axis-aligned bounding box (AABB) of the original 3D model based on all vertex coordinates: x_min = min(x_i), x_max = max(x_i) y_min = min(y_i), y_max = max(y_i) z_min = min(z_i), z_max = max(z_i) The length, width, and height of the bounding box are Lx = x_max - x_min, Ly = y_max - y_min, and Lz = z_max - z_min, respectively.
[0039] S42. Based on configuration parameters, the spatial bounding box is divided into uniform voxel units. Specifically, a spatial adaptive voxel mesh is constructed based on the original 3D model and the preset voxel size. The adaptive rule is as follows: with AABB as the range, a uniform mesh is divided along the x, y, and z directions with the voxel size voxel_size as the step size; if the model size is smaller than voxel_size in a certain direction, at least one voxel layer is retained in that direction to avoid the voxelization result being empty.
[0040] S43. Calculate the geometric center coordinates of the effective voxel elements as candidate points to form a candidate point cloud. In this process, the effective voxel elements must first be determined. For each voxel element, determine whether it intersects with or contains a vertex of the triangular mesh. If it intersects or contains a vertex, mark the voxel as an effective voxel. Then, calculate the geometric center coordinates of the effective voxel elements as candidate points. All effective voxel centers constitute the candidate point cloud, which is uniformly distributed in macroscopic space and unaffected by the uneven density of the original mesh.
[0041] S45. Perform fixed pseudo-random seed sampling on the candidate point cloud until the number of sampling points reaches the target number.
[0042] If the number of candidate points exceeds the target number of sampling points, the Farthest Point Sampling (FPS) algorithm with a fixed pseudo-random seed (e.g., seed=42) is used for downsampling: First, the first point is randomly (pseudo-randomly) selected as the sampling starting point. Each time, the point farthest from the selected point set is added to the sampling set. Then, the sampling is repeated until the number of sampling points reaches the target number target_num_points. Because the seed is fixed, the point clouds generated by the same model on different devices and with different call frequencies are completely consistent.
[0043] If voxelization fails (e.g., due to extremely small model size or thin-walled components resulting in an empty effective voxel set) or the number of candidate points is insufficient (less than a certain percentage of target_num_points, such as 50%), a degradation mechanism is triggered: the vertex set of the original triangular mesh is reverted (for STEP / STP, the vertices after B-Rep meshing; for STL / PLY / OBJ, the original vertices of the file), and the farthest sampling point of the fixed seed is sampled proportionally to these original vertices so that the number of output points reaches the target number target_num_points; S46. Generate deterministic point cloud data based on the sampling points. The deterministic point cloud data is a set of point clouds with a constant number of points equal to the target number target_num_points and consistent across devices.
[0044] S47. Write a fallback flag (such as "fallback_to_raw_vertices: true") in the processing log to facilitate subsequent tracing.
[0045] Step S4 constructs a spatially adaptive voxel mesh based on the model bounding box and voxel parameters; extracts effective voxel centers as uniform candidate point clouds; when the number of candidate points is too large, a fixed pseudo-random seed FPS algorithm is used for downsampling; the output is a point cloud with a constant number of points, uniform spatial distribution, and consistent across runs. Voxelization weakens the impact of uneven original mesh density on point cloud distribution; fixed-seed FPS eliminates the randomness of initial sampling points in traditional sampling; and provides a consistent input benchmark for the pose normalization algorithm. The input point cloud remains consistent for the same model under any device and any call frequency; it improves the stability evaluation and traceability of engineering deployment; and reduces the fluctuation of normalization results caused by sampling strategies.
[0046] The rollback mechanism ensures that thin-walled parts, gasket parts, and extremely small-sized models can still enter the subsequent normalization process; avoids execution interruption due to voxelization failure; enhances the robustness of industrial model library processing and expands the range of models applicable to the export method; improves batch processing continuity; and reduces manual intervention and rework costs.
[0047] S5. Perform pose normalization calculation on the deterministic point cloud data to obtain the transformation matrix; In one implementation method, step S5 includes: S51. Search for the Z-axis direction of deterministic point cloud data through a physically stable surface. The specific criteria are: find a stable support surface that is horizontally downward (with a normal vector close to the -world_z direction) as the bottom surface, so that the surface faces downward when the model is placed naturally under the action of gravity; the bottom surface must meet the following conditions: large enough area, horizontal orientation, and located at the lowest point of the model.
[0048] S52. Based on the Z-axis direction, determine the X-axis and Y-axis directions of the deterministic point cloud data. Specifically, after projecting the point cloud onto the XY plane, calculate its minimum area bounding rectangle (MABR) or principal component direction. Use the longest axis direction as the candidate X-axis direction. Use statistical skewness to determine the sign: calculate the skewness values of the point cloud in the X-axis and Y-axis directions, and adjust them in combination with the skewness power parameter so that the positive X-axis direction points to the side where the model quality distribution is more concentrated. The Y-axis direction is determined by the Z-axis and X-axis through the right-hand rule.
[0049] S53. A rotation matrix R is constructed using the three orthogonal axes S, Y, and Z. The columns of the rotation matrix R are the new X-axis, Y-axis, and Z-axis directions.
[0050] S54. Calculate the translation vector based on the X-axis direction, Y-axis direction, the bottom position of the original 3D model, and the model's centroid. Specifically, calculate the translation vector t based on the bottom position and centroid of the original 3D model, so that the bottom of the original 3D model fits the XY plane and the centroid is located in a reasonable position.
[0051] S55. Combine the rotation matrix R and the translation vector t to obtain a 4×4 homogeneous transformation matrix T = [[R, t], [0, 0, 0, 1]]. At the same time, record the rotation matrix R, the translation vector t, the bottom compensation amount, the sampling parameters, and the cache key value to the processing log.
[0052] S6. Using the transformation matrix, the deterministic point cloud data is processed and written into the 3D model file. The original B-Rep parametric geometric entities are transformed to generate a normalized STEP model.
[0053] Furthermore, the 4×4 homogeneous transformation matrix T is serialized into a text format (e.g., 4 values per line), a NumPy array file (.npy), or other standard formats to facilitate reading by downstream systems.
[0054] Apply the transformation matrix T to the deterministic point cloud: perform p' = R·p +t on each point p in the deterministic point cloud data to obtain the normalized point cloud; write the normalized point cloud into a PLY file (3D model file), retaining the original color, normal and other attributes (if any).
[0055] Apply the same transformation matrix T to the original B-Rep geometry: using a geometry kernel such as OpenCASCADE, apply the rotation matrix R and translation vector t to each topological face, edge, and vertex of the model; since the transformation is performed directly on the parametric geometry rather than on discrete vertices, the resulting normalized STEP model maintains the accuracy of the original parametric geometry.
[0056] The transformation matrix file, PLY point cloud file, STEP model file, processing log file, and visualization results are packaged into a unified ZIP archive file; the output is a multimodal result set that can be used by downstream industrial AI, visual inspection, robot grasping, or reverse engineering.
[0057] This method applies the same 4×4 homogeneous transformation matrix to both deterministic point clouds and original B-Rep geometric entities; outputs normalized PLY point clouds and STEP models that maintain the original geometric accuracy; and synchronously exports matrix files, log files, and visualization results. It avoids inconsistencies between point cloud normalization results and CAD parametric geometry; supports the sharing of the same pose reference between point cloud AI tasks and CAD process tasks; and forms a multimodal data closed loop of "point cloud—mesh—parametric surface." This improves data consistency in downstream industrial AI, reverse engineering, and visual inspection; maintains the original accuracy of STEP geometry; and facilitates batch model archiving, traceability, and reuse.
[0058] S7. Display the original 3D model and the normalized STEP model in dual views.
[0059] Load the original 3D model and the normalized PLY / STEP model separately, and display the two views side by side on the same interface. The left view shows the original pose (i.e., the pose in the input file), and the right view shows the normalized standard pose for easy comparison.
[0060] In the dual view, overlay the OBB bounding box (displaying the model's spatial extent), overlay the centroid marker (usually represented by a sphere or cross), overlay the local coordinate axes (displaying the model's own X / Y / Z axes), and overlay the global coordinate axes (displaying the world coordinate system's X / Y / Z axes).
[0061] Color mapping can enhance the spatial shape perception of a model. For example, coloring can be based on the Z-coordinate height of a point cloud or mesh (blue for lower areas and red for higher areas), or coloring can be based on curvature values, enabling technicians to quickly identify the bottom, top, and sides.
[0062] In addition, the number of sampling points, voxel size, meshing accuracy, and skewness parameters can be adjusted via a web or GUI interface. After the user adjusts the parameters, the sampling, normalization, and visualization process is re-executed in real time, and the preview results are dynamically updated. The user can then confirm whether the normalized pose meets the engineering requirements based on the visualization results.
[0063] Step S7 above allows engineers to visually determine whether the bottom surface, coordinate axes, and normalized attitude are correct; it integrates parameter adjustment and result verification into the same closed-loop system; it lowers the debugging threshold and quality inspection costs; it improves the efficiency of batch quality control in industrial production lines; it shortens the parameter optimization cycle; and it enhances the reliability of system engineering implementation.
[0064] The invention will now be explained in conjunction with a specific application process, as follows: Input: A component model library containing 1000 STEP files.
[0065] Operation process: 1. Read each STEP file and generate a ternary feature hash key based on the file's absolute path, meshing precision (e.g., 0.01mm), and file modification time.
[0066] 2. For models that are accessed repeatedly, the triangular mesh representation is read directly from the LRU cache to avoid repeated B-Rep meshing.
[0067] 3. Perform spatial adaptive voxelization on each model to generate candidate voxel center points.
[0068] 4. Downsample the candidate point cloud to the target number of points (e.g., 2048 points) using a fixed seed FPS.
[0069] 5. Generate a 4×4 homogeneous transformation matrix.
[0070] 6. Simultaneously output normalized PLY point cloud, normalized STEP model, transformation matrix, and visualization comparison chart.
[0071] 7. Package and archive all results according to model number.
[0072] result: The same input point cloud is generated when the same model is called at any frequency.
[0073] Repeated parsing and gridding overhead are significantly reduced.
[0074] The point cloud and the STEP geometric entity maintain the same transformation result.
[0075] Engineers can quickly verify the correctness of the results using visual comparison charts.
[0076] In summary, the derivation method of the present invention has the following beneficial effects: Improved processing efficiency: The caching mechanism reduces redundant B-Rep meshing and I / O overhead.
[0077] Input consistency improvement: The deterministic sampling pipeline ensures that the input point cloud is consistent when the same model is run multiple times.
[0078] Robustness Enhancement: The degradation rollback mechanism supports special models such as thin-walled parts and very small parts.
[0079] Enhanced multimodal consistency: The same transformation is applied synchronously to the point cloud and B-Rep geometric entities.
[0080] Enhanced verifiability: The visual verification module helps to quickly confirm the normalization results.
[0081] Based on the same inventive concept, the present invention also provides an electronic device, including a processor, a communication interface, a display terminal, a memory, and a network communication component, wherein the processor, the communication interface, the display terminal, and the memory communicate with each other through the network communication component; the memory is used to store computer programs; and the processor is used to implement the above-mentioned export method when executing the program stored in the memory.
[0082] The network communication component mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This network communication component can be divided into address bus, data bus, control bus, etc. The communication interface is used for communication between the aforementioned terminal and other devices.
[0083] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0084] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), graphics processing units (GPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0085] The CPU is used for B-Rep parsing, incremental meshing, LRU cache scheduling, voxelization, FPS sampling, and matrix operations. 8GB or more of memory is recommended for maintaining the LRU cache pool, triangular meshes, voxel grids, point clouds, and intermediate results.
[0086] The storage is used to persist STEP source files, cached data, PLY / STEP output files, matrix files, and visualization images.
[0087] GPUs are used for large-scale point cloud rendering, batch sampling acceleration, and multi-view visualization generation.
[0088] The network communication component is used for model uploading, result downloading, and remote invocation in C / S or B / S architectures.
[0089] The display terminal is used to host GUI or web pages, displaying dual views, OBB bounding boxes, coordinate axes, and centroid markers.
[0090] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style of the specification is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
[0091] The technical principles of the present invention have been described above with reference to specific embodiments. These descriptions are merely for explaining the principles of the invention and should not be construed as limiting the scope of protection of the invention in any way. Based on this explanation, those skilled in the art can readily conceive of other specific embodiments of the invention without inventive effort, and these embodiments will all fall within the scope of protection of the present invention.
Claims
1. A method for deriving industrial models, characterized in that, include: Obtain the original 3D model and configuration parameters; Geometric data is obtained by parsing the original 3D model, and ternary feature hash keys are generated for the original 3D model; If the cache pool does not have a ternary feature hash key, then the original 3D model is meshed to obtain a triangular mesh representation; Deterministic point cloud data is generated based on triangular mesh representation; The pose normalization of the deterministic point cloud data is calculated to obtain the transformation matrix; Using a transformation matrix, deterministic point cloud data is processed and written into a 3D model file, and the original B-Rep parametric geometric entities are transformed to generate a normalized STEP model.
2. The export method according to claim 1, characterized in that, The geometric data includes: parametric geometric information and discrete data. The step of parsing the original 3D model to obtain the geometric data and generating ternary feature hash keys for the original 3D model includes: If the original 3D model is a solid model file, the parametric geometric information of the original 3D model can be obtained by parsing. If the original 3D model is a discrete format file, the discrete data of the original 3D model can be read. The absolute file path, gridded precision identifier, and source file modification timestamp are concatenated and then hashed to generate a ternary feature hash key.
3. The export method according to claim 1, characterized in that, If a ternary feature hash key exists in the cache pool, the triangular mesh is read directly from the cache pool based on the ternary feature hash key.
4. The export method according to claim 1, characterized in that, The step of performing meshing calculations on the 3D model to obtain a triangular mesh representation includes: For the solid model file, iterate through all the topological surfaces in B-Rep; Mesh parameters are set based on the local curvature of each topological surface; Discretize the meshing parameters into triangular patches and extract the node coordinates and triangular patch indices after local transformation; Merge the triangular meshes of all topological surfaces into a complete triangular mesh model; For discrete format files, vertex coordinates and face data are directly read as triangular meshes.
5. The export method according to claim 4, characterized in that, The step of generating deterministic point cloud data based on triangular mesh representation includes: Calculate the spatial bounding box of the original 3D model based on all vertex coordinates; Based on configuration parameters, the spatial bounding box is divided into uniform voxel units; The geometric center coordinates of the effective voxel units are calculated as candidate points to form a candidate point cloud; Perform fixed pseudo-random seed sampling on the candidate point cloud until the number of sampling points reaches the target number; Deterministic point cloud data is generated based on the sampling points.
6. The export method according to claim 5, characterized in that, If voxelization fails or the number of candidate points is insufficient, the following also applies: Revert to the original vertices represented by the triangular mesh; Perform proportional fixed seed sampling on the original vertices to ensure that the number of output sampling points reaches the target number.
7. The export method according to claim 1, characterized in that, The step of performing pose normalization calculation on deterministic point cloud data to obtain the transformation matrix includes: Search for the Z-axis direction of deterministic point cloud data; Based on the Z-axis direction, the X-axis and Y-axis directions of the deterministic point cloud data are determined. A rotation matrix is constructed using the three orthogonal axes X, Y, and Z. The columns of the rotation matrix are the new X-axis, Y-axis, and Z-axis directions. Calculate the translation vector based on the X-axis direction, Y-axis direction, the bottom position of the original 3D model, and the centroid of the model; The transformation matrix is obtained by combining the rotation matrix and the translation vector.
8. The export method according to claim 1, characterized in that, The steps of processing deterministic point cloud data using a transformation matrix and writing it into a 3D model file, transforming the original B-Rep parametric geometric entities, and generating a normalized STEP model include: Using a transformation matrix, a mathematical transformation is performed on each point in the deterministic point cloud data to obtain a normalized point cloud. Write the normalized point cloud into the 3D model file; The transformation matrix is applied to the original B-Rep parametric geometry to generate a normalized STEP model.
9. The export method according to claim 1, characterized in that, Also includes: The original 3D model and the normalized STEP model are displayed in dual views.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a network communication component, wherein the processor, the communication interface, and the memory communicate with each other through the network communication component; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the derivation method as described in any one of claims 1-9.