A method and system for creating a complex model dataset comprising cross-features
By parametrically generating rectangular basic entities and combining multi-threaded parallel computing, randomly selecting surfaces to convert them into B-spline surfaces, and performing triangulation and Boolean operations to generate cross features, the problem of insufficient dataset diversity and realism in existing technologies is solved, thereby improving model building efficiency and AI training effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-16
- Publication Date
- 2026-04-10
AI Technical Summary
Existing geometric feature dataset creation techniques use regular cubes as the basic building blocks, which cannot realistically simulate complex cross-feature structures in the real world, such as turbine blades in the aerospace field or irregular cavities in mold design. This results in insufficient dataset diversity and realism, limiting the training accuracy and engineering deployment reliability of AI models under complex working conditions.
A rectangular base entity is generated parametrically. The surface is randomly selected and converted into a B-spline surface through multi-threaded parallel computing. Combined with triangulation, point sampling and sketch bounding box adjustment, cross features are generated. Boolean operations are used to integrate the 3D feature entity with the complex base model, and the output is a structured dataset.
It significantly improves model building efficiency, enhances the realism and diversity of datasets, supports the application of artificial intelligence training in complex working conditions, and solves the problem of insufficient dataset diversity and realism caused by the single basic building unit and limited processing methods in existing methods.
Smart Images

