Judgment and efficient decomposition method of multidirectional stretching entity
By detecting and decomposing the boundary representation B-Rep 3D geometric model of the physical product and utilizing the stretch cutting and construction surface segmentation methods, the problem of low efficiency in decomposing complex models in the existing technology is solved, and efficient and automatic hexahedral mesh generation and interpretability of simulation results are achieved.
Patent Information
- Application Number
- CN202510765612.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-19
AI Technical Summary
Existing hexahedral mesh generation methods cannot automatically and efficiently process complex models, resulting in poor repeatability and low efficiency of simulation results. Especially in industrial simulation, manual decomposition is time-consuming and difficult to achieve high-quality model decomposition.
By obtaining the boundary representation B-Rep three-dimensional geometric model of the physical product, detecting the plane and surface boundaries, judging the multi-directional stretching conditions, dividing the faces into one, two and three types, and using the stretch cutting and construction surface segmentation methods for efficient decomposition.
It achieves fully automatic, high-quality hexahedral mesh generation, improves simulation efficiency, reduces trial-and-error cycles, enhances the interpretability and robustness of results, and can handle more complex multi-directional tensile entities.
Smart Images

Figure CN120672996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for determining and decomposing an entity, and in particular to a method for determining and efficiently decomposing a multi-directional stretched entity. Background Art
[0002] In the field of computational simulation, hexahedral meshes are widely used in fields such as structural mechanics, fluid dynamics, and thermal analysis due to their advantages in computational accuracy and efficiency. However, the generation of hexahedral meshes has long relied on manual intervention, especially the decomposition of complex models into sub-regions suitable for stretching operations. This process is both time-consuming and requires extremely high user experience. Therefore, the development of fully automatic hexahedral mesh generation technology, especially the automatic decomposition of models and the identification of stretching bodies, has far-reaching significance for improving simulation efficiency, lowering technical barriers, adapting to complex geometries, and promoting intelligent computer-aided engineering (CAE) processes.
[0003] Traditional hexahedral mesh generation methods (such as sweeping and mapping methods) require that the model have a regular topological structure. Therefore, models that do not meet their structural rules need to be decomposed. For simple geometric bodies, this process can be completed manually, but when faced with complex assemblies, special-shaped structures, or models with holes and chamfers that are common in modern engineering, manual decomposition becomes extremely cumbersome or even difficult to achieve. In industrial simulation, especially in the automotive, aerospace and other fields, models often contain a large number of detailed features, and manual decomposition may take up more than 50% of the entire simulation process. In addition, different decomposition strategies may lead to significant differences in mesh quality, affecting the repeatability of simulation results. The goal of automatic partitioning technology is to identify the sweepable features of the model through algorithms and reasonably split it into several extruded bodies, thereby laying the foundation for subsequent full hexahedral mesh generation.
[0004] Existing hexahedral mesh generation methods based on model decomposition lack judgment conditions and therefore cannot guarantee the complete decomposition of the model, which further limits the fully automatic and high-quality generation of downstream hexahedral meshes. At the same time, since most existing methods are based on optimization, they are less efficient when faced with complex models, which also undermines the robustness of the method, making it difficult to perform efficient decomposition operations on physical products. Summary of the Invention
[0005] In order to solve the problems existing in the background technology, the present invention provides a method for determining and efficiently decomposing a multi-directional stretching entity.
[0006] The technical solution adopted in the present invention is:
[0007] The method for determining and efficiently decomposing a multi-directional stretched entity of the present invention includes:
[0008] Step S1: Obtain a Boundary Representation (B-Rep) three-dimensional geometric model of the physical product.
[0009] Step S2: Detect each plane in the boundary representation B-Rep three-dimensional geometric model of the physical product and all adjacent edges on the surface boundary, and then determine whether the current boundary representation B-Rep three-dimensional geometric model meets the multi-directional stretching conditions. If so, it is determined to be a multi-directional stretching model, and the current physical product is determined to be a multi-directional stretching entity; otherwise, stretching cannot be performed, and continue to detect the boundary representation B-Rep three-dimensional geometric model of the next physical product; a multi-directional stretching model refers to a composite model formed by bonding operations on multiple stretching bodies in different directions that meet the surface fitting conditions.
[0010] Step S3: Divide each plane into first, second, and third type surfaces based on the information integrity of the source surface and the side surface of each plane of the multi-directional stretching model.
[0011] Step S4: For all Class I and Class II faces, first prioritize the stretching and cutting of Class I and Class II faces based on the side integrity in the Class I and Class II faces, and then determine the stretching distance for each Class I and Class II face based on the busbar-parallel surface collaboration method in the priority order, and then perform stretching and cutting operations on the Class I and Class II faces in the multi-directional stretching entity.
[0012] Step S5: For all three types of faces that are not affected by the stretching and cutting operations of the first and second type faces, find the other three types of faces in the side surfaces of the three types of faces to form three types of faces; generate construction faces through each pair of three types of faces, and then perform cutting operations on the three types of faces in the multi-directional stretching entity to achieve efficient decomposition of the multi-directional stretching entity.
[0013] The step S2 is specifically as follows:
[0014] Step S21: traverse each plane and all boundary points in the boundary representation B-Rep three-dimensional geometric model, obtain the boundary edge of the plane connected by each boundary point, and determine whether each plane and each boundary point meets the plane boundary point condition.
[0015] Step S22: traverse each curved surface and all its boundary edges in the boundary representation B-Rep three-dimensional geometric model, and determine whether each curved surface and each boundary edge thereof meet the surface boundary edge condition.
[0016] Step S23: When all planes and all boundary points in the boundary representation B-Rep three-dimensional geometric model meet the plane boundary point conditions, and all surfaces and all boundary edges meet the surface boundary edge conditions, the current boundary representation B-Rep three-dimensional geometric model is judged to meet the multi-directional stretching conditions and is determined to be a multi-directional stretching model.
[0017] In step S21, the plane boundary point conditions are specifically as follows:
[0018] For each plane and each boundary point thereof, the two boundary edges connected by the current boundary point in the current plane are both straight edges and are collinear or perpendicular; or the two boundary edges connected by the current boundary point in the current plane are not both straight edges, then obtain one or more other boundary edges outside the current plane connected by the current boundary point, and there are one or more other boundary edges perpendicular to the current plane.
[0019] In step S22, the surface boundary conditions are specifically as follows:
[0020] For each surface and each of its boundary edges, the surface geometry is represented as an extruded face, with the boundary edges of the surface being parallel to the base curve of the current surface or to the extrusion line of the current surface.
[0021] The step S3 is specifically as follows:
[0022] Step S31: traverse all points in the multi-directional stretching model, obtain all straight edges and planes adjacent to each point, and for each straight edge and plane adjacent to the current point, when the straight edge is perpendicular to the plane, use the straight edge as the generatrix of the current point in the current plane.
[0023] Step S32: traverse all planes in the multi-directional stretching model, determine non-class I surfaces and class I surfaces based on the generatrix of each plane, and obtain the marked generatrix at the same time.
[0024] Step S33: Traverse all non-class I surfaces and their marked busbars. For each non-class I surface and all its marked busbars, take the current non-class I surface as the source surface, and take the planes adjacent to the source surface connected by all marked busbars as side surfaces. When the source surface and all its side surfaces form a fitting intersection, the source surface is a class II surface; when the source surface and one or more of its side surfaces form a cutting intersection, the source surface is a class III surface.
[0025] Step S34: Traverse all adjacent faces of Class 1 and Class 2 faces, and reclassify all Class 1 and Class 2 faces whose adjacent faces have holes on the stretching path into Class 3 faces; the stretching path of the plane is the normal vector of the plane pointing to the inside of the model.
[0026] In the step S32, for each plane, a point in the current plane faceA that is not connected to a busbar is obtained as a judgment point. For each judgment point, when the edge in the current plane faceA connected to the judgment point is the busbar of another plane faceB, and the direction is opposite to the normal direction of the other plane faceB, that is, pointing to the outside of the model, then the current plane faceA is a non-first-class surface, and the edge of the busbar of the other plane faceB is marked as a marked busbar. Otherwise, the current plane faceA is a first-class surface, that is, the current plane faceA is not marked as a non-first-class surface because of any point.
[0027] The step S4 is specifically as follows:
[0028] Step S41: taking the first and second type faces as first decomposition faces, obtaining the number of concave edges of each first decomposition face, and sorting all first decomposition faces from small to large according to the number of their concave edges, thereby forming a sorted set of first decomposition faces.
[0029] Step S42: Process each first decomposition surface in the sorted set of first decomposition surfaces in sequence according to the sorting order. For each first decomposition surface, obtain all planes parallel to the first decomposition surface in the multi-directional stretching model according to the normal of the first decomposition surface, and then retain the planes that are connected to the first decomposition surface only by another edge to form a parallel plane set; process the parallel plane set based on the busbar-parallel plane collaboration method. When the number of planes in the parallel plane set is not zero, obtain the minimum value of the distance between all planes in the parallel plane set and the first decomposition surface as the stretching distance. When the number of planes in the parallel plane set is zero, use the shortest busbar length of the first decomposition surface as the stretching distance.
[0030] Step S43: Take the normal direction of the first decomposition surface pointing to the inside of the multi-directional stretching model as the stretching direction, perform the stretching operation according to the stretching distance, and perform the cutting operation on the shape body generated after the stretching operation to perform the cutting operation of the first decomposition surface in the multi-directional stretching entity.
[0031] The step S5 is specifically as follows:
[0032] Step S51: After the stretching and cutting operations are performed on the first and second type surfaces, all the three types of surfaces that remain in their original state are obtained as the second decomposition surfaces that are not affected by the stretching and cutting operations on the first and second type surfaces. For each second decomposition surface, the other three types of surfaces in the side surfaces of the second decomposition surface are obtained to form a three-type surface pair. The side surfaces of the three types of surfaces that are not affected by the stretching and cutting operations on the first and second type surfaces all contain the other three types of surfaces with adjacent common edges.
[0033] Step S52: For each pair of three-type facing faces, the normal V of the first face A in the three-type facing faces is AAs direction 1, the normal V of the second face B among the three types of faces B As direction 2, the normal V of the first face A A and the normal V of the second face B B After multiplication, it is used as direction three, that is, V A ×V B This is recorded as direction 3. At the same time, the common edge of the first face A and the second face B is used as the feature edge, the three directions are constructed as three axes, and the feature line segments of the first face A and the second face B are obtained based on the feature edge.
[0034] Step S53: For each axis constructed in step S52 and each feature line segment of the first surface A and the second surface B thereon, when the feature line segments of the current first surface A and the second surface B are adjacent and do not overlap, and there are no other feature line segments in the middle, the interval between the two closest endpoints of the feature line segments of the first surface A and the second surface B is used as the segmentation interval, and the midpoint of the segmentation interval is used as the segmentation point.
[0035] Step S54: For all segmentation points and their segmentation intervals on each axis, when the segmentation intervals of two segmentation points intersect, the intersecting part is used as the intersecting interval, and the segmentation points corresponding to the intersecting segmentation intervals are merged to obtain an updated segmentation point. The updated segmentation point is located at the midpoint of the intersecting interval, and the intersecting interval is used as the segmentation interval of the updated segmentation point. Finally, all unmerged segmentation points and the updated segmentation points are constructed together as a segmentation point set.
[0036] Step S55: for each segmentation point in the segmentation point set, generate a construction surface according to the normal direction of the segmentation point and the axis where it is located, and the normal direction of the construction surface is the normal direction of the segmentation point and the axis where it is located.
[0037] Step S56: Based on the various construction surfaces generated in step S55, a cutting operation is performed on the respective second decomposed surfaces in the multi-directional stretching entity.
[0038] The step S52 is specifically as follows:
[0039] Step S521: Construct direction one as the first axis, map the busbar edge of the hole on the first face A onto the first axis and use it as the initial feature line segment of the first face A on the first axis; at the same time, map the edge on the second face B that is not perpendicular or parallel to the feature edge onto the first axis and use it as the initial feature line segment of the second face B on the first axis.
[0040] Step S522: Construct direction two as the second axis, map the hole busbar edge on the second face B to the second axis and use it as the initial feature line segment of the second face B on the second axis; at the same time, map the edge on the first face A that is not perpendicular or parallel to the feature edge to the second axis and use it as the initial feature line segment of the first face A on the second axis.
[0041] Step S523: Construct direction three as the third axis, map the edges on the first face A that are not perpendicular or parallel to the feature edge to the third axis, and use them as the initial feature line segments of the first face A on the third axis; at the same time, map the edges on the second face B that are not perpendicular or parallel to the feature edge to the third axis, and use them as the initial feature line segments of the second face B on the third axis.
[0042] Step S524: For the initial feature line segments of the first face A on each axis, if two or more of the initial feature line segments have overlapping parts, the current two or more initial feature line segments are merged to serve as the final feature line segments of the first face A on the current axis; for the initial feature line segments of the second face B on each axis, if two or more of the initial feature line segments have overlapping parts, the current two or more initial feature line segments are merged to serve as the final feature line segments of the second face B on the current axis.
[0043] The electronic device of the present invention comprises: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method described above.
[0044] The computer-readable storage medium of the present invention stores program data thereon, and when the program data is executed by a processor, the method described above is implemented.
[0045] The beneficial effects of the present invention are:
[0046] 1. This invention identifies and decomposes multi-directional stretched entities based on the geometry and topology of the B_Rep model, effectively decomposing stretched bodies and facilitating the fully automatic, high-quality generation of hexahedral meshes. Each step of this invention is based entirely on the model's geometry and topology, without involving any optimization or parameterization techniques. This results in highly efficient and stable execution, while also making the results highly interpretable.
[0047] 2. The present invention proposes for the first time a method for determining multi-directional stretched entities, which strongly supports the complete decomposition of stretched blocks and the fully automatic, high-quality generation of downstream hexahedral meshes. It also significantly shortens the trial-and-error cycle and further improves overall efficiency. The determination method only involves traversal at the topological level and determination of perpendicular and parallel relationships at the geometric level, thereby ensuring the robustness and efficiency of the determination method.
[0048] 3. The present invention utilizes two decomposition methods, namely, stretch cutting and segmentation based on structural surfaces, when decomposing multi-directional stretch entities. Compared with the traditional segmentation method based only on structural surfaces, the present invention is more flexible and can handle a wider range of multi-directional stretch entities. The present invention gives priority to the stretch cutting method and optimizes the order of stretch cutting based on the side integrity, which helps to reduce the number of final decomposition blocks.
[0049] 4. The present invention classifies the source surface by inferring the geometric topological information of the source surface and its surroundings, and then distinguishes whether to use stretch cutting or segmentation based on the construction surface. Compared with the traditional optimization-based block decomposition algorithm, it is more efficient, improves the interpretability of the results, and significantly enhances the processing ability of multi-directional stretching entities. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of the method of the present invention;
[0051] Figure 2 is a plane detection diagram in the determination method of the present invention;
[0052] Figure 3 It is a schematic diagram of the stretching surface of the present invention;
[0053] Figure 4 Schematic diagram of the fitting intersection and cutting intersection of the present invention;
[0054] Figure 5 This is a schematic diagram of mapping the three types of faces to the key edges on the axis of the present invention, where: Figure 5 (a) is a schematic diagram of characteristic line segments mapped on the axis of direction three of the present invention, Figure 5 (b) is a schematic diagram of characteristic line segments mapped on the axis of direction 1 of the present invention, Figure 5 (c) is a schematic diagram of characteristic line segments mapped on the axis of direction 2 of the present invention;
[0055] Figure 6 Schematic diagram of the segmentation result of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention.
[0057] like Figure 1 As shown, the determination and efficient decomposition method of the multi-directional stretching entity of the present invention is specifically as follows:
[0058] Step S1: Obtain a boundary representation B-Rep three-dimensional geometric model of a physical product; the physical product is a product to be repaired, specifically a product of architectural design, mechanical design, medical equipment, etc., such as machinery, electronic components, etc.
[0059] Step S2: Detect all adjacent edges on each plane and curved surface boundary in the B-Rep 3D geometric model of the physical product, and then determine whether the current B-Rep 3D geometric model satisfies the multi-directional stretching conditions, as follows:
[0060] Step S21: Traverse each plane and all boundary points in the boundary representation B-Rep three-dimensional geometric model, obtain the boundary edge of the plane connected by each boundary point, and determine whether each plane and each boundary point meet the plane boundary point condition. The plane boundary point condition is specifically that, for each plane and each boundary point, the two boundary edges connected by the current boundary point in the current plane are both straight edges and are collinear or perpendicular; or if the two boundary edges connected by the current boundary point in the current plane are not both straight edges, then obtain one or more other boundary edges outside the current plane connected by the current boundary point, and there are one or more other boundary edges perpendicular to the current plane.
[0061] In the specific implementation, multiple faces FACE can be obtained based on the data structure of the boundary representation B-Rep three-dimensional geometric model. The underlying geometric representation SURFACE of each face FACE is used to determine whether it is a plane. If it is a plane, the vertices VERTEX in the face FACE are traversed according to the data structure. Similarly, the edges EDGE connected to it in the face FACE can be obtained through the vertices VERTEX.
[0062] like Figure 2 As shown, in the surfaces M and N of the mechanical parts product, the triangular annotation points satisfy the requirement that the connected plane edges are perpendicular to each other, and the circular annotation points satisfy the requirement that there is a perpendicular plane outside the surface edge; the starting point of the arrow in surface N (see the enlarged area) does not meet the conditions.
[0063] Step S22: Traverse each surface and all its boundary edges in the boundary representation B-Rep three-dimensional geometric model, and determine whether each surface and each of its boundary edges meet the surface boundary edge conditions. The surface boundary edge conditions are specifically that, for each surface and each of its boundary edges, the geometric representation of the surface is a stretched surface, and the boundary edge of the surface is parallel to the base curve of the current surface, or parallel to the stretching line of the current surface.
[0064] like Figure 3As shown, the definition of a stretched surface is the surface formed by stretching the base curve along the stretching line. In the specific implementation, according to the data structure of the boundary representation B-Rep three-dimensional geometric model, the underlying geometric representation SURFACE of the obtained face FACE is used to determine whether it is a surface. If it is a surface, if its underlying geometric representation SURFACE is a cylinder or a stretching surface, the conditions are met, and the base curve and the stretching line can be directly obtained; if it is a free-form surface, the control vertices are required to be distributed layer by layer, and the distribution of each layer is completely aligned. At this time, the base curve is the curve generated corresponding to the control vertices of each layer, and the stretching line is obtained from the vector pointing from the first layer to the last layer; otherwise, the stretching surface is not satisfied.
[0065] In specific implementation, all edges EDGE can be obtained according to the surface FACE, and then its geometric representation CURVE can be obtained. If the geometric representation CURVE is a straight line, it is required to be parallel to the stretched line; if the geometric representation CURVE is a curve, it is required to be parallel to the base curve.
[0066] Step S23: When all planes and all boundary points in the boundary representation B-Rep three-dimensional geometric model meet the plane boundary point conditions, and all curved surfaces and all boundary edges meet the surface boundary edge conditions, the current boundary representation B-Rep three-dimensional geometric model is judged to meet the multi-directional stretching conditions, and is determined to be a multi-directional stretching model, and the current physical product is determined to be a multi-directional stretching entity; otherwise, stretching cannot be performed, and the boundary representation B-Rep three-dimensional geometric model of the next physical product is continued to be detected; the multi-directional stretching model refers to a composite model formed by bonding operations on multiple stretching bodies in different directions that meet the surface fitting conditions.
[0067] Step S3: Based on the information integrity of the source and side surfaces of each plane of the multi-directional stretching model, each plane is divided into first, second, and third type surfaces, as follows:
[0068] Step S31: traverse all points in the multi-directional stretching model, obtain all straight edges and planes adjacent to each point, and for each straight edge and plane adjacent to the current point, when the straight edge is perpendicular to the plane, use the straight edge as the generatrix of the current point in the current plane.
[0069] Step S32: Traverse all planes in the multi-directional stretching model, and judge non-class one faces and class one faces based on the busbars of each plane. For each plane, obtain the point in the current plane faceA that is not connected to the busbar as the judgment point. For each judgment point, when the edge in the current plane faceA connected by the judgment point is the busbar of another plane faceB, and the direction is opposite to the normal direction of the other plane faceB, that is, pointing to the outside of the model, then the current plane faceA is a non-class one face, and the edge of the busbar of the other plane faceB is marked as the marked busbar. Otherwise, the current plane faceA is a class one face, that is, the current plane faceA is not marked as a non-class one face because of any point.
[0070] In the specific implementation, according to the data structure of the multi-directional stretching model, all edges EDGE adjacent to each vertex VERTEX can be obtained, and then the geometric representation CURVE can be obtained. If the geometric representation CURVE is a straight line, the edge EDGE is associated with the vertex VERTEX and stored; similarly, all faces FACE adjacent to the vertex VERTEX can be obtained, and then the underlying geometric representation SURFACE can be obtained. If the underlying geometric representation SURFACE is a plane, the face FACE is associated with the vertex VERTEX and stored.
[0071] In the specific implementation, based on the edge EDGE and face FACE associated with each vertex VERTEX, the corresponding geometric representation CURVE and the underlying geometric representation SURFACE are first directly obtained using a pointer, and then a double loop is used to try to pair them up. If there is a vertical relationship between the geometric representation CURVE and the underlying geometric representation SURFACE, the corresponding edge EDGE, face FACE and vertex VERTEX are associated and stored.
[0072] In the specific implementation, all faces FACE are traversed to obtain their corresponding underlying geometric representation SURFACE. If the underlying geometric representation SURFACE is a plane, each vertex VERTEX in the face FACE(i) is traversed in turn. Based on the relationship between the obtained edge EDGE, face FACE and vertex VERTEX, determine whether there is an associated edge EDGE between the vertex VERTEX and the entire face FACE(i). If so, continue to traverse the next vertex VERTEX; if not, obtain the two adjacent edges EDGE of the vertex VERTEX on the face FACE(i), and then determine whether there is an associated face FACE(j) formed by the vertex VERTEX and each edge EDGE. If so, obtain the normal V of the associated face FACE(j) pointing to the inside of the model. F , and at the same time get the vector V pointing from the vertex VERTEX to the other side of the edge EDGE E , if VF With V E If the directions are the same, then the face FACE(i) is marked as a non-class-one face, and the edge EDGE is associated with the face FACE(i) and stored. After traversing all vertices in the face FACE, if no non-class-one face is marked, it is marked as a class-one face.
[0073] Step S33: Traverse all non-class I surfaces and their marked busbars. For each non-class I surface and all its marked busbars, take the current non-class I surface as the source surface, and take the planes adjacent to the source surface connected by all marked busbars as side surfaces. When the source surface and all its side surfaces form a fitting intersection, the source surface is a class II surface; when the source surface and one or more of its side surfaces form a cutting intersection, the source surface is a class III surface.
[0074] like Figure 4 As shown, the face Side_face2 intersects the stretched body formed by the face Src_face1 as the source face in a fitting manner; the face Side_face1 intersects the stretched body formed by the face Src_face2 as the source face in a cutting manner. In the specific implementation, the face FACE marked as non-class one is traversed, and based on the association relationship between the obtained edge EDGE and the face FACE, each edge EDGE associated with the face FACE (recorded as the source face) is obtained. In the specific implementation, Figure 4 The rectangular arrow in the middle points to face Src_face1, and the circular arrow to face Src_face2. Each edge is then examined in turn, and its adjacent face (referred to as the side face) is obtained through the edge. The edge is then extruded along the inside of the model to construct a plane. If the side face is inside the model relative to the construction plane, the source face is marked as a Class 3 face. If all associated edge edges are traversed and the source face is not marked as a Class 3 face, the source face is marked as a Class 2 face.
[0075] Step S34: Traverse all adjacent faces of Class 1 and Class 2 faces, and reclassify all Class 1 and Class 2 faces whose adjacent faces have holes on the stretching path into Class 3 faces; the stretching path of the plane is the normal vector of the plane pointing to the inside of the model.
[0076] In practice, all Class 1 and Class 2 faces are traversed. All edges within a face (denoted as the source face) are traversed through the face. Using the edge, the adjacent face (denoted as the side face) is retrieved and the side face is checked for an inner ring. If so, the inner ring is checked to see if it is concave or convex. If it is concave, the inner ring constitutes a hole. If a hole exists on the side face, the inner ring corresponding to the hole is projected onto the axis of the traversed edge. If the hole is stretched across the source face and the projection intersects the edge, the face is re-labeled as a Class 3 face.
[0077] Step S4: For all Class I and Class II faces, first sort the priority of stretching and cutting the Class I and Class II faces based on the side integrity in the Class I and Class II faces. Specifically, take the Class I and Class II faces as the first decomposition faces, and obtain the number of concave edges of each first decomposition face. A concave edge refers to a concave edge from the perspective of the three-dimensional model rather than the perspective of the face. In a three-dimensional geometric model, a concave edge refers to an edge connecting two adjacent faces, and the angle between the two adjacent faces on the inner side of the model is greater than 180 degrees; all first decomposition faces are sorted from small to large according to the number of their respective concave edges, thereby forming a sorted set of first decomposition faces.
[0078] In practice, all faces (FACEs) in the multi-directional stretching model, except for the traversed face, are traversed. The underlying geometric representation (SURFACE) is then used to determine whether the face is planar. If so, its normal is obtained and compared with the normal of the traversed face. If they are identical, the face is stored in a parallel face set, and the relationship between the set and the traversed face is recorded. For each face in the parallel face set, all edges in the model are traversed to determine whether the two vertices of the edge are located in the traversed face and in the parallel face set. If the edge does not exist, the face is removed from the set.
[0079] Then, the stretch distance is determined for each Class 1 and Class 2 face based on the generatrix-parallel face synergy method according to the priority sorting order, and then the stretch cutting operation is performed on the Class 1 and Class 2 faces in the multi-directional stretch entity, as follows:
[0080] First, each first decomposition surface in the sorted set of first decomposition surfaces is processed in sequence according to the sorting order. For each first decomposition surface, all planes parallel to the first decomposition surface in the multi-directional stretching model are obtained according to the normal of the first decomposition surface. Then, the planes that are connected to the first decomposition surface only by another edge are retained to form a set of parallel planes, that is, there is a point in the retained plane and one of the points of the first decomposition surface is connected by an additional edge outside the two planes, ensuring that all remaining planes in the set are connected to the first decomposition surface by edges; the parallel plane set is processed based on the busbar-parallel plane collaboration method. When the number of planes in the parallel plane set is not zero, the minimum value of the distance between all planes in the parallel plane set and the first decomposition surface is obtained as the stretching distance. When the number of planes in the parallel plane set is zero, the shortest busbar length of the first decomposition surface is used as the stretching distance.
[0081] Then, the normal direction of the first decomposition surface pointing to the inside of the multi-directional stretching model is used as the stretching direction, the stretching operation is performed according to the stretching distance, and the shape body generated after the stretching operation is cut, that is, the stretched shape body is completely cut off from the original model. After the cutting is completed, the original model is updated to the shape body of the cut remaining part to perform the cutting operation of the first decomposition surface in the multi-directional stretching entity.
[0082] In the specific implementation, let the stretch distance L be its corresponding plane S, and the normal of the source plane pointing to the inside of the model be V. First, plane S is stretched along the normal direction V by the stretch distance L to form a stretched body BODY. Then, the stretched body BODY is subtracted from the entire model. After the subtraction, the model is divided into several parts. Each part is judged in turn to determine whether it is a stretched body BODY. The stretched body BODY is stored in one set, and the non-stretched body is stored in another set. Then, the entire model is updated to the set of non-stretched bodies.
[0083] Step S5: For all three types of faces that are not affected by the stretching and cutting operations of the first and second type faces, find the other three types of faces in the side faces of the three types of faces to form three types of faces; then generate construction faces through each of the three types of faces, and then perform the cutting operation on the three types of faces in the multi-directional stretch solid, as follows:
[0084] Step S51: After the stretching and cutting operations are performed on the first and second type surfaces, all the three types of surfaces that remain in their original state are obtained as the second decomposition surfaces that are not affected by the stretching and cutting operations on the first and second type surfaces. For each second decomposition surface, the other three types of surfaces in the side surfaces of the second decomposition surface are obtained to form a three-type surface pair. The side surfaces of the three types of surfaces that are not affected by the stretching and cutting operations on the first and second type surfaces all contain the other three types of surfaces with adjacent common edges.
[0085] In practice, each three-category face is checked for completeness. Integrity indicates it has not been affected by the stretching or cutting operation. For each complete three-category face, all edges within the face are retrieved from the face's face representation. The geometric representation, CURVE, is then used to determine if it is a straight line. If so, the face's edge is connected to another face and checked to see if it is also a three-category face. If so, a three-category face pair is formed, and the edge is stored as the common edge of the three-category face pair.
[0086] Step S52: For each pair of three-type facing faces, the normal V of the first face A in the three-type facing faces is A As direction 1, the normal V of the second face B among the three types of faces B As direction 2, the normal V of the first face A A and the normal V of the second face B B After multiplication, it is used as direction three, that is, V A ×V B This is denoted as direction three. In the specific implementation, since each of the three types of faces is a plane, we can obtain the underlying geometric representation SURFACE of each face FACE in the three types of faces, and then obtain its normal. At the same time, the common edge of the first face A and the second face B is used as the feature edge, and the three directions are constructed as three axes. Based on the feature edge, the feature line segments of the first face A and the second face B are obtained, as follows:
[0087] Step S521: Construct direction 1 as the first axis, map the generatrix edge of the hole on the first face A to the first axis and use it as the initial feature line segment of the first face A on the first axis; at the same time, map the edge on the second face B that is not perpendicular or parallel to the feature edge to the first axis and use it as the initial feature line segment of the second face B on the first axis, as shown in the following example: Figure 5 As shown in (b).
[0088] Step S522: Construct the second direction as the second axis, map the hole generatrix edge on the second face B to the second axis and use it as the initial feature line segment of the second face B on the second axis; at the same time, map the edge on the first face A that is not perpendicular or parallel to the feature edge to the second axis and use it as the initial feature line segment of the first face A on the second axis, as shown in the following example: Figure 5 As shown in (c).
[0089] Step S523: Construct direction three as the third axis, map the edges on the first face A that are not perpendicular or parallel to the feature edge to the third axis, and use them as the initial feature line segments of the first face A on the third axis; at the same time, map the edges on the second face B that are not perpendicular or parallel to the feature edge to the third axis, and use them as the initial feature line segments of the second face B on the third axis, as shown in the following example: Figure 5 As shown in (a).
[0090] Step S524: For the initial feature line segments of the first face A on each axis, if two or more of the initial feature line segments have overlapping parts, the current two or more initial feature line segments are merged to serve as the final feature line segments of the first face A on the current axis; for the initial feature line segments of the second face B on each axis, if two or more of the initial feature line segments have overlapping parts, the current two or more initial feature line segments are merged to serve as the final feature line segments of the second face B on the current axis.
[0091] Step S53: For each axis constructed in step S52 and each feature line segment of the first surface A and the second surface B thereon, when the feature line segments of the current first surface A and the second surface B are adjacent and do not overlap, and there are no other feature line segments in the middle, the interval between the two closest endpoints of the feature line segments of the first surface A and the second surface B is used as the segmentation interval, and the midpoint of the segmentation interval is used as the segmentation point.
[0092] Step S54: For all segmentation points and their segmentation intervals on each axis, when the segmentation intervals of two segmentation points intersect, the intersecting part is used as the intersecting interval, and the segmentation points corresponding to the intersecting segmentation intervals are merged to obtain an updated segmentation point. The updated segmentation point is located at the midpoint of the intersecting interval, and the intersecting interval is used as the segmentation interval of the updated segmentation point. Finally, all unmerged segmentation points and the updated segmentation points are constructed together as a segmentation point set.
[0093] In the specific implementation, assuming that the feature line segment set mapped by surface A is L1, and the feature line segment set mapped by surface B is L2, the following process is followed:
[0094] First, merge sets L1 and L2 into a total set L all Then, according to the left endpoint of the line segment, the total set L all Sort from small to large. Next, traverse the total set L in turn all For each feature segment in , record the right endpoint rightV of the currently traversed element and the set rightSet to which it belongs. For each feature segment, if the left endpoint leftV of the current feature segment is to the right of the right endpoint rightV, calculate the split point pos as rightV+leftV and record the split interval corresponding to this split point as from the left endpoint leftV to the right endpoint rightV; otherwise, update the right endpoint rightV and its set rightSet to the larger value of the right endpoint.
[0095] In practice, the objects to be merged are segmentation points that have the same axial orientation and overlap in their corresponding segmentation intervals. The intersecting portion is considered the intersecting interval, and the segmentation points corresponding to the intersecting segmentation intervals are merged to obtain an updated segmentation point. The updated segmentation point is located at the midpoint of the intersecting interval, and the intersecting interval is used as the segmentation interval for the updated segmentation point. Each segmentation point corresponds to a construction surface (the construction surface normal is in the same direction as the axis where the segmentation point is located, and the segmentation point is on the construction surface. The "point normal" equation can uniquely determine the construction surface.). Here, the merging of segmentation points is essentially the merging of construction surfaces.
[0096] Step S55: for each segmentation point in the segmentation point set, generate a construction surface according to the normal direction of the segmentation point and the axis where it is located, and the normal direction of the construction surface is the normal direction of the segmentation point and the axis where it is located.
[0097] Step S56: Based on the various construction surfaces generated in step S55, a cutting operation is performed on the respective second decomposition surfaces in the multi-directional stretching entity to achieve efficient decomposition of the multi-directional stretching entity.
[0098] like Figure 6As shown, the final segmentation effect diagram obtained by stretching the physical product in multiple directions of the present invention is shown. In each example, each color represents each segmented shape. It can be seen that the segmentation result of the present invention is highly interpretable.
[0099] This invention introduces a decision module into the model decomposition method, which effectively supports the complete decomposition of the stretching block and enables the fully automatic, high-quality generation of the downstream hexahedral mesh. It also significantly shortens the trial-and-error cycle, further improving the overall efficiency of the algorithm. The decision method of the present invention only involves traversing the topological level of planar and curved surface boundaries and determining perpendicular and parallel relationships at the geometric level, achieving efficient model detection.
[0100] The segmentation method of the present invention successfully selects planes suitable for stretch cutting based on the integrity of the source and side surface information. Furthermore, a comprehensive determination of the generatrix length and the set of parallel planes enables the determination of the stretch length, enabling the successful implementation of the stretch cutting operation.
[0101] The segmentation method of this invention utilizes two decomposition methods: stretching and segmentation based on structural surfaces. By inferring the geometric topology of the source surface and its surroundings, the source surface is classified, and the decision is made whether to use stretching or segmentation based on structural surfaces. Compared with traditional segmentation methods based solely on structural surfaces, this method is more flexible and can handle a wider range of models. Furthermore, the algorithm optimizes the stretching and cutting order based on lateral integrity, which helps reduce the number of final decomposition blocks and improves decomposition quality.
[0102] In the segmentation method of the present invention, the entire process is based on the geometric and topological information of the model, which significantly enhances the processing capability of complex models, improves the execution efficiency of the segmentation algorithm, and also improves the interpretability of the results.
[0103] The present invention also designs a system for determining and efficiently decomposing multi-directional stretched entities, which includes the following units:
[0104] The model acquisition unit is used to obtain the boundary representation B-Rep three-dimensional geometric model of the physical product.
[0105] The model judgment unit is used to detect each plane in the boundary representation B-Rep three-dimensional geometric model of the physical product and all adjacent edges on the surface boundary, and then determine whether the current boundary representation B-Rep three-dimensional geometric model meets the multi-directional stretching conditions. If so, it is determined as a multi-directional stretching model, and at the same time, the current physical product is determined to be a multi-directional stretching entity.
[0106] The plane classification unit is used to classify each plane into the first, second, and third types of planes based on the integrity of the source and side faces of each plane in the multi-directional stretching model.
[0107] The first and second type surface stretching and cutting operation unit is used to first sort the priority of stretching and cutting of the first and second type surfaces based on the side integrity of the first and second type surfaces for all the first and second type surfaces, and then determine the stretching distance for each first and second type surface based on the busbar-parallel surface collaboration method according to the priority sorting order, and then perform stretching and cutting operations on the first and second type surfaces in the multi-directional stretching entity.
[0108] The three-type face cutting operation unit is used to find the other three types of faces in the side surfaces of all the three types of faces that are not affected by the stretching and cutting operations of the one and two types of faces, and then form three types of faces; generate construction faces through the pairs of three types of faces, and then perform cutting operations on the three types of faces in the multi-directional stretching entity, and finally achieve efficient decomposition.
[0109] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0110] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code. The schemes in the embodiments of the present application may be implemented in various computer languages. The present application is described in accordance with the flowcharts of the methods, systems and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0111] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concepts. Therefore, the present invention is intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0112] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the equivalent technology of the present invention, the present application is intended to include these modifications and variations.
Claims
1. A method for determining and efficiently decomposing a multi-directional stretched entity, characterized in that: include: Step S1: Obtain the boundary representation B-Rep three-dimensional geometric model of the physical product; Step S2: Detecting all adjacent edges on each plane and curved surface boundary in the boundary representation B-Rep 3D geometric model of the physical product, and then determining whether the current boundary representation B-Rep 3D geometric model meets the multi-directional stretching condition. If so, it is determined to be a multi-directional stretching model, and the current physical product is determined to be a multi-directional stretching entity; Step S3: dividing each plane into first, second, and third type surfaces based on the integrity of the source surface and the side surface of each plane of the multi-directional stretching model; Step S4: for all Class I and Class II faces, first, prioritize the stretching and cutting of the Class I and Class II faces based on the integrity of the side surfaces in the Class I and Class II faces, then determine the stretching distance for each Class I and Class II face based on the generatrix-parallel surface synergy method according to the priority ranking order, and then perform the stretching and cutting operation on the Class I and Class II faces in the multi-directional stretching entity; Step S5: For all three types of faces that are not affected by the stretching and cutting operations of the first and second type faces, find the other three types of faces in the side surfaces of the three types of faces to form three types of faces; generate construction faces through each pair of three types of faces, and then perform cutting operations on the three types of faces in the multi-directional stretching entity to achieve efficient decomposition of the multi-directional stretching entity.
2. The method for determining and efficiently decomposing a multi-directional stretched entity according to claim 1, characterized in that: The step S2 is specifically as follows: Step S21: traverse each plane and all boundary points in the boundary representation B-Rep three-dimensional geometric model, obtain the boundary edge of the plane connected by each boundary point, and determine whether each plane and each boundary point meets the plane boundary point condition; Step S22: traverse each surface and all its boundary edges in the boundary representation B-Rep three-dimensional geometric model, and determine whether each surface and each boundary edge thereof meets the surface boundary edge condition; Step S23: When all planes and all boundary points in the boundary representation B-Rep three-dimensional geometric model meet the plane boundary point conditions, and all surfaces and all boundary edges meet the surface boundary edge conditions, the current boundary representation B-Rep three-dimensional geometric model is judged to meet the multi-directional stretching conditions and is determined to be a multi-directional stretching model.
3. The method for determining and efficiently decomposing a multi-directional stretched entity according to claim 2, characterized in that: In step S21, the plane boundary point conditions are specifically as follows: For each plane and each boundary point thereof, if the two boundary edges connected by the current boundary point in the current plane are both straight edges and collinear or perpendicular; or if the two boundary edges connected by the current boundary point in the current plane are not both straight edges, then obtain one or more other boundary edges outside the current plane connected by the current boundary point, and if there are one or more other boundary edges perpendicular to the current plane; In step S22, the surface boundary conditions are specifically as follows: For each surface and each of its boundary edges, the surface geometry is represented as an extruded face, with the boundary edges of the surface being parallel to the base curve of the current surface or to the extrusion line of the current surface.
4. The method for determining and efficiently decomposing a multi-directional stretched entity according to claim 1, wherein: The step S3 is specifically as follows: Step S31: Traverse all points in the multi-directional stretching model, obtain all straight edges and planes adjacent to each point, and for each straight edge and plane adjacent to the current point, if the straight edge is perpendicular to the plane, use the straight edge as the generatrix of the current point on the current plane; Step S32: traverse all planes in the multi-directional stretching model, determine non-class I surfaces and class I surfaces based on the generatrix of each plane, and obtain the marked generatrix at the same time; Step S33: Traverse all non-class I surfaces and their marked generatrixes. For each non-class I surface and all its marked generatrixes, take the current non-class I surface as the source surface, and take all the planes connected by the marked generatrixes and adjacent to the source surface as the side surfaces. If the source surface and all its side surfaces form a fitting intersection, the source surface is a class II surface; if the source surface and one or more of its side surfaces form a cutting intersection, the source surface is a class III surface. Step S34: traverse all adjacent faces of the first and second type faces, and reclassify all the first and second type faces whose adjacent faces have holes on the stretching path into three types of faces.
5. The method for determining and efficiently decomposing a multi-directional stretched entity according to claim 1, characterized in that: In the step S32, for each plane, a point in the current plane faceA that is not connected to a busbar is obtained as a judgment point. For each judgment point, when the edge in the current plane faceA connected to the judgment point is the busbar of another plane faceB, and the direction is opposite to the normal direction of the other plane faceB, then the current plane faceA is a non-first-class face, and the edge of the busbar of the other plane faceB is marked as a marked busbar, otherwise the current plane faceA is a first-class face.
6. The method for determining and efficiently decomposing a multi-directional stretched entity according to claim 1, characterized in that: The step S4 is specifically as follows: Step S41: taking the first and second type faces as first decomposition faces, obtaining the number of concave edges of each first decomposition face, and sorting all first decomposition faces from smallest to largest according to the number of their concave edges, thereby forming a sorted set of first decomposition faces; Step S42: Processing each first decomposition surface in the sorted set of first decomposition surfaces in sequence according to the sorting order. For each first decomposition surface, obtaining all planes in the multi-directional stretching model that are parallel to the first decomposition surface according to the normal of the first decomposition surface, and then retaining the planes that are connected to the first decomposition surface only by another edge to form a parallel plane set; processing the parallel plane set based on the generatrix-parallel plane collaboration method. When the number of planes in the parallel plane set is not zero, obtaining the minimum value of the distances between all planes in the parallel plane set and the first decomposition surface as the stretching distance. When the number of planes in the parallel plane set is zero, using the shortest generatrix length of the first decomposition surface as the stretching distance; Step S43: Take the normal direction of the first decomposition surface pointing to the inside of the multi-directional stretching model as the stretching direction, perform the stretching operation according to the stretching distance, and perform the cutting operation on the shape body generated after the stretching operation to perform the cutting operation of the first decomposition surface in the multi-directional stretching entity.
7. The method for determining and efficiently decomposing a multi-directional stretched entity according to claim 1, characterized in that: The step S5 is specifically as follows: Step S51: After the stretching and cutting operations are performed on the first and second type faces, all the three type faces that remain in their original state are obtained as second decomposed faces that are not affected by the stretching and cutting operations on the first and second type faces. For each second decomposed face, the other three type faces on the side surfaces of the second decomposed face are obtained to form three type faces. Step S52: For each pair of three-type facing faces, the normal V of the first face A in the three-type facing faces is A As direction 1, the normal V of the second face B among the three types of faces B As direction 2, the normal V of the first face A A and the normal V of the second face B B The multiplication is used as direction three; at the same time, the common edge of the first face A and the second face B is used as the feature edge, the three directions are constructed as three axes respectively, and the feature line segments of the first face A and the second face B are obtained based on the feature edge; Step S53: For each axis constructed in step S52 and each characteristic line segment of the first surface A and the second surface B on it, when the characteristic line segments of the first surface A and the second surface B are adjacent and do not overlap, and there is no other characteristic line segment in between, the interval between the two closest endpoints of the characteristic line segments of the first surface A and the second surface B is used as the segmentation interval, and the midpoint of the segmentation interval is used as the segmentation point; Step S54: For all segmentation points and their segmentation intervals on each axis, if the segmentation intervals of two segmentation points intersect, the intersecting part is taken as the intersecting interval, and the segmentation points corresponding to the intersecting segmentation intervals are merged to obtain an updated segmentation point. The updated segmentation point is located at the midpoint of the intersecting interval, and the intersecting interval is used as the segmentation interval of the updated segmentation point. Finally, all unmerged segmentation points and the updated segmentation points are combined to form a segmentation point set. Step S55: for each segmentation point in the segmentation point set, generate a construction surface according to the normal direction of the segmentation point and the axis where it is located, and the normal direction of the construction surface is the normal direction of the segmentation point and the axis where it is located; Step S56: Based on the various construction surfaces generated in step S55, a cutting operation is performed on the respective second decomposed surfaces in the multi-directional stretching entity.
8. The method for determining and efficiently decomposing a multi-directional stretched entity according to claim 7, characterized in that: The step S52 is specifically as follows: Step S521: Construct Direction 1 as the first axis, map the generatrix edge of the hole on the first face A onto the first axis and use it as the initial feature line segment of the first face A on the first axis; at the same time, map the edge on the second face B that is not perpendicular or parallel to the feature edge onto the first axis and use it as the initial feature line segment of the second face B on the first axis; Step S522: Construct Direction 2 as the second axis, map the hole generatrix edge on the second face B onto the second axis and use it as the initial feature line segment of the second face B on the second axis; at the same time, map the edges on the first face A that are not perpendicular or parallel to the feature edge onto the second axis and use them as the initial feature line segments of the first face A on the second axis; Step S523: Construct direction three as the third axis, map the edges on the first face A that are not perpendicular or parallel to the feature edge onto the third axis, and use them as the initial feature line segments of the first face A on the third axis; and simultaneously map the edges on the second face B that are not perpendicular or parallel to the feature edge onto the third axis, and use them as the initial feature line segments of the second face B on the third axis. Step S524: For the initial feature line segments of the first face A on each axis, if two or more of the initial feature line segments have overlapping parts, the current two or more initial feature line segments are merged to serve as the final feature line segments of the first face A on the current axis; for the initial feature line segments of the second face B on each axis, if two or more of the initial feature line segments have overlapping parts, the current two or more initial feature line segments are merged to serve as the final feature line segments of the second face B on the current axis.
9. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the method according to any one of claims 1 to 8 is implemented.