Figure CN121527349B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a complex model data set creation method and system containing cross features. BACKGROUND
[0002] Geometric feature data set creation technology is a method based on computer digital data processing, aiming to systematically extract and construct feature representations from raw geometric data to support machine learning model training or data analysis tasks. This technology usually processes input geometric objects such as three-dimensional point clouds or mesh models through algorithms, identifies and quantifies key geometric properties such as curvature variation, topological structure or shape invariance, and generates structured data sets.
[0003] The existing geometric feature data set creation technology has the following technical pain points, specifically, since the basic building unit adopts a regular cube, its planar structure cannot simulate complex curved surface geometry in the real world, such as turbine blades in the aerospace field or special-shaped cavities in mold design, parts usually include hooks, grooves and other cross features, but the existing geometric feature data set creation technology can only generate simple prisms, resulting in insufficient feature diversity; at the same time, relying on a serial processing mode makes the utilization rate of computing resources low, the model generation efficiency is limited, and large-scale data sets cannot be quickly constructed, thereby affecting the training accuracy and engineering deployment reliability of artificial intelligence models under complex working conditions, and limiting the practical application in high-end manufacturing fields. SUMMARY
[0004] In view of the deficiencies of the prior art, the present application provides a complex model data set creation method and system containing cross features, which solves the technical problem that the existing geometric feature data set creation technology adopts a regular cube as the basic building unit and relies on a serial processing mode, causing the model to be unable to truly simulate complex cross feature structures (such as hooks, grooves, etc.) in the real world, resulting in insufficient diversity and authenticity of the data set, and thereby limiting the AI model training effect and engineering deployment application in the fields of aerospace, mold design, etc.
[0005] To solve the above technical problems, the specific content of the present application is as follows:
[0006] In a first aspect, the present application provides a complex model data set creation method containing cross features, comprising:
[0007] Step 1: Collect basic size parameters from a geometric data source, and parameterize a rectangular basic entity within a preset size range;
[0008] Step 2, taking the rectangular base entity as input, randomly selecting three surfaces, converting the selected surfaces into B-spline surfaces, wherein each surface is defined by a dense grid of control points, and the perturbation of the control points is constrained within the range of the original plane normal direction;
[0009] Step 3, replacing the corresponding surfaces of the rectangular base entity with the B-spline surfaces obtained in step 2 to obtain a complex base model with complex curved surface features;
[0010] Step 4, triangulating the selected surfaces of the complex base model obtained in step 3 to obtain a triangular element grid, and sampling points in the triangular element grid;
[0011] Step 5, taking the sampling points collected in step 4 as input, constructing a sketch bounding box, matching the sketch type according to the feature type in the pre-defined feature library, and adjusting the sketch bounding box to adapt to the non-planar boundary of the B-spline surface;
[0012] Step 6, stretching the sketch bounding box adjusted in step 5 to generate a three-dimensional feature entity, and integrating the three-dimensional feature entity with the complex base model through Boolean operation to generate an intersection feature;
[0013] Step 7, numbering and identifying the intersection feature generated in step 6, and storing the complex geometric model entity including the numbering and the intersection feature in a pre-set format, and outputting as a structured data set for artificial intelligence training.
[0014] Further, the complex model data set creation method comprising intersection features according to the application comprises the following steps:
[0015] Based on the collected base size parameters, a boundary representation method is used to construct a cubic grid structure with a length, width and height range of 10-50mm;
[0016] Taking the constructed cubic grid structure as the basis, a multi-thread parallel computing method is used to synchronously generate multiple rectangular base entities;
[0017] The generation process of the cubic grid structure includes: generating 8 vertices through vertex coordinate calculation, forming 12 edges based on the calculated vertex coordinates using edge connection algorithm, and then forming 6 planes by using the formed edges as input through face combination algorithm;
[0018] The multi-thread parallel computing adopts a dynamic load balancing strategy, allocates independent memory space for each generation thread, and avoids data conflict through mutex mechanism.
[0019] Further, the complex model data set creation method comprising intersection features according to the application comprises the following steps:
[0020] Based on the established control point grid, a random offset vector of each control point in the normal direction of the original plane is generated by using a Gaussian distribution function, and the amplitude of the offset vector is limited to avoid self-intersection of the curved surface;
[0021] The control points with random offset vectors are taken as input, and a non-uniform rational B-spline algorithm is applied for interpolation calculation to generate a B-spline surface;
[0022] The establishment process of the control point grid comprises: mapping a two-dimensional uniform grid point array to a three-dimensional plane space, and realizing accurate positioning of the grid points through a coordinate transformation algorithm;
[0023] The generation of the random offset vector adopts a constraint optimization algorithm, the offset direction is constrained within 30 degrees of the positive and negative normal directions of the plane, and the offset amplitude is limited within 5% of the side length of the plane.
[0024] Further, the complex model data set creation method comprising the cross feature comprises the following steps:
[0025] The edges in the sketch boundary box that coincide with the boundary of the B-spline surface are identified as generation edges;
[0026] Based on the identified generation edges, the generation edges are removed, and the sketch height is extended along the normal direction of the B-spline surface, and the integration with the curved surface geometry is completed through the extended sketch boundary.
[0027] Further, the complex model data set creation method comprising the cross feature comprises the following steps:
[0028] The pre-defined feature library comprises 24 standard feature types, and the feature types comprise a rectangular through hole, a rectangular blind hole, a triangular through hole, a triangular blind hole, a rectangular through groove, a triangular through groove, a rectangular blind hole groove, a 2-side through step, a rectangular through step, a rectangular blind hole step, a triangular blind hole step, an inclined through step, a chamfer, a hexagonal through hole, a hexagonal blind hole, a through hole, a blind hole, an O-ring, a circular through groove, a circular end blind hole, a circular blind hole step, a vertical circular end blind hole groove, a horizontal circular end blind hole groove and a round corner.
[0029] The feature library is stored by using a hierarchical data structure, and each feature type is associated with a corresponding sketch type rule and a stretching parameter range;
[0030] Based on the hierarchical data structure, the feature type matching process adopts a dynamic lookup table mechanism, and the optimal sketch type combination is automatically selected from the data structure according to the feature complexity.
[0031] Further, the complex model data set creation method comprising intersecting features according to the application, the integration of the three-dimensional feature entity and the complex base model through Boolean operation comprises:
[0032] Determine the feature class priority order through the dependency analysis algorithm, and establish a feature priority queue;
[0033] With the established feature priority queue as a guide, construct an entity geometry tree structure, and perform Boolean difference set operation according to the priority order;
[0034] The Boolean operation adopts B-rep intersection algorithm to calculate the intersection line ring of the three-dimensional feature entity and the complex base model, and according to the definition of Boolean difference set operation, the region of the complex base model not occupied by the three-dimensional feature entity is retained.
[0035] Further, the complex model data set creation method comprising intersecting features according to the application, step 7 comprises:
[0036] A hash algorithm is used to assign a unique identifier to each geometric face of the intersecting feature;
[0037] The unique identifier and the corresponding geometric data are indexed by using the assigned unique identifier as an index key;
[0038] The established index relationship is stored in a metadata file;
[0039] The number identification adopts hierarchical coding, and a base number is assigned to each feature based on the hierarchical coding, and a sub-number is assigned to each face sheet inside each feature;
[0040] The metadata file is stored in JSON format, and the metadata file includes feature parameters, distribution information and geometric topology relationship description.
[0041] Further, the complex model data set creation method comprising intersecting features according to the application, step 6 comprises:
[0042] The number of intersecting features is 8 to 12;
[0043] In the triangularized surface area, the Monte Carlo sampling algorithm is used to complete the probability uniform distribution sampling to generate a sampling point result representing the random distribution position of the feature;
[0044] Based on the sampling point result, the generation order of the intersecting features adopts a dynamic optimization strategy, and the dynamic optimization strategy is to adjust the generation sequence of the features in real time according to the geometric dependency relationship between the features corresponding to each sampling point.
[0045] Further, the complex model data set creation method comprising intersecting features according to the application, step 7 further comprises:
[0046] extracting geometry data of the complex geometric model entity, and constructing a boundary representation model according to topological relations of vertices, edges and faces thereof;
[0047] based on the boundary representation model, converting geometry entities and topological connection information included in the boundary representation model into a standardized STEP format file according to a product data model defined by a STEP standard, and generating a corresponding STEP format file;
[0048] writing the STEP format file into a specified path in batches through a parallel I / O interface, applying a data block strategy in the writing process, and generating a check code for each file processed by block.
[0049] In a second aspect, the present application discloses a complex model data set creation system containing cross features, which is applied to the complex model data set creation method containing cross features and comprises:
[0050] a basic entity generation module configured to collect basic size parameters from a geometry data source, and to generate a rectangular basic entity in a parameterized manner within a preset size range;
[0051] a surface conversion module configured to take the rectangular basic entity as input, randomly select three surfaces, and convert the selected surfaces into B-spline surfaces, wherein each surface is defined by a dense control point grid, and perturbation of the control points is constrained within a range of the original plane normal direction;
[0052] a surface integration module configured to replace corresponding surfaces of the rectangular basic entity with the converted B-spline surfaces, and to obtain a complex basic model with complex surface features;
[0053] a surface processing module configured to perform triangulation processing on selected surfaces of the complex basic model to obtain a triangular element grid, and to perform point sampling in the triangular element grid to obtain sampling points;
[0054] a sketch processing module configured to take the sampling points as input, construct a sketch bounding box, match a sketch type according to a feature type in a predefined feature library, and adjust the sketch bounding box to adapt to a non-planar boundary of a B-spline surface;
[0055] a feature generation module configured to perform a stretching operation according to the adjusted sketch bounding box to generate a three-dimensional feature entity, and to integrate the three-dimensional feature entity with the complex basic model through Boolean operation to generate a cross feature;
[0056] a data output module configured to number and identify the generated cross feature, and to store a complex geometric model entity including the number identification and the cross feature in a preset format, and output a structured data set for artificial intelligence training.
[0057] Advantages of the present application
[0058] The present application significantly improves the model construction efficiency by using parameterized generation of rectangular base entities and combining multi-thread parallel computing mode, and overcomes the problem of low utilization rate of existing serial processing resources; by randomly selecting surfaces and converting them into B-spline surfaces, the control point disturbance is constrained in the normal direction, a complete geometric free surface is generated, the base model can truly simulate complex geometric structures in the field of aerospace, etc., and the authenticity and diversity of the data set are enhanced; further through triangulation processing, point sampling and sketch bounding box adjustment, the non-planar boundary is adapted, combined with the dynamic matching mechanism of the predefined feature library, the cross features are programmed to generate, and the richness and geometric coordination of the feature types are ensured; finally, through Boolean operation integration and number identification, the structured data set is output, supporting the application of artificial intelligence training under complex working conditions, thereby overall solving the technical problems of insufficient diversity and authenticity of the data set caused by the single base construction unit and the limitations of the existing method. BRIEF DESCRIPTION OF DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, for those skilled in the art, other drawings can also be obtained from the drawings without creative labor.
[0060] Figure 1 A flowchart of a complex model data set creation method containing cross features provided by the embodiment of the present application.
[0061] Figure 2 For the creation of a complex base model, Figure 2 In the figure a, each surface is defined by a dense 21x21 control point grid, Figure 2 In the figure b, the disturbance of the control points is strictly limited within the range of the original plane normal direction,
[0062] Figure 3 A machine feature class diagram;
[0063] Figure 4 A sketch type diagram;
[0064] Figure 5 Twelve types of sketches that need to be modified and their corresponding results after modification, wherein (a) first modified sketch, (b) second modified sketch, (c) third modified sketch, (d) fourth modified sketch, (e) fifth modified sketch, (f) sixth modified sketch;
[0065] Figure 6A flowchart is generated for model features of sketch type 3, wherein (a) triangulation, (b) point sampling, (c) sketch boundary generation, (d) feature generation;
[0066] Figure 7 A feature model schematic is generated;
[0067] Figure 8 A feature model schematic to be generated is generated;
[0068] Figure 9 A rectangular through slot feature schematic is generated. DETAILED DESCRIPTION
[0069] In order to make the technical solutions of the present application clearer, the present application will be described below in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application. The present application provided by the embodiments of the present application will be described in detail below in conjunction with the drawings. In order to better understand the purpose of the present application, the present application will be further described in detail below.
[0070] Referring to Figure 1 The present application provides a complex model data set creation method comprising intersecting features, comprising:
[0071] Step 1: Collect basic size parameters from a geometric data source, and parameterize a rectangular basic entity within a preset size range;
[0072] Step 2: Randomly select three surfaces with the rectangular basic entity as input, and convert the selected surfaces to B-spline surfaces, wherein each surface is defined by a dense control point grid, and the perturbation of the control points is constrained within the range of the original plane normal direction;
[0073] Step 3: Replace the corresponding surfaces of the rectangular basic entity with the B-spline surfaces obtained in step 2 to obtain a complex basic model with complex curved surface features;
[0074] Step 4: Triangulate the selected surfaces of the complex basic model obtained in step 3 to obtain a triangular element grid, and sample points within the triangular element grid;
[0075] Step 5: With the sampling points collected in step 4 as input, construct a sketch boundary box, match the sketch type according to the feature type in the predefined feature library, and adjust the sketch boundary box to adapt to the non-planar boundary of the B-spline surface;
[0076] Step 6, the three-dimensional feature entity is generated by stretching operation according to the sketch bounding box adjusted in step 5, and the three-dimensional feature entity is integrated with the complex base model set through Boolean operation to generate the cross feature;
[0077] Step 7, the cross feature generated in step 6 is numbered and identified, and the complex geometric model entity including the number identification and the cross feature is stored in a preset format, and output as a structured data set for artificial intelligence training.
[0078] The application provides a complex model data set creation method containing cross features, which realizes the generation from basic geometric data to complex model data set through a series of ordered steps. Step 1 collects basic size parameters from a geometric data source, and generates rectangular base entities in a preset size range. This step uses boundary representation method to construct a cubic grid structure, generates a plurality of vertices through vertex coordinate calculation, forms a plurality of edges based on vertex coordinates using edge connection algorithm, and then constitutes a plurality of planes by taking the edges as input through face combination algorithm. A plurality of rectangular base entities are generated synchronously by using multi-thread parallel computing mode, and the multi-thread parallel computing mode uses dynamic load balancing strategy to allocate independent memory space for each generation thread and avoids data conflict through mutex mechanism. The rectangular base entities generated in step 1 provide geometric basis for subsequent surface conversion.
[0079] Step 2 takes the rectangular base entity as input, randomly selects three surfaces, and converts the selected surfaces into B-spline surfaces. Each surface is defined by a dense control point grid, and the establishment process of the control point grid includes mapping a two-dimensional uniform grid point array to a three-dimensional plane space, and accurately positioning the grid points through coordinate transformation algorithm. The disturbance of the control points is constrained within the normal direction range of the original plane, and a random offset vector of each control point in the normal direction is generated by using a Gaussian distribution function. The generation of the offset vector uses a constraint optimization algorithm, the offset direction is constrained within a preset angle range of the plane normal, and the offset amount is limited within a preset proportion of the plane side length to avoid self-intersection of the surface. The control points with random offset vectors are taken as input, and a non-uniform rational B-spline algorithm is applied for interpolation calculation to generate a B-spline surface.
[0080] Step 3 replaces the corresponding surfaces of the rectangular base entity with the B-spline surface obtained in step 2 to obtain a complex base model with complex curved surface features. This replacement operation is realized through a geometric integration algorithm, which ensures that the complex base model retains the topological structure of the original entity while introducing surface diversity. The complex base model provides a geometric carrier for subsequent feature generation.
[0081] Step 4 Triangulates the selected surface of the complex base model obtained in Step 3 to obtain a triangular mesh. The triangulation process uses a meshing algorithm to discretize the curved surface into triangular facets. Point sampling is performed within the triangular mesh to obtain sampling points. The point sampling process uses a Monte Carlo sampling algorithm to achieve a uniform probability distribution of points.
[0082] Step 5 Constructs a sketch bounding box using the sampling points collected in Step 4 as input. The sketch type is matched according to the feature type in the predefined feature library, which includes various standard feature types such as rectangular through holes, blind holes, and steps. The feature library uses a hierarchical data structure for storage, and each feature type is associated with corresponding sketch type rules and stretching parameter ranges. The feature type matching process uses a dynamic lookup table mechanism to automatically select the optimal sketch type combination from the data structure based on feature complexity. The sketch bounding box is adjusted to adapt to the non-planar boundary of the B-spline surface. The adjustment process includes identifying the edges in the sketch bounding box that coincide with the boundary of the B-spline surface as generating edges, removing the generating edges based on the identified generating edges, and extending the sketch height along the normal direction of the B-spline surface. The integration with the curved surface geometry is completed through the extended sketch boundary.
[0083] Step 6 Performs a stretching operation according to the sketch bounding box adjusted in Step 5 to generate a three-dimensional feature entity. The stretching operation is performed according to the sketch type and feature parameters to generate the entity geometry. The three-dimensional feature entity is integrated with the complex base model through Boolean operations to generate the cross-feature. The Boolean operation uses a dependency analysis algorithm to determine the priority order of feature categories, establishes a feature priority queue, and uses the priority queue to guide the construction of an entity geometry tree structure. The Boolean difference set operation is performed in priority order. The Boolean operation uses a B-rep intersection algorithm to calculate the intersection curve of the three-dimensional feature entity and the complex base model, and retains the corresponding regions according to the Boolean difference set operation type. The number of cross-features is multiple, and random feature distribution is achieved within the triangularized surface region through a sampling algorithm. The generation order uses a dynamic optimization strategy to adjust the generation sequence in real time based on the geometric dependencies between features.
[0084] Step 7: Number identification is performed on the cross features generated in step 6, and a hash algorithm is used to assign a unique identifier to each geometric face of the cross features. The number identification uses a hierarchical coding scheme, which assigns a base number to each feature based on the hierarchical coding scheme, and assigns a sub-number to each face within each feature. The unique identifier is used as an index key to establish an index relationship between the unique identifier and the corresponding geometric data, and the index relationship is stored in a metadata file. The metadata file is stored in JSON format, and the metadata file includes feature parameters, distribution information, and geometric topology relationship description. The complex geometric model entity including the number identification and the cross features is stored in a preset format, a conversion algorithm from boundary representation to STEP format is used for serialization to obtain a STEP format file, and the STEP format file is stored in batches to a specified path through parallel I / O operation. In the batch storage process, a data block strategy is applied to process the file, and a check code is generated for each data file. The output is a structured data set for artificial intelligence training.
[0085] The present application realizes logical connection through sequential execution and data processing flow among steps. Step 1 generates basic geometry, steps 2 and 3 introduce surface complexity, steps 4 and 5 prepare feature generation environment, step 6 integrates cross features, and step 7 completes data packaging to form a complete technical solution.
[0086] Based on the collected basic size parameters, a boundary representation method is used to construct a cubic grid structure. The structure generates eight vertices through vertex coordinate calculation, then applies edge connection algorithm to form twelve edges, and then uses each edge as input to form six planes through face combination algorithm, thereby completing the construction of the cubic grid. Based on the cubic grid structure, multiple rectangular basic entities are generated synchronously using multi-thread parallel computing mode. The multi-thread parallel computing uses dynamic load balancing strategy to allocate independent memory space for each generation thread, and avoids data conflict through mutex mechanism. This implementation improves the efficiency and reliability of basic entity generation, and provides a structured geometric basis for subsequent surface conversion.
[0087] Specifically, the complex model data set creation method comprising cross features according to the present application comprises step 1:
[0088] Based on the collected basic size parameters, a boundary representation method is used to construct a cubic grid structure with a design length, width and height range of 10-50mm.
[0089] Based on the constructed cubic grid structure, multiple rectangular basic entities are generated synchronously using multi-thread parallel computing mode.
[0090] The generation process of the cubic grid structure includes: generating 8 vertices through vertex coordinate calculation, forming 12 edges based on the calculated vertex coordinates by using an edge connection algorithm, and then constituting 6 planes by using a face combination algorithm with the formed edges as input;
[0091] The multi-thread parallel computation adopts a dynamic load balancing strategy, and independently allocates memory space for each generation thread, and avoids data conflict through a mutual exclusion lock mechanism.
[0092] Based on the collected basic size parameters, a cubic grid structure is constructed by using a boundary representation method. The boundary representation method describes a three-dimensional model by defining the boundary of a geometric entity. In specific implementation, the basic size parameters are first processed, and each parameter defines the spatial range of the cubic grid. The vertex coordinate calculation determines the spatial positions of the eight vertices of the cubic grid based on the basic size parameters, forming the basic framework of the grid.
[0093] After the vertex coordinate calculation is completed, the edge connection algorithm is used to process the vertex data. The edge connection algorithm connects the calculated vertices in a specific order according to the geometric topological relationship of the cubic grid, forming twelve edges. Each edge constitutes a linear skeleton of the cubic grid, providing a basis for subsequent face combination.
[0094] The twelve edges formed by the edge connection algorithm are used as input for the face combination algorithm. The face combination algorithm groups the edges according to the spatial relationship of the six planes of the cubic grid, and defines the area surrounded by each group of edges as a plane, gradually constructing the six planes. The plane is surrounded by edges, and each plane is a closed two-dimensional area, which together constitutes a complete cubic grid structure.
[0095] Based on the constructed cubic grid structure, multiple rectangular base entities are generated simultaneously using a multi-thread parallel computation method. The multi-thread parallel computation adopts a dynamic load balancing strategy, which automatically allocates generation tasks to multiple computation threads, so that each thread bears approximately the same workload. The dynamic load balancing strategy adjusts the task allocation in real time according to system resources, improving the utilization of computing resources.
[0096] Each generation thread is allocated independent memory space to avoid data read-write conflict between different threads. Independent allocation of memory space ensures that each thread can independently process the allocated cubic grid generation task without interference from other threads. The mutual exclusion lock mechanism controls the access order of shared resources. When multiple threads need to access the same resource, the mutual exclusion lock mechanism ensures that only one thread can execute the access operation at the same time. The mutual exclusion lock mechanism effectively prevents data race conditions, ensuring the correctness and stability of the rectangular base entity generation process.
[0097] Specifically, the method for creating a complex model data set containing intersection features comprises the following steps:
[0098] Based on the established control point grid, a random offset vector of each control point in the normal direction of the original plane is generated using a Gaussian distribution function, and the amplitude of the offset vector is limited to avoid self-intersection of the curved surface;
[0099] The control points with random offset vectors are taken as input, and a non-uniform rational B-spline algorithm is applied for interpolation calculation to generate a B-spline curved surface;
[0100] The establishment process of the control point grid includes: mapping a two-dimensional uniform grid point array to a three-dimensional plane space, and accurately positioning the grid points through a coordinate transformation algorithm;
[0101] The generation of the random offset vector uses a constraint optimization algorithm, the offset direction is constrained within 30 degrees of the positive and negative normal direction of the plane, and the offset amplitude is limited within 5% of the side length of the plane.
[0102] Based on the established control point grid, a random offset vector of each control point in the normal direction of the original plane is generated using a Gaussian distribution function. The establishment process of the control point grid first maps a two-dimensional uniform grid point array to a three-dimensional plane space, and this mapping accurately positions the grid points through a coordinate transformation algorithm, so that each point in the two-dimensional grid point array corresponds to a specific position on the three-dimensional plane. The coordinate transformation algorithm converts the two-dimensional grid coordinates into three-dimensional world coordinates according to the direction and size parameters of the plane space, thereby providing a geometric basis for subsequent curved surface generation.
[0103] The generation of the random offset vector uses a Gaussian distribution function, which generates a random displacement value along the normal direction of the original plane for each control point. The Gaussian distribution function generates random numbers following a normal distribution by setting the mean value to zero and controlling the standard deviation, as the amplitude component of the offset vector. The amplitude of the offset vector is limited to avoid self-intersection of the curved surface, and this limitation is achieved through a constraint optimization algorithm. The constraint optimization algorithm constrains the offset direction within a specified angle range of the positive and negative normal direction of the plane, and limits the offset amplitude within a specified proportion of the side length of the plane, thereby ensuring that the generated curved surface has randomness and maintains geometric reasonableness.
[0104] The control points with random offset vectors are taken as input, and a non-uniform rational B-spline algorithm is applied for interpolation calculation to generate a B-spline curved surface. The non-uniform rational B-spline algorithm calculates the coordinates of the points on the curved surface through the topological structure defined by the control point grid. The interpolation calculation process is based on the weighted combination of control points, where the weights are determined by the node vectors and the basis functions, and finally a smooth and continuous B-spline curved surface is generated. This process converts the randomly disturbed control points into a geometrically complete free-form surface, providing support for the creation of complex base models.
[0105] Specifically, the step 5 of the complex model data set creation method comprising intersecting features according to the present application comprises:
[0106] Identify the edges in the sketch boundary box that coincide with the B-spline surface boundary as the generated edges;
[0107] Based on the identified generated edges, remove the generated edges and extend the sketch height along the normal direction of the B-spline surface, and complete the integration with the surface geometry through the extended sketch boundary.
[0108] Identify the edges in the sketch boundary box that coincide with the B-spline surface boundary as the generated edges. The identification process of the generated edges is realized by a geometric comparison algorithm, which matches the edges of the sketch boundary box with the boundary lines of the B-spline surface in space position, and calculates the minimum distance and coincidence degree between them. When the distance of the edge to the surface boundary is less than the preset tolerance and the direction is consistent, it is determined as a coincident edge, which is marked as a generated edge. The generated edge is located on the outer boundary of the B-Rep surface to which the feature is added, and serves as a reference for subsequent adjustment.
[0109] Based on the identified generated edges, remove each generated edge from the sketch boundary box. The removal operation is completed by modifying the sketch geometry structure, specifically by deleting the line segment vertices and connection relationships corresponding to the generated edges, while preserving other parts of the sketch boundary box. After removing the generated edges, the sketch boundary box changes from a closed polygon to an open contour, preparing for the adjustment of the surface.
[0110] After removing the generated edges, extend the sketch height along the normal direction of the B-spline surface. The extension process first calculates the average normal direction of the B-spline surface near the generated edge as the extension direction. Then, according to the stretching parameter range defined in the feature library, the extension distance is determined, and the remaining edges of the sketch boundary box are translated along the normal direction by a specified height. The extension operation generates a new three-dimensional boundary contour, which maintains a perpendicular relationship with the surface geometry.
[0111] The integration with the surface geometry is completed through the extended sketch boundary. The integration process geometrically stitches the three-dimensional boundary contour generated by the extension with the B-spline surface, and aligns the vertices of the contour edge and the surface boundary using a boundary matching algorithm. After stitching, the open edges of the sketch boundary box form a continuous transition with the surface boundary, realizing the seamless connection between the sketch and the complex surface. Finally, the adjusted sketch boundary box can accurately match the non-planar topological structure of the B-spline surface, providing a geometric basis for subsequent feature generation.
[0112] Specifically, the method for creating a complex model data set containing intersection features described in the present application further comprises the following steps in step 5:
[0113] The predefined feature library includes 24 standard feature types, including rectangular through hole, rectangular blind hole, triangular through hole, triangular blind hole, rectangular through slot, triangular through slot, rectangular blind hole slot, 2-side through step, rectangular through step, rectangular blind hole step, triangular blind hole step, inclined through step, chamfer, hexagonal through hole, hexagonal blind hole, through hole, blind hole, O-ring, circular through slot, circular end blind hole, circular blind hole step, vertical circular end blind hole slot, horizontal circular end blind hole slot, and round corner;
[0114] The feature library is stored in a hierarchical data structure, and each feature type is associated with corresponding sketch type rules and stretching parameter ranges;
[0115] Based on the hierarchical data structure, the feature type matching process adopts a dynamic lookup table mechanism to automatically select the optimal sketch type combination from the data structure according to the feature complexity.
[0116] The predefined feature library includes twenty-four standard feature types, each feature type covering rectangular through hole, rectangular blind hole, triangular through hole, triangular blind hole, rectangular through slot, triangular through slot, rectangular blind hole slot, 2-side through step, rectangular through step, rectangular blind hole step, triangular blind hole step, inclined through step, chamfer, hexagonal through hole, hexagonal blind hole, through hole, blind hole, O-ring, circular through slot, circular end blind hole, circular blind hole step, vertical circular end blind hole slot, horizontal circular end blind hole slot, and round corner. The feature library is organized in a hierarchical data structure, which groups feature types according to their geometric properties and functional similarity, forming a tree topology. Each group of feature types corresponds to specific sketch type rules and stretching parameter ranges. The sketch type rules define the composition method of the sketch bounding box, and the stretching parameter range specifies the depth and direction of the stretching operation.
[0117] When storing feature types in the hierarchical data structure, each feature type is treated as a leaf node, and the parent node represents a feature category. The sketch type rules include the number, type, and arrangement of the sketch boundary, and the stretching parameter range includes the minimum and maximum stretching distance. This storage method supports fast retrieval and updating, providing a data basis for feature matching.
[0118] The feature type matching process is based on the hierarchical data structure and adopts a dynamic lookup table mechanism. The dynamic lookup table mechanism automatically indexes the nodes in the hierarchical data structure according to the feature complexity, which is calculated by the number of vertices, edges, and faces of the feature geometric shape. The matching process first analyzes the geometric parameters of the input feature, calculates the feature complexity value, and then queries the dynamic lookup table to find the corresponding feature type group.
[0119] According to the feature complexity value, the dynamic lookup table mechanism selects the optimal sketch type combination from the hierarchical data structure. The selection process compares the adaptation degree of the sketch type rule of different feature types to the current geometric environment, and preferentially selects the feature type with matching complexity and parameter range. Finally, the sketch type rule and the stretching parameter range are output, which are used for subsequent sketch bounding box construction and stretching operation.
[0120] Specifically, the complex model data set creation method comprising cross features according to the application comprises:
[0121] The feature priority queue is established by determining the priority order of feature categories through a dependency relationship analysis algorithm.
[0122] The Boolean difference set operation is performed in the priority order by constructing an entity geometry tree structure under the guidance of the established feature priority queue.
[0123] The Boolean operation adopts a B-rep intersection algorithm to calculate the intersection line ring of the three-dimensional feature entity and the complex base model, and according to the definition of the Boolean difference set operation, the region of the complex base model not occupied by the three-dimensional feature entity is retained.
[0124] The feature priority queue is established by determining the priority order of feature categories through a dependency relationship analysis algorithm. The dependency relationship analysis algorithm analyzes the interference relationship between features based on feature geometric attributes, including feature spatial position, size parameter and topological connection relationship. The algorithm traverses all the features to be integrated to detect whether there is an overlapping area or coplanar relationship between features, and assigns priority weights according to the interference degree. The priority order of feature categories is arranged in the order of step class features, then through-hole class features, then blind hole class features, and finally transition features, and the feature priority queue is established.
[0125] The Boolean difference set operation is performed in the priority order by constructing an entity geometry tree structure under the guidance of the established feature priority queue. The complex base model is taken as the root node of the entity geometry tree structure, and the three-dimensional feature entity is added as a child node to the tree structure in the priority order. Each node stores the boundary representation data of the corresponding entity, and the parent node and the child node are connected through the Boolean difference set operation relationship. When performing the Boolean difference set operation in the priority order, the feature with the highest priority is started, and the feature entity is sequentially operated with the base model through the Boolean difference set operation.
[0126] The intersection line ring of the three-dimensional feature entity and the complex base model is calculated by using a B-rep intersection algorithm. The B-rep intersection algorithm calculates the intersection of the face patches of two entities to generate the intersection line ring. The algorithm first divides all the face patches of the two entities in space, quickly locates the face patch pairs that may intersect, then accurately calculates the intersection line segments by plane geometry, and finally connects the adjacent intersection line segments to form a closed intersection line ring.
[0127] According to the type of Boolean difference set operation, the region in the complex base model that is not occupied by the three-dimensional feature entity is reserved. During the Boolean difference set operation, the system identifies different regions divided by the intersection line ring, and reserves the region belonging to the base model and not including the feature entity. For each region divided by the intersection line ring, the region ownership is judged by point inclusion test, and finally a new entity model after removing the occupied space of the feature entity is generated.
[0128] Specifically, the method for creating a complex model data set containing intersecting features comprises the following steps:
[0129] A hash algorithm is used to assign a unique identifier to each geometric face of the intersecting feature;
[0130] The unique identifier and the corresponding geometric data are indexed by using the assigned unique identifier as an index key;
[0131] The established index relationship is stored in a metadata file;
[0132] The number identifier adopts hierarchical coding, and a base number is assigned to each feature based on the hierarchical coding, and a sub-number is assigned to each face patch inside each feature;
[0133] The metadata file is stored in JSON format, and the metadata file includes feature parameters, distribution information and geometric topological relationship description.
[0134] A hash algorithm is used to assign a unique identifier to each geometric face of the intersecting feature. The hash algorithm processes the geometric data input of the geometric face, and the geometric data includes attributes such as vertex coordinates, normal vectors and face area. The algorithm calculates the digital fingerprint of the geometric data by using a SHA-256 hash function, generates a fixed-length hexadecimal string as a unique identifier. This process ensures that different geometric faces will generate different identifiers, and the same geometric face will always generate the same identifier, realizing the uniqueness and consistency of the identifier.
[0135] The unique identifier is taken as an index key to index the unique identifier and the corresponding geometric data. The index relationship is stored in a key-value pair structure, with the unique identifier as the key and the geometric data as the value. The geometric data includes a vertex coordinate set of a face, an edge connection relationship and adjacent face information. The index establishment process is implemented through a hash table, which quickly locates the stored geometric data with the unique identifier as the key, supporting efficient query and retrieval operations.
[0136] The established index relationship is stored in a metadata file. The metadata file organizes data in JSON format, and the file structure includes an identifier index segment, a geometric data segment and a feature attribute segment. The identifier index segment stores the mapping relationship between all unique identifiers and geometric data, the geometric data segment records detailed geometric information of the face, and the feature attribute segment saves the feature type and distribution parameters. The storage process converts the index relationship into a text format through JSON serialization and writes it into the metadata file.
[0137] The numbering identification adopts a hierarchical coding scheme, which assigns a basic number to each feature and a sub-number to each face within each feature based on hierarchical coding. The hierarchical coding scheme classifies and encodes according to feature type and spatial position, and the basic number is composed of feature type code and serial number, and the sub-number is appended with face index number after the basic number. The coding structure ensures that each face and feature has a globally unique identifier, supporting multi-level retrieval and classification management.
[0138] The metadata file includes feature parameters, distribution information and geometric topological relationship description. The feature parameters record the size, type and generation parameters of the feature, the distribution information describes the position distribution of the feature on the model surface, and the geometric topological relationship describes the connection relationship and adjacency information between the feature faces. The metadata file organizes each information through JSON object nesting to form a structured data record, providing complete feature description data for artificial intelligence training.
[0139] Specifically, the complex model data set creation method containing cross features provided by the application comprises the following steps:
[0140] The number of cross features is 8 to 12;
[0141] In the triangularized surface area, the Monte Carlo sampling algorithm is used to complete the probability uniform distribution sampling to generate a sampling point result representing the random distribution position of the feature;
[0142] Based on the sampling point result, the generation sequence of the cross features adopts a dynamic optimization strategy, which adjusts the generation sequence of the features in real time according to the geometric dependency relationship between the features corresponding to each sampling point.
[0143] The number of cross features is set between eight and twelve, which is based on the balance between model complexity and computational efficiency, aiming to provide sufficient feature diversity while maintaining the feasibility of the generation process. The number selection considers factors including the surface area of the base model, the average size of the features, and the geometric constraints to avoid overcrowding, ensuring that there is enough space between features to avoid interference while covering the surface area to achieve uniform distribution.
[0144] Within the surface area obtained through triangulation processing, a Monte Carlo sampling algorithm is applied to perform probability uniform distribution sampling. The Monte Carlo sampling algorithm achieves spatial uniform distribution of sampling points by randomly generating a large number of sampling points and accepting points that fall within the surface area. The sampling process is based on a triangular cell grid, calculating the area weight of each triangle, randomly selecting a triangle according to the weight probability, and then generating point coordinates within the selected triangle. This method generates a sampling point result representing the random distribution position of the features, providing input for feature positioning and ensuring that the distribution of features on the surface is both random and uniform, avoiding clustering or blank areas.
[0145] Based on the sampling point result, the generation sequence of cross features adopts a dynamic optimization strategy. The dynamic optimization strategy analyzes the geometric dependency relationships between the features corresponding to each sampling point, including spatial overlap, coplanarity, or topological connectivity between features. The strategy evaluates potential conflicts in the feature generation process in real time, such as Boolean operation interference or face overlap, and adjusts the feature generation sequence based on the dependency relationships. The optimization process prioritizes the generation of geometric independent or basic features, and then processes dependent or complex features, avoiding generation errors through iterative adjustment of the sequence to ensure the efficiency and correctness of feature integration. The dynamic optimization strategy improves the robustness of the generation process and adapts to the feature generation requirements under different model configurations.
[0146] Specifically, the complex model data set creation method containing cross features described in the present application, step 7 further comprises:
[0147] Extracting the geometric data of the complex geometric model entity, and constructing a boundary representation model based on the topological relationship of its vertices, edges, and faces;
[0148] Based on the boundary representation model, converting the geometric entities and topological connection information included in the boundary representation model into a standardized STEP format file according to the product data model defined by the STEP standard, and generating a corresponding STEP format file;
[0149] Writing the STEP format file in batches through a parallel I / O interface to a specified path, and applying a data block strategy during this writing process, and generating a checksum for each file processed by the block.
[0150] The geometric data of the complex geometric model entity is extracted, and a boundary representation model is constructed according to the topological relationship of vertices, edges and faces. The geometric data extraction process involves collecting vertex coordinate information, edge connection relationship and face definition data from the complex geometric model entity. The vertex coordinate information includes the three-dimensional spatial position of each vertex, the edge connection relationship describes the connection mode between the vertices, and the face definition data includes the surface area surrounded by the edges. Based on the data, a boundary representation model is constructed, and the boundary representation model represents the geometric shape and topological structure of the three-dimensional entity through the hierarchical structure of vertices, edges and faces. The vertices constitute the geometric basis, the edges connect the vertices to form a linear framework, and the faces are surrounded by the edges to define the surface area, which together form a complete boundary representation model. This step organizes the discrete geometric data into a structured model, providing input for subsequent format conversion.
[0151] Based on the boundary representation model, the geometric entity and the topological connection information included in the boundary representation model are converted into a standardized STEP format file according to the product data model defined by the STEP standard. The conversion process first maps the vertices, edges and faces of the boundary representation model to STEP entities, such as Cartesian point entities in STEP, Edge entities in STEP, and Face entities in STEP. The topological connection information is described by the topological relationship entities in STEP, such as Edge loop and Face bound entities that define the boundary of the face. The conversion algorithm traverses all elements of the boundary representation model to generate text data that conforms to the syntax structure of STEP, forming a STEP format file. The STEP format file uses a neutral file format, including a header section and a data section. The header section records file metadata, and the data section stores geometric and topological entities. This conversion ensures that the geometric data is compatible with the standard, supporting cross-system data exchange and long-term storage.
[0152] The STEP format file is written in bulk to the specified path through the parallel I / O interface. The parallel I / O interface uses a multi-threaded approach to write multiple file blocks simultaneously, improving write efficiency. The write process applies a data blocking strategy to divide large STEP format files into uniformly sized file blocks, each of which is processed independently. The data blocking strategy dynamically determines the number of blocks based on file size and system resources to optimize storage performance. A checksum is generated for each block-processed file, and the checksum uses a hash algorithm to calculate the digital fingerprint of the file content, such as the SHA-256 algorithm to generate a unique hash value. The checksum is attached to the file metadata for subsequent verification of data integrity. This step realizes efficient and reliable data storage, ensuring the consistency of the data set during transmission and storage.
[0153] In a second aspect, the present application provides a complex model data set creation system containing cross features, which is applied to the complex model data set creation method containing cross features as described above, and comprises:
[0154] a base entity generation module configured to collect base size parameters from a geometric data source and generate a rectangular base entity in a preset size range by parameterization;
[0155] a surface conversion module configured to take the rectangular base entity as input, randomly select three surfaces, and convert the selected surfaces into B-spline surfaces, wherein each surface is defined by a dense control point grid, and perturbation of the control points is constrained within a range of the original plane normal direction;
[0156] a surface integration module configured to replace the corresponding surfaces of the rectangular base entity with the converted B-spline surfaces to obtain a complex base model with complex curved surface features;
[0157] a surface processing module configured to perform triangulation processing on selected surfaces of the complex base model to obtain a triangular cell grid, and perform point sampling within the triangular cell grid to obtain sampling points;
[0158] a sketch processing module configured to take the sampling points as input, construct a sketch bounding box, match a sketch type according to a feature type in a predefined feature library, and adjust the sketch bounding box to adapt to a non-planar boundary of a B-spline surface;
[0159] a feature generation module configured to perform a stretching operation according to the adjusted sketch bounding box to generate a three-dimensional feature entity, integrate the three-dimensional feature entity with the complex base model by Boolean operation, and generate an intersection feature;
[0160] a data output module configured to number and identify the generated intersection feature, store a complex geometric model entity including the number identification and the intersection feature in a preset format, and output as a structured data set for artificial intelligence training.
[0161] The application provides a complex model dataset creation system containing cross features, applied to a complex model dataset creation method containing cross features, and the system includes multiple modules working cooperatively to realize generation of a complex model dataset from basic geometric data. A basic entity generation module collects basic size parameters from a geometric data source and parameterizes a rectangular basic entity in a preset size range. Specifically, the basic entity generation module constructs a cubic grid structure by using a boundary representation method, and the generation process of the cubic grid structure includes generating multiple vertices through vertex coordinate calculation, forming multiple edges based on the vertex coordinates by using an edge connection algorithm, and constituting multiple planes by using a face combination algorithm with the edges as input. With the constructed cubic grid structure as a basis, multiple rectangular basic entities are synchronously generated by using a multi-thread parallel computing mode, the multi-thread parallel computing adopts a dynamic load balancing strategy, allocates an independent memory space for each generation thread, and avoids data conflicts by using a mutual exclusion lock mechanism. This step provides a structured geometric basis for subsequent surface conversion.
[0162] A surface conversion module takes the rectangular basic entity as input, randomly selects three surfaces, and converts the selected surfaces into B-spline surfaces. Each surface is defined by a dense control point grid, and the disturbance of the control points is constrained within the range of the normal direction of the original plane. The establishment process of the control point grid includes mapping a two-dimensional uniform grid point array to a three-dimensional plane space, and realizing accurate positioning of the grid points by using a coordinate transformation algorithm. A random offset vector of each control point in the normal direction of the original plane is generated by using a Gaussian distribution function, and the amplitude of the offset vector is limited to avoid self-intersection of the surface. The generation of the random offset vector adopts a constraint optimization algorithm, the offset direction is constrained within a certain angle range of the plane normal, and the offset amplitude is limited within a certain proportion of the plane side length. The control points with the random offset vectors are taken as input, and a non-uniform rational B-spline algorithm is applied for interpolation calculation to generate a B-spline surface.
[0163] The surface generation process of the surface conversion module enhances the real complexity of the model and provides technical support for creation of a complex basic model.
[0164] A surface integration module replaces the corresponding surfaces of the rectangular basic entity with the converted B-spline surfaces to obtain a complex basic model with complex curved surface features. This replacement operation is realized by a geometric integration algorithm, so that the complex basic model retains the topological structure of the original entity and introduces surface diversity. The complex basic model serves as a carrier for feature generation and lays a geometric foundation for subsequent cross feature integration.
[0165] The surface processing module triangulates the selected surface of the complex base model to obtain a triangular element mesh, and samples points in the triangular element mesh. The triangulation process uses a mesh division algorithm to discretize the curved surface into triangular patches. The point sampling process uses a Monte Carlo sampling algorithm to achieve a uniform probability distribution of the sampling points. The sampling points serve as the basis for feature positioning and provide input for sketch construction.
[0166] The triangulation and sampling operations of the surface processing module ensure the randomness and reasonableness of feature distribution.
[0167] The sketch processing module takes the sampling points as input, constructs a sketch bounding box, matches the sketch type according to the feature type in the predefined feature library, and adjusts the sketch bounding box to adapt to the non-planar boundary of the B-spline surface. The predefined feature library includes various standard feature types such as rectangular through holes, blind holes, and steps, and the feature library uses a hierarchical data structure for storage. Each feature type is associated with a corresponding sketch type rule and a stretching parameter range.
[0168] The feature type matching process uses a dynamic lookup table mechanism to automatically select the optimal sketch type combination from the data structure based on the feature complexity. When adjusting the sketch bounding box, the edges of the sketch bounding box that coincide with the boundary of the B-spline surface are identified as generating edges. The generating edges are removed based on the identified generating edges, and the sketch height is extended along the normal direction of the B-spline surface. The integration with the surface geometry is completed through the extended sketch boundary.
[0169] The adjustment mechanism of the sketch processing module solves the adaptation problem of feature generation in a free-form surface environment and achieves seamless integration of the sketch and the surface.
[0170] The feature generation module performs stretching operations according to the adjusted sketch bounding box to generate three-dimensional feature entities. The three-dimensional feature entities are integrated with the complex base model through Boolean operations to generate cross features. The stretching operation is performed according to the sketch type and feature parameters to generate entity geometry. The Boolean operation uses a dependency analysis algorithm to determine the priority order of feature categories and establishes a feature priority queue. The feature priority queue is used as a guide to construct an entity geometry tree structure, and the Boolean difference set operation is executed in priority order. The Boolean operation uses a B-rep intersection algorithm to calculate the intersection curve of the three-dimensional feature entities and the complex base model, and retains the corresponding regions according to the Boolean difference set operation type. The number of cross features is multiple, and the random feature distribution is achieved in the triangulated surface area through the sampling algorithm. The generation order uses a dynamic optimization strategy to adjust the generation sequence in real time based on the geometric dependency between features.
[0171] The Boolean operation and dynamic optimization of the feature generation module ensure the geometric coordination and topological integrity between features.
[0172] The data output module numbers and identifies the generated cross features, and stores the complex geometric model entity including the number identification and the cross features in a preset format, and outputs a structured data set for artificial intelligence training. The number identification assigns a unique identifier to each geometric face of the cross feature using a hash algorithm. The number identification uses a hierarchical coding scheme to assign a basic number to each feature and a sub-number to each face sheet inside each feature. The unique identifier is used as an index key to establish an index relationship between the unique identifier and the corresponding geometric data, and the index relationship is stored in a metadata file. The metadata file is stored in JSON format, and the metadata file includes feature parameters, distribution information and geometric topological relationship description. The complex geometric model entity is serialized using a boundary representation method to a STEP format conversion algorithm to obtain a STEP format file, which is stored in batches to a specified path through parallel I / O operation, and the data block strategy is applied to process the file during batch storage, and a check code is generated for each data file.
[0173] The number and storage mechanism of the data output module realizes accurate identification and efficient management of the features, and supports generation of large-scale data sets.
[0174] The modules of the system are logically connected through sequential execution and data processing flow, the basic entity generation module provides geometry basis, the surface conversion module and the surface integration module introduce surface complexity, the surface processing module and the sketch processing module prepare the feature generation environment, the feature generation module integrates cross features, and the data output module completes data packaging to form a complete technical solution.
[0175] The technical scheme effectively solves the technical problems of insufficient model authenticity, limited diversity and low computing efficiency caused by the use of regular cubic basic construction units and serial processing mode in the existing geometric feature data set creation technology. The technical scheme first generates a rectangular basic entity using a parameterization method, but breaks through the limitations of the existing regular cubic, constructs a cubic grid structure through a boundary representation method, and synchronously generates multiple entities using a multi-thread parallel computing mode, significantly improving the data processing efficiency and overcoming the low resource utilization rate of serial processing.
[0176] On the basis of the basic model, the technical scheme introduces surface complexity by randomly selecting three surfaces and converting them into B-spline surfaces. Each surface is defined using a dense control point grid, and the perturbation of the control points is strictly constrained within the range of the original plane normal direction. A random offset vector is generated using a Gaussian distribution function to avoid self-intersection of the surface, thereby generating a complete and morphologically diverse free-form surface in geometry. This surface conversion process simulates complex geometric structures in the real world, such as turbine blades in the aerospace field or irregular cavities in mold design, enhancing the authenticity and geometric complexity of the data set.
[0177] The curved surface integration stage replaces the corresponding surface of the B-spline curved surface with the basic entity to form a complex basic model with complex curved surface characteristics. This step realizes the seamless fusion of curved surfaces and entities through a geometric integration algorithm, providing diversified geometric carriers for subsequent feature generation. Compared with existing methods, the complex basic model can better support the construction of cross features such as hooks and grooves.
[0178] The feature generation link adopts a programmed method to perform triangulation processing and point sampling based on the complex basic model to obtain randomly distributed points. By constructing a sketch boundary box and matching the sketch type according to the feature type in the pre-defined feature library, the technical solution can dynamically adjust the sketch boundary to adapt to the non-planar boundary of the B-spline curved surface. The feature library includes various standard feature types such as rectangular through holes, blind holes, and steps, and adopts a hierarchical data structure and a dynamic lookup table mechanism to automatically select the optimal sketch type combination, ensuring the diversity and accuracy of feature generation.
[0179] The cross feature integration is realized through Boolean operations, and a feature priority queue is established by using a dependency relationship analysis algorithm to determine the priority order of feature categories and sequentially performing Boolean difference set operations. The B-rep intersection algorithm is used in the Boolean operation to calculate the intersection line ring and preserve the corresponding area, ensuring the geometric coordination and topological integrity between features. The feature generation order adopts a dynamic optimization strategy to be adjusted in real time according to the geometric dependency relationship between features, further enhancing the randomness and rationality of feature distribution.
[0180] Finally, the technical solution numbers and identifies the generated cross features, assigns a unique identifier using a hash algorithm, and manages feature data through a hierarchical coding scheme. The data set is stored in STEP format, and parallel I / O operations and data blocking strategies are used to efficiently output structured data sets. The process of the present invention cooperates through data flow between steps, from basic model construction to feature integration and then to data packaging, forming a complete automation processing chain. Not only does it improve the diversity and authenticity of the data set, but it also supports the application needs of artificial intelligence training in complex working conditions.
[0181] The present invention provides a complex model data set creation method and system containing cross features, aiming to solve the technical problems of insufficient model authenticity, limited diversity, and low computational efficiency caused by the use of regular cubic basic construction units and serial processing methods in existing geometric feature data set creation techniques. The implementation scheme is based on computer graphics, three-dimensional modeling, and artificial intelligence data processing technology, and realizes the complete process from basic model construction to final data set generation through innovative steps.
[0182] The present invention creates a complex basic model:
[0183] The first step is to generate a basic model with complex curved surface features as a geometric carrier for subsequent feature construction. Existing methods use regular cubes, which cannot simulate complex curved surfaces in the real world. The present invention enhances model realism by introducing B-spline surfaces. The specific process is as follows:
[0184] Collect basic size parameters from geometric data sources, and parameterize to generate rectangular basic entities within a preset size range (length, width and height are all 10-50 mm). Use boundary representation method to construct a cubic grid structure: generate 8 vertices by vertex coordinate calculation, form 12 edges based on vertex coordinates using edge connection algorithm, and then form 6 planes by using edge as input through face combination algorithm. Use multi-thread parallel computing to generate multiple rectangular basic entities, and use dynamic load balancing strategy to allocate independent memory space for each generation thread, and use mutex lock mechanism to avoid data conflict and improve generation efficiency.
[0185] Randomly select three surfaces (such as the front surface, upper surface and left surface) of the rectangular basic entity, and convert the selected surfaces to B-spline surfaces. Each surface uses a dense control point grid definition (21x21 control points), and the perturbation of the control points is constrained within the original plane normal direction range to avoid self-intersection of the surface. The establishment process of the control point grid includes mapping a two-dimensional uniform grid point array to a three-dimensional plane space, and achieving accurate positioning of the grid points through coordinate transformation algorithm. A Gaussian distribution function is used to generate a random offset vector for each control point in the normal direction, and a constraint optimization algorithm is used to generate the offset vector, with the offset direction constrained within 30 degrees of the plane normal and the offset amplitude limited within 5% of the plane edge length. The control points with random offset vectors are used as input to apply non-uniform rational B-spline algorithm for interpolation calculation to generate smooth B-spline surfaces.
[0186] Replace the generated B-spline surfaces with the corresponding surfaces of the rectangular basic entity to obtain a complex basic model with complex curved surface features. This replacement operation is realized through a geometric integration algorithm, which ensures that the complex basic model retains the topological structure of the original entity, while introducing surface diversity to provide a geometric basis for subsequent feature generation. The creation process of the complex basic model is shown in Figure 2
[0187] Generation of cross features of the present invention:
[0188] Based on the complex basic model, the implementation scheme generates cross features using a programmed method, and each feature is derived from a pre-defined feature library, including 24 standard types such as rectangular through holes, blind holes, steps, etc. (as shown in Figure 3 (As shown). The feature library is stored using a hierarchical data structure, with each feature type associated with a corresponding sketch type rule and stretching parameter range. The cross-feature generation process ensures geometric consistency and diversity between features, and the specific steps are as follows:
[0189] The selected surface of the complex basic model is triangulated to obtain a triangular element mesh. The triangulation process employs a mesh generation algorithm to discretize the curved surface into triangular patches. Point sampling is performed within the triangular element mesh to obtain sampling points. The point sampling process uses a Monte Carlo sampling algorithm to achieve a probabilistically uniform distribution, resulting in randomly distributed points. These sampling points serve as the basis for feature localization, providing input for sketch construction.
[0190] Using sampling points as input, a sketch bounding box is constructed. The sketch type is matched against features from a predefined feature library. This feature type matching process employs a dynamic lookup table mechanism, automatically selecting the optimal combination of sketch types from the data structure based on feature complexity. Sketch types include four types (e.g., ...). Figure 4 (As shown): Type 1 has 4 free edges, Type 2 has 3 free edges and 1 generated edge, Type 3 has 2 free edges and 2 generated edges, and Type 4 has 1 free edge and 3 generated edges. Generated edges are located on the outer boundary of the B-Rep surface to which features are added, while free edges are strictly located inside the boundary. The sketch bounding box is adjusted to fit the non-planar boundary of the B-spline surface. The adjustment process includes identifying edges in the sketch bounding box that coincide with the boundary of the B-spline surface as generated edges, removing generated edges based on the identified generated edges, and extending the sketch height along the normal direction of the B-spline surface. The integration with the surface geometry is achieved through the extended sketch boundary. This adjustment mechanism solves the adaptation problem of feature generation in freeform surface environments, such as... Figure 5 As shown, this document illustrates 12 types of sketches that require modification and the results of those modifications.
[0191] The three-dimensional feature entity is generated by stretching operation according to the adjusted sketch bounding box. The stretching operation is performed according to the sketch type and feature parameters to generate entity geometry. The three-dimensional feature entity is integrated with the complex base model through Boolean operation to generate cross features. The Boolean operation uses a dependency analysis algorithm to determine the priority order of feature categories, establishes a feature priority queue (the priority order is: step class features first, through hole class features second, blind hole class features third, and transition features such as chamfer and fillet last), and uses the entity geometry tree structure to perform Boolean difference set operation according to the priority order. The Boolean operation uses a B-rep intersection algorithm to calculate the intersection line ring of the three-dimensional feature entity and the complex base model, and retains the corresponding area according to the Boolean difference set operation type. The number of cross features is 8 to 12, and the random feature distribution is realized in the surface area after triangulation through a sampling algorithm. The generation sequence uses a dynamic optimization strategy to adjust the generation sequence in real time according to the geometric dependency relationship between features. The feature generation process takes sketch type 3 as an example, as shown in Figure 6
[0192] The data set generation and output of the present application are as follows:
[0193] The last step of the embodiment is to number and identify the generated cross features, and output as a structured data set for artificial intelligence training. This step ensures the integrity and accessibility of the data set:
[0194] The generated cross features are numbered and identified, and a hash algorithm is used to assign a unique identifier to each geometric face of each cross feature. The numbering and identification use a hierarchical coding scheme, which assigns a base number to each feature based on the hierarchical coding scheme, and assigns a sub-number to each face inside each feature. The unique identifier is used as an index key to establish an index relationship between the unique identifier and the corresponding geometric data, and the index relationship is stored in a metadata file. The metadata file is stored in JSON format, and the metadata file includes feature parameters, distribution information and geometric topology relationship description.
[0195] The complex geometric model entity including numbering and identification and cross features is stored in a preset format. A boundary representation to STEP format conversion algorithm is used for serialization to obtain a STEP format file. The data is stored in batches through parallel I / O operation to a specified path, and a data block strategy is applied to process the file during batch storage, and a check code is generated for each data file to ensure data integrity. The finally output data set has a random feature distribution, as shown in Figure 7
[0196] The application illustrates the implementation scheme with a specific example: first, a 50x15x30 prism base unit is created, and then the front, upper and left surfaces of the base unit are selected to construct B-spline surfaces to form a new base unit. Taking the rectangular through slot feature on the left surface as an example, the feature result is as shown in Figure 9 The surface is triangularly cut, point sampled, sketch type 2 boundary is generated, and the feature is generated. All features are generated in sequence according to this method, such as inclined through step features and rectangular through hole features, to ensure the richness of the data set.
[0197] The implementation scheme of the application realizes the automation process from the construction of the base model to the integration of the feature set through the above steps, significantly improves the authenticity, diversity and generation efficiency of the data set, and supports AI model training and engineering application in the fields of aerospace and mold design. The system adopts modular design, including a base entity generation module, a surface conversion module, a surface integration module, a surface processing module, a sketch processing module, a feature generation module and a data output module, which work collaboratively to form a complete technical solution.
[0198] The technical features of the application are explained as follows:
[0199] The rectangular base entity is constructed in step 1 in the application, and the basic size parameters are collected from the geometric data source, and are parameterized generated within the preset size range (length, width and height are all 10-50 mm). The construction process adopts boundary representation method, first calculates 8 vertices through vertex coordinates, and each vertex is determined based on the basic size parameters to determine the spatial position to form the basic framework of the cubic grid; then 12 edges are formed based on the calculated vertex coordinates using edge connection algorithm, and the edge connection algorithm connects the vertices in a specific order according to the geometric topological relationship of the cube to form a linear skeleton; then the edges formed are taken as input to form 6 planes through the face combination algorithm, and the face combination algorithm groups the edges and encloses the closed area to define the plane, thereby completing the construction of the cubic grid structure. Multiple rectangular base entities are generated synchronously using multi-thread parallel computing mode, and the multi-thread parallel computing mode uses dynamic load balancing strategy to allocate independent memory space for each generation thread, and avoids data conflict through mutex mechanism to improve generation efficiency and reliability. The rectangular base entity serves as an initial geometric carrier to provide a structured basis for subsequent surface conversion, and its construction guarantees the basic geometric diversity of the model, supporting complex processing in subsequent steps.
[0200] The B-spline surface is constructed in step 2 of the present application, with a rectangular base entity as input, and three surfaces (such as the front surface, the upper surface, and the left surface) are randomly selected for conversion. The construction process uses a dense control point grid definition (21x21 control points), and the establishment of the control point grid includes mapping a two-dimensional uniform grid array to a three-dimensional plane space, and achieving accurate positioning of the grid points through a coordinate transformation algorithm, so that each point in the two-dimensional array corresponds to a specific location on the three-dimensional plane. The perturbation of the control points is constrained within the range of the original plane normal direction, and a Gaussian distribution function is used to generate a random offset vector for each control point in the normal direction. The generation of the offset vector uses a constraint optimization algorithm, and the offset direction is constrained within 30 degrees of the plane normal in the positive and negative directions, and the offset amplitude is limited within 5% of the plane side length to avoid self-intersection of the surface. The control points with random offset vectors are used as input, and a non-uniform rational B-spline algorithm is applied for interpolation calculation to generate a smooth and continuous B-spline surface. This construction process introduces surface complexity and randomness, simulates free-form surface structures in the real world, provides a geometric basis for the creation of complex base models, and enhances the realism of the data set.
[0201] The complex base model is constructed in step 3 of the present application, and is obtained by replacing the corresponding surfaces of the rectangular base entity with the B-spline surface obtained in step 2. The replacement operation is realized by using a geometric integration algorithm, which ensures the seamless fusion of the B-spline surface with the original entity, while preserving the topological structure of the original entity. The complex base model inherits the framework of the rectangular base entity, but the surfaces are replaced by B-spline surfaces, thus having complex curved surface characteristics, such as uneven or smooth transition geometry. This model serves as a carrier for subsequent feature generation, providing a diversified geometric environment to support the addition and integration of cross-features. The construction process focuses on geometric coordination to avoid conflicts between the surface and the entity, ensuring the integrity and stability of the model, and laying a foundation for surface processing in step 4.
[0202] The triangular cell grid is constructed in step 4 of the present application, and is obtained by triangulating the selected surface of the complex base model. Triangulation uses a mesh division algorithm to discretize the curved surface into triangular patches, and the algorithm calculates the triangular vertices and edges based on the geometric topological relationship of the surface, forming a uniform or adaptive mesh structure. The construction of the triangular cell grid ensures uniform coverage of the surface area and provides a discretization basis for point sampling. Point sampling is performed in the triangulated grid, and a Monte Carlo sampling algorithm is used to achieve a probability uniform distribution sampling, obtaining randomly distributed sampling points. The sampling points are used as input for feature positioning in the subsequent sketch construction, and this step enhances the randomness and rationality of feature distribution, avoiding clustering or blank areas, and supporting programmatic feature generation.
[0203] Three-dimensional feature entities are constructed in the present application in step 6, generated by stretching operation according to the sketch bounding box adjusted in step 5. The stretching operation is performed according to the feature types and parameters in the predefined feature library, such as rectangular through holes or blind holes, and the entity geometry is formed by extending the material along the path of the sketch bounding box. The generated three-dimensional feature entity has a specific shape and size, such as a hole, a notch or a step, and each entity is dynamically generated based on the sampling point position and the feature type. The construction process guarantees geometric accuracy and integrity, avoids self-intersection or invalid geometry, and prepares for Boolean operation integration. The three-dimensional feature entity is an integral part of the cross feature, which is combined with the complex base model through subsequent integration, enriching the geometric diversity of the model.
[0204] Complex geometric model entities are constructed in the present application in step 7, including numbered identification and cross features as the final output. The construction process first numbers the cross features generated in step 6, using a hash algorithm to assign a unique identifier to each geometric face, and uses a hierarchical coding scheme to assign a base number to each feature and a sub-number to the internal face. Then the identifier is indexed with the geometric data and stored in the metadata file. The complex geometric model entity integrates all features and base models, describes its geometry and topology through boundary representation method, and finally stores it in a preset format (such as STEP). This entity is output as a structured data set for artificial intelligence training, ensuring data integrity and accessibility.
[0205] Boundary representation model is used in the present application to construct a cubic grid structure (step 1), which describes three-dimensional geometry through a hierarchical structure of vertices, edges and faces. The construction process includes generating 8 vertices, forming 12 edges through edge connection algorithm, and constructing 6 planes through face combination algorithm, which together define the boundary of the cube. The boundary representation model provides an accurate mathematical description of the geometric entity, supporting subsequent operations such as surface conversion and Boolean operation. In the data processing path, it serves as a basic framework to ensure the structuring and consistency of geometric data, providing a reliable geometric basis for the present application.
[0206] The construction of entity geometry tree structure is used in the present application for Boolean operation integration in step 6, which determines the priority order of feature categories through dependency analysis algorithm and establishes a feature priority queue (such as step class first, then through hole class). Guided by the priority queue, the tree structure is used to perform Boolean difference set operation in order, with the complex base model as the root node and the three-dimensional feature entity as the child node, integrated through Boolean operation (such as difference set). The construction process guarantees the geometric coordination between features, avoiding interference or conflict, and generates the final cross feature model. This structure optimizes the operation efficiency and supports the dynamic generation of complex models.
[0207] The hierarchical data structure is used in the present application for predefining feature library (step 5), storing 24 standard feature types (such as rectangular via, blind hole, etc.). The construction process adopts tree topology to organize feature types, and each type is associated with sketch type rules and stretching parameter range. The data structure supports dynamic lookup table mechanism, and automatically selects the optimal sketch type combination according to feature complexity. In the data processing path, it provides the basis for feature matching, ensures the diversity and accuracy of feature generation, and enhances the adaptability and efficiency of the program.
[0208] The product data model is used in the present application for data output of step 7, and is defined according to STEP standard, converting the boundary representation model into a standardized STEP format file. The construction process includes mapping geometric entities (such as vertices, edges, and faces) to STEP entities (such as Cartesian points and edges), and defining topological connection information. The product data model ensures the cross-system compatibility and long-term storage of geometric data, and supports data exchange for artificial intelligence training. At the end of the data processing path, it completes data encapsulation, outputs structured data sets, and improves the engineering application value of the model.
[0209] Vertex coordinate calculation is a basic geometric processing algorithm in computer graphics, used to determine the position of a point in three-dimensional space. In the present application, vertex coordinate calculation is applied to the generation of the cubic grid structure in step 1, based on the collected basic size parameters (length, width, and height range 10-50 mm) to calculate the spatial coordinates of 8 vertices. The calculation process determines the (x, y, z) coordinates of each vertex based on the geometric properties of the cube through parameterized formulas, for example, for a cuboid, the vertex coordinates are derived based on the origin, length, width, and height. This algorithm provides a geometric basis for subsequent edge connection and face combination, ensuring the accurate construction of the cubic grid and supporting the generation of rectangular basic entities. In the data processing path, vertex coordinates are used as input for the edge connection algorithm, forming the basic framework of the grid and thus initializing the model creation process.
[0210] The edge connection algorithm is a key step in mesh generation, used to connect vertices into edges to form a linear structure of geometric entities. In step 1 of the present application, the edge connection algorithm processes the 8 vertices generated by the vertex coordinate calculation, forming 12 edges based on the topological relationship of the cube (such as adjacent vertex pairs). The algorithm identifies adjacent vertex pairs by traversing the vertex list and establishing edge connection relationships, for example, using Euclidean distance to determine connectivity. The edge set output by the edge connection algorithm is used as input for the face combination algorithm, constructing the skeleton of the cube and ensuring geometric continuity. This step connects the previous step in the data processing path, converting discrete vertices into a structured edge network and laying the foundation for face formation.
[0211] The face patch assembly algorithm is used to combine edges into planes, forming closed geometric surfaces. In step 1 of the present invention, the face patch assembly algorithm takes the 12 edges generated by the edge connection algorithm as input, and forms 6 planes (such as the six faces of a cube) by grouping edge sets. The algorithm identifies coplanar edge sets and defines planes based on the area enclosed by the edges, such as through normal vector calculation and boundary detection to ensure the closure of the plane. The face patch assembly algorithm completes the construction of the cube mesh, outputting a complete boundary representation model. In the data processing path, this algorithm converts linear edge structures into two-dimensional patches, realizing geometric upgrading from edges to surfaces, providing surface definition for subsequent entity generation.
[0212] Multi-thread parallel computing is a high-performance computing technology that improves processing efficiency by executing multiple tasks simultaneously. In step 1 of the present invention, multi-thread parallel computing is used to synchronously generate multiple rectangular base entities, based on a dynamic load balancing strategy to allocate thread tasks. Each thread independently processes cube mesh generation, allocates independent memory space, and avoids data conflicts through mutex mechanism, such as synchronized access to shared resources between threads. This algorithm significantly speeds up the entity generation process, supporting large-scale data set creation. In the data processing path, multi-thread parallel computing optimizes resource utilization, ensuring efficient execution of step 1, and providing multiple entity input for subsequent surface conversion.
[0213] The coordinate transformation algorithm is used to map point coordinates from one coordinate system to another, achieving spatial conversion. In step 2 of the present invention, the coordinate transformation algorithm is applied to the establishment of the control point grid, mapping a two-dimensional uniform grid array to a three-dimensional plane space. Based on the plane normal direction and size parameters, the algorithm calculates three-dimensional coordinates through rotation and translation transformation, ensuring accurate positioning of the grid points on the B-spline surface. The coordinate transformation algorithm outputs a three-dimensional control point grid as the basis for random offset. In the data processing path, this algorithm bridges two-dimensional and three-dimensional spaces, providing accurate control point layout for surface generation, supporting subsequent perturbation and interpolation.
[0214] The Gaussian distribution function is a core function in probability statistics, used to generate normally distributed random numbers. In step 2 of the present invention, the Gaussian distribution function generates a random offset vector for each control point in the original plane normal direction, with a mean of zero and a controlled standard deviation to limit the amplitude. The function produces random displacement values as perturbation input, avoiding surface self-intersection. For example, the Box-Muller transformation is used to generate normally distributed random numbers. In the data processing path, the Gaussian distribution function introduces randomness, enhancing the diversity of the surface, outputting perturbed control points for use by the Non-Uniform Rational B-Spline algorithm, ensuring natural variation of the surface.
[0215] The non-uniform rational B-spline algorithm is an advanced algorithm for curve and surface modeling, used for interpolation calculation to generate smooth surfaces. In step 2 of the invention, the algorithm takes control points with random offset vectors as input, calculates the surface point coordinates through base function weighted combination. The algorithm processes the control point grid, defines the parameter space combined with node vectors, and generates B-spline surfaces. The non-uniform rational B-spline algorithm outputs smooth and continuous surface geometry, supporting complex shape representation. In the data processing path, this algorithm converts the perturbed control points into the final surface, realizing the conversion from point cloud to surface, providing input for surface integration.
[0216] The constraint optimization algorithm is used to optimize parameters under constraints, ensuring that the results meet the constraints. In step 2 of the invention, the constraint optimization algorithm controls the generation of random offset vectors, constraining the offset direction within 30 degrees of the plane normal and limiting the offset magnitude within 5% of the plane edge length. The algorithm adjusts the offset value through iteration to avoid violating constraints, such as using the Lagrange multiplier method. In the data processing path, the constraint optimization algorithm ensures the reasonableness of the surface geometry, prevents self-intersection or distortion, outputs compliant offset vectors, and enhances the authenticity and usability of the surface.
[0217] The mesh division algorithm is used to discretize the surface into simple elements, such as triangular patches. In step 4 of the invention, the mesh division algorithm performs triangulation processing on the selected surface of the complex base model, dividing the B-spline surface into a triangular element grid. The algorithm generates triangles based on vertex and edge data through Delaunay triangulation or advancing front method, ensuring grid uniformity. The mesh division algorithm outputs a triangular element grid as the basis for point sampling. In the data processing path, this algorithm converts continuous surfaces into discrete grids, facilitating subsequent sampling and feature positioning, supporting feature generation processes.
[0218] The Monte Carlo sampling algorithm is a random sampling technique that generates sample points based on probability distribution. In step 4 of the invention, the Monte Carlo sampling algorithm performs point sampling within the triangular element grid, achieving probability uniform distribution sampling. The algorithm calculates the area weight of each triangle, randomly selects a triangle and generates internal point coordinates, ensuring random distribution of sampling points. The Monte Carlo sampling algorithm outputs the sampling point results, representing random feature positions. In the data processing path, this algorithm provides feature positioning points, providing input for sketch construction, enhancing data set diversity and randomness, and supporting subsequent feature generation steps.
[0219] Vertex coordinate calculation is a basic geometric processing algorithm in computer graphics, used to determine the position of points in three-dimensional space. In this invention, vertex coordinate calculation is applied to the generation of the cubic grid structure in step 1, based on the collected basic size parameters (length, width, and height range 10-50 mm) to calculate the spatial coordinates of 8 vertices. The calculation process is based on the geometric properties of the cube, and the (x, y, z) coordinates of each vertex are determined by a parameterized formula, for example, for a cuboid, the vertex coordinates are derived based on the origin, length, width, and height. This algorithm provides a geometric basis for subsequent edge connection and face combination, ensuring the accurate construction of the cubic grid and supporting the generation of rectangular basic entities. In the data processing path, vertex coordinates are used as input for the edge connection algorithm to form the basic framework of the grid, thus initializing the model creation process.
[0220] Edge connection algorithm is a key step in mesh generation, used to connect vertices into edges to form linear structures of geometric entities. In step 1 of this invention, the edge connection algorithm processes the 8 vertices generated by the vertex coordinate calculation, and forms 12 edges based on the topological relationship of the cube (such as adjacent vertex pairs). The algorithm identifies adjacent vertex pairs by traversing the vertex list and establishing edge connection relationships, for example, using Euclidean distance to judge connectivity. The edge set output by the edge connection algorithm is used as input for the face combination algorithm to construct the skeleton of the cube, ensuring geometric continuity. This step connects the discrete vertices to a structured edge network in the data processing path, laying the foundation for face formation.
[0221] Face combination algorithm is used to combine edges into planes to form closed geometric surfaces. In step 1 of this invention, the face combination algorithm takes the 12 edges generated by the edge connection algorithm as input, and forms 6 planes (such as the six faces of a cube) by grouping the edge set. The algorithm identifies coplanar edge sets and defines planes based on the area enclosed by the edges, for example, by using normal vector calculation and boundary detection to ensure the closure of the plane. The face combination algorithm completes the construction of the cubic grid and outputs a complete boundary representation model. In the data processing path, this algorithm converts linear edge structures into two-dimensional faces, achieving geometric upgrading from edges to faces, and providing surface definitions for subsequent entity generation.
[0222] Multi-thread parallel computing is a high-performance computing technology that improves processing efficiency by executing multiple tasks simultaneously. In step 1 of this invention, multi-thread parallel computing is used to simultaneously generate multiple rectangular basic entities based on a dynamic load balancing strategy. Each thread independently processes the generation of a cubic grid, allocates independent memory space, and avoids data conflicts through the use of mutex mechanisms, such as synchronized access to shared resources between threads. This algorithm significantly speeds up the entity generation process and supports the creation of large-scale data sets. In the data processing path, multi-thread parallel computing optimizes resource utilization, ensuring efficient execution of step 1, and providing multiple entity inputs for subsequent surface conversion.
[0223] The coordinate transformation algorithm is used to map point coordinates from one coordinate system to another, enabling spatial conversion. In step 2 of the invention, the coordinate transformation algorithm is applied to the establishment of the control point grid, mapping a two-dimensional uniform grid array to a three-dimensional planar space. The algorithm calculates three-dimensional coordinates through rotation and translation transformation based on the plane normal direction and size parameters, ensuring accurate positioning of the grid points on the B-spline surface. The coordinate transformation algorithm outputs a three-dimensional control point grid as the basis for random offset. In the data processing path, this algorithm bridges two-dimensional and three-dimensional spaces, providing accurate control point layout for surface generation, supporting subsequent perturbation and interpolation.
[0224] The Gaussian distribution function is a core function in probability statistics, used to generate normally distributed random numbers. In step 2 of the invention, the Gaussian distribution function generates a random offset vector for each control point in the original plane normal direction, with a mean of zero and a controlled standard deviation to limit the amplitude. The function produces random displacement values as perturbation input, avoiding surface self-intersection. For example, the Box-Muller transformation is used to generate normally distributed random numbers. In the data processing path, the Gaussian distribution function introduces randomness, enhancing surface diversity, and outputs perturbed control points for the non-uniform rational B-spline algorithm, ensuring natural variation of the surface.
[0225] The non-uniform rational B-spline algorithm is an advanced algorithm for curve and surface modeling, used for interpolation calculation to generate smooth surfaces. In step 2 of the invention, the algorithm takes the control points with random offset vectors as input, calculating the surface point coordinates through weighted combination of basis functions. The algorithm processes the control point grid, defining the parameter space with node vectors, generating a B-spline surface. The non-uniform rational B-spline algorithm outputs smooth and continuous surface geometry, supporting complex shape representation. In the data processing path, this algorithm converts the perturbed control points into the final surface, realizing the conversion from point cloud to surface, providing input for surface integration.
[0226] The constraint optimization algorithm is used to optimize parameters under constraints, ensuring that the results meet the constraints. In step 2 of the invention, the constraint optimization algorithm controls the generation of random offset vectors, constraining the offset direction within 30 degrees of the plane normal in both positive and negative directions, and limiting the offset amplitude within 5% of the plane edge length. The algorithm adjusts the offset value through iteration to avoid violating constraints, such as using the Lagrange multiplier method. In the data processing path, the constraint optimization algorithm ensures the rationality of the surface geometry, preventing self-intersection or distortion, and outputs compliant offset vectors, enhancing the authenticity and usability of the surface.
[0227] Meshing algorithm is used to discretize the surface into simple elements, such as triangular facets. In step 4 of the present application, the meshing algorithm triangulates the selected surface of the complex base model, dividing the B-spline surface into a triangular element mesh. The algorithm generates triangles based on vertex and edge data, ensuring mesh uniformity through Delaunay triangulation or advancing front method. The meshing algorithm outputs a triangular element mesh as the basis for point sampling. In the data processing path, this algorithm converts continuous surfaces into discrete meshes, facilitating subsequent sampling and feature positioning, supporting the feature generation process.
[0228] Monte Carlo sampling algorithm is a random sampling technique that generates sample points based on probability distribution. In step 4 of the present application, the Monte Carlo sampling algorithm performs point sampling within the triangular element mesh, achieving a uniform probability distribution of sampling points. The algorithm calculates the area weight of each triangle, randomly selects a triangle and generates internal point coordinates, ensuring random distribution of sampling points. The Monte Carlo sampling algorithm outputs the sampling point results, representing random feature positions. In the data processing path, this algorithm provides feature positioning points, providing input for sketch construction, enhancing data set diversity and randomness, and supporting subsequent feature generation steps.
[0229] Dynamic lookup table mechanism is an efficient data retrieval technique that pre-computes and stores key-value mapping relationships to achieve fast query and matching. In step 5 of the present application, the dynamic lookup table mechanism is applied to the feature type matching process, automatically selecting the optimal sketch type combination based on the hierarchical data structure of the predefined feature library. The mechanism first analyzes the geometric parameters of the input features, calculates the feature complexity value (based on the number of vertices, edges and faces), then queries the dynamic lookup table to find the corresponding feature type group, and selects the feature type with the matching degree of complexity according to the parameter range. In the data processing path, the dynamic lookup table mechanism serves as an intelligent bridge between the feature library and sketch generation, converting feature geometric properties into specific sketch rules, ensuring the accuracy and efficiency of feature generation, and supporting subsequent bounding box adjustment and stretching operations.
[0230] Dependency analysis algorithm is used to identify the geometric interference relationship between features, determine the processing priority to avoid computational conflicts. In step 6 of the present application, the algorithm analyzes the spatial overlap, coplanarity and topological connectivity of each three-dimensional feature entity with the complex base model, and assigns weights according to the degree of interference. The algorithm iterates through all the features to be integrated, detects overlapping regions and establishes a feature priority queue (order: step class > through-hole class > blind hole class > transition feature). In the data processing path, the dependency analysis algorithm provides sequence guidance for Boolean operations, ensuring that high-priority features perform difference set operations first to avoid geometric conflicts, ensuring the topological integrity and geometric consistency of the integrated model.
[0231] B-rep intersection algorithm is the core operation method in boundary representation model, which is used to calculate the intersection curve between two entities. In the Boolean operation of step 6 of the present application, the algorithm traverses all the face patches of the three-dimensional feature entity and the complex base model, quickly locates the possible intersecting face patch pair through space division, accurately calculates the intersection line segment through plane geometry calculation, and finally connects the adjacent line segments to form a closed intersection curve ring. In the data processing path, the B-rep intersection algorithm is based on the intersection curve ring to divide the area, according to the Boolean difference set type to retain the area of the base model which is not occupied, to realize the accurate integration of the feature and the base model, and to ensure the geometric correctness of the intersection feature.
[0232] Hash algorithm maps input data to a fixed-length unique identifier through a hash function, ensuring data consistency and traceability. In step 7 of the present application, the hash algorithm (such as SHA-256) assigns a unique identifier to each geometric face of the intersection feature, processes input including vertex coordinates, normal vectors, etc. attributes, and generates a hexadecimal string as a digital fingerprint. In the data processing path, the identifier output by the hash algorithm is used as an index key to establish a mapping relationship with the geometric data, supporting fast retrieval and integrity verification, and providing a basis for subsequent data storage and management.
[0233] JSON serialization converts data structures into text format, enabling cross-platform data exchange and persistent storage. In step 7 of the present application, JSON serialization processes metadata files, converting feature identifier indexes, geometric data, and topological relationship descriptions into standard JSON objects, using key-value pair structure to organize data. In the data processing path, the serialized JSON file includes structured content such as feature parameters and distribution information, supporting data parsing and access in artificial intelligence training, and enhancing the portability and readability of the data set.
[0234] Boundary representation to STEP format conversion algorithm converts geometric models into standardized neutral files, supporting industrial data exchange. In step 7 of the present application, the algorithm maps the vertices, edges, and faces of the boundary representation model to STEP entities (such as Cartesian point, Edge, Face), and describes the connection information through topological relationship entities (such as Edge loop). In the data processing path, the conversion algorithm generates a text file that conforms to the STEP syntax, including a header section (meta information) and a data section (geometric topology), ensuring that the model data is compatible with ISO standards, facilitating cross-system sharing and long-term archiving.
[0235] Data chunking strategy splits large files into uniform chunks to optimize storage and transmission efficiency. In step 7 of the invention, the strategy dynamically determines the number of chunks based on the size of the STEP file and system resources, splits the file into independent processing chunk units, and writes them to the storage path in parallel. In the data processing path, each file chunk is attached with a check code (such as SHA-256 hash value) for subsequent integrity verification. The strategy improves writing speed through parallel I / O operations and ensures efficient and reliable storage of large-scale data sets.
[0236] Dynamic load balancing strategy is a computing resource management technology used to dynamically allocate task loads in multi-threaded or distributed environments to optimize resource utilization and improve processing efficiency. The strategy monitors system resource status (such as CPU load, memory usage) and work queue length in real time, automatically adjusts task allocation scheme, and migrates tasks from high-load threads to low-load threads to ensure balanced workload for each thread. In the invention, the dynamic load balancing strategy is applied to the multi-threaded parallel computing process in step 1 to generate multiple rectangular base entities simultaneously. The specific data processing path is as follows: the strategy first initializes the thread pool and creates multiple generation threads based on the number of system cores; each thread independently processes the construction task of the cubic grid structure, including vertex coordinate calculation, edge connection algorithm, and face combination algorithm; the strategy dynamically monitors the progress and resource consumption of each thread, and when it detects that the load difference between threads exceeds the threshold, it redistributes the cubic grid tasks to be generated, such as transferring batches of unprocessed base size parameters to idle threads; through loop adjustment, the strategy ensures that all threads complete the generation of rectangular base entities simultaneously, avoiding the lag of individual threads affecting the overall process. This strategy improves the parallel efficiency of step 1, providing high-throughput geometric data basis for subsequent surface conversion, and supporting the rapid construction of large-scale data sets.
[0237] The mutex mechanism is a thread synchronization technique that controls access to shared resources through lock variables to prevent race conditions caused by multiple threads modifying data simultaneously. This mechanism is based on atomic operations, and threads apply for a lock before accessing the critical section. If the lock is already occupied, the thread will be blocked until the lock is released, ensuring mutual exclusion of resource access. In this invention, the mutex mechanism is integrated into the multi-thread parallel computation of step 1 to avoid data conflicts when generating rectangular base entities. The specific data processing path is as follows: when multiple threads access shared memory space (such as global arrays storing vertex coordinates), each thread calls a lock acquisition function before writing data to lock the corresponding memory area; after completing vertex calculation, edge connection, or face combination, the thread releases the lock to allow other threads to access; for example, in the edge connection algorithm, the thread needs to acquire the edge data lock before modifying the edge list to prevent concurrent writing from causing edge relationship confusion; the mutex mechanism works in conjunction with the dynamic load balancing strategy to protect the consistency of the task allocation data structure during load adjustment. This mechanism ensures the integrity and correctness of the geometric data in step 1, providing a stable multi-thread environment for the invention process and avoiding model errors caused by data competition.
[0238] The dynamic optimization strategy is an adaptive decision-making algorithm that dynamically adjusts the processing order or parameters based on real-time system state and input data characteristics to optimize the objective function (such as efficiency, quality, or resource consumption). This strategy is usually based on heuristic rules or machine learning models, continuously evaluating environmental changes and iteratively updating the strategy. In this invention, the dynamic optimization strategy is applied to the order adjustment of cross-feature generation in step 6 to optimize the feature sequence in real-time based on geometric dependencies. The specific data processing path is as follows: the strategy first analyzes the spatial relationships between each feature to be generated in the sampling point results (such as overlapping areas, coplanarity, and topological connection strength), and evaluates the dependency through geometric calculations; then it establishes a feature priority queue, prioritizing features with strong independence or basic characteristics (such as generating step features first, then processing through-hole features), to reduce the risk of conflict in subsequent Boolean operations; during the generation process, the strategy continuously monitors the feature integration state, and if it detects interference between new features and integrated features, it dynamically inserts adjustment operations (such as pausing the current feature, rolling back part of the operation, or reordering); for example, when generating a rectangular blind hole and finding overlap with existing step features, the strategy temporarily switches to generating an inclined through step to eliminate the conflict. This strategy ensures the geometric coordination of cross-feature integration in step 6, improving the robustness of the generation process and the topological quality of the final model.
Claims
1. A complex model dataset creation method comprising intersecting features, characterized by, Comprise: Step 1, collect basic size parameters from geometric data sources, parameterize to generate rectangular basic entities within a preset size range; Said step 1 comprises: Based on the collected basic size parameters, a boundary representation method is used to construct a cubic grid structure with a length, width and height range of 10-50mm; Using the constructed cubic grid structure as a basis, a multi-thread parallel computing method is used to synchronously generate multiple rectangular basic entities; Wherein, the generation process of the cubic grid structure comprises: generating 8 vertices through vertex coordinate calculation, forming 12 edges based on the calculated vertex coordinates using edge connection algorithm, and then forming 6 planes by using the formed edges as input through the face combination algorithm; The multi-thread parallel computing adopts a dynamic load balancing strategy, assigns an independent memory space to each generation thread, and avoids data conflicts through a mutex mechanism; Step 2, taking the rectangular basic entity as input, randomly selecting three surfaces, and converting the selected surfaces to B-spline surfaces, wherein each surface is defined by a dense control point grid, and the perturbation of the control points is constrained within the original plane normal direction range; Said step 2 comprises: Based on the established control point grid, a Gaussian distribution function is used to generate a random offset vector of each control point in the original plane normal direction, and the amplitude of the offset vector is limited to avoid self-intersection of the surface; Taking the control points with random offset vectors as input, a non-uniform rational B-spline algorithm is applied for interpolation calculation to generate a B-spline surface; Wherein, the establishment process of the control point grid comprises: mapping a two-dimensional uniform grid point array to a three-dimensional plane space, and realizing accurate positioning of the grid points through a coordinate transformation algorithm; The generation of the random offset vector adopts a constraint optimization algorithm, the offset direction is constrained within 30 degrees of the positive and negative normal direction of the plane, and the offset amplitude is limited within 5% of the plane edge length; Step 3, replacing the corresponding surfaces of the rectangular basic entity with the B-spline surfaces obtained in step 2 to obtain a complex basic model with complex curved surface characteristics; Step 4, triangulating the selected surfaces of the complex basic model obtained in step 3 to obtain a triangular element grid, and sampling points in the triangular element grid to obtain sampling points; Step 5, taking the sampling points collected in step 4 as input, constructing a sketch bounding box, matching the sketch type according to the feature type in the pre-defined feature library, and adjusting the sketch bounding box to adapt to the non-planar boundary of the B-spline surface; Said step 5 comprises: Identify the edges in the sketch bounding box that coincide with the boundary of the B-spline surface as generation edges; Based on the identified generation edges, remove the generation edges and extend the sketch height along the normal direction of the B-spline surface, and complete the integration with the surface geometry through the extended sketch boundary; Step 6, stretch the sketch bounding box adjusted in step 5 to generate a three-dimensional feature entity, and integrate the three-dimensional feature entity with the complex basic model through Boolean operation to generate a cross feature; Said integration of the three-dimensional feature entity and the complex basic model through Boolean operation comprises: Determine the priority order of feature categories through a dependency analysis algorithm, and establish a feature priority queue; The Boolean difference set operation is performed according to the established feature priority queue and the constructed entity geometry tree structure in the order of priority; The B-rep intersection algorithm is used for the Boolean operation to calculate the intersection curve of the three-dimensional feature entity and the complex base model, and the region of the complex base model not occupied by the three-dimensional feature entity is retained according to the definition of the Boolean difference set operation; The step 6 comprises: The number of cross features is 8 to 12; In the triangularized surface area, the Monte Carlo sampling algorithm is used to complete the probability uniform distribution sampling to generate a sampling point result representing the random distribution position of the features; Based on the sampling point result, the generation order of the cross features adopts a dynamic optimization strategy, and the dynamic optimization strategy is to adjust the generation sequence of the features in real time according to the geometric dependency relationship between the features corresponding to each sampling point; Step 7, the cross features generated in step 6 are numbered and identified, and the complex geometry model entity including the number identification and the cross features is stored in a preset format, and output as a structured data set for artificial intelligence training.
2. The method of claim 1, wherein the complex model dataset creation method comprising intersecting features is characterized by, The step 5 further comprises: The predefined feature library comprises 24 standard feature types, and the feature types comprise a rectangular through hole, a rectangular blind hole, a triangular through hole, a triangular blind hole, a rectangular through groove, a triangular through groove, a rectangular blind hole groove, a 2-side through step, a rectangular through step, a rectangular blind hole step, a triangular blind hole step, an inclined through step, a chamfer, a hexagonal through hole, a hexagonal blind hole, a through hole, a blind hole, an O-ring, a circular through groove, a circular end blind hole, a circular blind hole step, a vertical circular end blind hole groove, a horizontal circular end blind hole groove and a round corner; The predefined feature library is stored in a hierarchical data structure, and each feature type is associated with a corresponding sketch type rule and a stretching parameter range; Based on the hierarchical data structure, the feature type matching process adopts a dynamic lookup table mechanism to automatically select the optimal sketch type combination from the data structure according to the feature complexity.
3. The method of claim 2, wherein the complex model dataset creation method comprising intersecting features is characterized by, The step 7 comprises: A hash algorithm is used to assign a unique identifier to each geometric face of the cross feature; The unique identifier and the corresponding geometric data are indexed by using the assigned unique identifier as an index key; The established index relationship is stored in a metadata file; The number identification adopts hierarchical coding, and a basic number is assigned to each feature based on the hierarchical coding, and a sub-number is assigned to each face of each feature; The metadata file is stored in a JSON format, and the metadata file comprises feature parameters, distribution information and geometric topological relationship description.
4. The method of claim 3, wherein the complex model dataset creation method comprising intersecting features is characterized by, The step 7 further comprises: Geometric data of the complex geometry model entity is extracted, and a boundary representation model is constructed according to the topological relationship of the vertices, edges and faces thereof; Based on the boundary representation model, the geometric entity and the topological connection information included in the boundary representation model are converted into a standardized STEP format file according to the product data model defined by the STEP standard, and a corresponding STEP format file is generated; The STEP format file is written in batches through a parallel I / O interface to a specified path, and a check code is generated for each file processed by the block strategy in the writing process.
5. A complex model dataset creation system including cross features, applied to the complex model dataset creation method including cross features according to any one of claims 1 to 4, characterized by It comprises: The base entity generation module is configured to collect base size parameters from a geometric data source and to generate a rectangular base entity in a preset size range by parameterization; The curved surface conversion module is configured to take the rectangular base entity as input, randomly select three surfaces, and convert the selected surfaces into B-spline curved surfaces, wherein each curved surface is defined by a dense control point grid, and perturbation of the control points is constrained within a range of the original plane normal direction; The curved surface integration module is configured to replace the corresponding surfaces of the rectangular base entity with the converted B-spline curved surfaces to obtain a complex base model with complex curved surface characteristics; The surface processing module is configured to perform triangulation processing on the selected surfaces of the complex base model to obtain a triangular cell grid, and to perform point sampling in the triangular cell grid to obtain sampling points; The sketch processing module is configured to take the sampling points as input, to construct a sketch bounding box, to match a sketch type according to a feature type in a predefined feature library, and to adjust the sketch bounding box to adapt to a non-planar boundary of a B-spline curved surface; The feature generation module is configured to perform a stretching operation according to the adjusted sketch bounding box to generate a three-dimensional feature entity, to integrate the three-dimensional feature entity with the complex base model by Boolean operation, and to generate an intersection feature; The data output module is configured to number and identify the generated intersection feature, and to store a complex geometric model entity including the number identification and the intersection feature in a preset format and output as a structured data set for artificial intelligence training.