A discretization method for industrial CAD models using 3D boundary curves
By using three-dimensional boundary curves to disperse the cross-period surfaces in industrial CAD, the problems of high computational complexity and numerical accuracy errors in the prior art are solved, and efficient and accurate surface discretization is achieved.
Patent Information
- Application Number
- CN202411746130.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-02
AI Technical Summary
When processing cross-period surfaces, the prior art needs to convert the three-dimensional boundary curve into two-dimensional parameter curves, resulting in high computational complexity and numerical accuracy errors, and it is impossible to efficiently and accurately realize the discretization of the curved surface.
By processing the boundary information of the topological surface, the three-dimensional boundary is reconstructed at the positions across the parameter period, and directly discretizes the three-dimensional boundary curve to obtain discretized points and project them into the parameter space. Combined with the two-dimensional triangulation method, the surface is discretized.
This method avoids the dependence on the two-dimensional parameter expression of boundary curves, improves the efficiency of discrete calculations, reduces numerical accuracy errors, and better preserves the accuracy of the three-dimensional geometric curves.
Smart Images

Figure CN119203698B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a model discretization method in the field of computer-aided design (CAD) and computer graphics, and in particular to a method for completing the discretization of a b-rep model in industrial CAD by means of a three-dimensional boundary curve. Background Art
[0002] In contemporary computer-aided design (CAD) and computer graphics, surface discretization is a crucial step. This process is usually used to generate meshes for subsequent numerical calculations and visualization. Surface discretization is widely used in many fields such as engineering simulation, animation production, and biomedical simulation. Therefore, how to discretize surfaces efficiently and accurately has become an important topic in computer graphics research.
[0003] For general topological surfaces, the discretization process often requires processing in their parameter space. However, when faced with cross-periodic surfaces with periodic boundary conditions, traditional methods are inadequate. The usual method is to perform two-dimensional discretization calculations on the two-dimensional parameter domain of the cross-periodic surface, and then remap the calculated discrete points to the three-dimensional space surface. This method relies on the natural periodic boundary of the parameter domain to deal with cross-periodic problems. However, in order to achieve this operation, all boundary curves on the topological surface must be converted into their expressions in the parameter space. Although this process can complete the discretization of periodic surfaces, the calculation of the two-dimensional parametric expression of each three-dimensional boundary curve is often very time-consuming, and it also inevitably introduces a loss of numerical accuracy.
[0004] In many practical applications, geometric information in three-dimensional space alone is sufficient to meet modeling needs, and maintaining three-dimensional geometric information can usually provide higher accuracy. Take SolidWorks, the most influential industrial software on the market, as an example. Its CAD modeling core Parasolid uses the B-rep topological model expression, which pays more attention to three-dimensional geometric information; its surface boundaries, in most cases, use three-dimensional curves as their actual carriers, and only record the two-dimensional parameter information corresponding to these three-dimensional boundaries at certain necessary moments. Therefore, in the field of industrial CAD modeling software, if you want to use the above traditional method, you need to calculate the parameter curves corresponding to its three-dimensional boundaries when processing surface discretization, and then use the parameter information of these boundaries to complete the subsequent discretization steps, which undoubtedly increases the complexity and time cost of the calculation. Therefore, how to find a discretization method that does not need to convert three-dimensional boundary curves into two-dimensional parameter curves has become a key topic of concern for researchers, aiming to improve computing efficiency and the accuracy of results.
[0005] Existing discretization methods for inter-periodic surfaces still have many limitations. For example, when discretizing in the parameter domain, the calculation of the two-dimensional parameter expression of the boundary curve is not only a time-consuming step, but also a problem that easily leads to loss of precision. Therefore, it is necessary to propose a discretization method that can both ensure the calculation timeliness and reduce the numerical precision error. Summary of the invention
[0006] In view of the deficiencies of the prior art, the present invention provides a method for discretizing a b-rep model in industrial CAD by means of a three-dimensional boundary curve. The present invention first processes the boundary information of the topological surface, reconstructs the three-dimensional boundary at the position across the parameter period; then discretizes directly on the three-dimensional boundary curve to obtain the desired discrete points; then the discrete points are projected into the parameter space of the surface to form discrete boundary line segments of the surface on the parameter domain. By using the boundary curve segments on the parameter domain, combined with the traditional two-dimensional triangulation method, an ideal discretization result can be obtained. Then the discretization result is mapped back to the three-dimensional space surface to achieve the triangulation of the three-dimensional topological surface.
[0007] The technical solution adopted by the present invention is:
[0008] 1. A method for discretizing the b-rep model in industrial CAD using 3D boundary curves
[0009] For each cross-period surface in the b-rep model, the corresponding three-dimensional boundary geometry curve is generated according to the parameter boundary of each cross-period surface itself, and recorded as the surface generatrix;
[0010] Based on all boundary curves on each cross-period surface, the three-dimensional boundary of the cross-period surface is reconstructed for each surface generatrix in the current cross-period surface to obtain a reconstructed cross-period surface, and then a b-rep model of the reconstructed surface is obtained;
[0011] The discretization method in the parameter domain is used to discretize each surface in the b-rep model after surface reconstruction to complete the discretization of the b-rep model.
[0012] The step of generating a corresponding three-dimensional boundary geometric curve according to the parameter boundary of each cross-periodic surface itself includes:
[0013] Combined with the natural parameter domain boundary of each cross-periodic surface, a three-dimensional boundary geometry curve is calculated using a parametric method and recorded as a three-dimensional boundary geometry curve.
[0014] The method of reconstructing the three-dimensional boundary of the cross-period surface for each surface generatrix in the current cross-period surface based on all boundary curves on each cross-period surface to obtain the reconstructed cross-period surface includes:
[0015] Perform three-dimensional curve intersection of each surface generatrix and all boundary curves on the current cross-period surface and record all intersection point information;
[0016] After merging the overlapping intersection points according to the positions of different intersection points, an intersection point set consisting of a number of non-overlapping intersection points is obtained, and then a local curve sequence list corresponding to each non-overlapping intersection point in the intersection point set is generated;
[0017] According to all local curve sequence lists of the intersection point set, a correct surface generatrix topology line segment is generated and the local curve sequence list is updated;
[0018] Based on the list of all local curve sequences of the intersection set, the interrupted boundary topology curves and the newly added surface generatrix topology segments are correctly reconnected to obtain the reconstructed cross-period surface, thus completing the three-dimensional boundary reconstruction of the cross-period surface.
[0019] For each non-overlapping intersection, the steps of generating the local curve sequence list include:
[0020] According to the local geometric information of each boundary curve, all boundary curves at each non-overlapping intersection are sorted so that the order of the boundary curves in the local curve sequence list is consistent with the circular arrangement order of the curve distribution in the actual space, thereby obtaining the local curve sequence list corresponding to the current non-overlapping intersection.
[0021] The method of generating a correct surface generatrix topology line segment according to the list of all local curve sequences of the intersection point set includes:
[0022] For two adjacent non-overlapping intersections in the intersection set, the intersection information of the current surface busbar and the boundary curves at the two intersections is used to determine whether the busbar between the two current adjacent intersections is located in the actual clipping surface; if it is located in the actual clipping surface, the surface busbar between the two current adjacent intersections is converted into an actual topological curve; the two different adjacent intersections in the intersection set are traversed and determined, so that the part located in the actual clipping surface is converted into an actual topological curve, thereby generating the correct surface busbar topological line segment and adding it to the local curve sequence list at the two end points of each surface busbar topological line segment.
[0023] The above-mentioned all local curve sequence lists based on the intersection set correctly reconnect the interrupted boundary topology curves and the newly added surface generatrix topology line segments to obtain the reconstructed cross-period surface, including:
[0024] For each non-overlapping intersection in the intersection set, each intersecting edge in the local curve sequence list of the current non-overlapping intersection is topologically connected according to the circular arrangement order of the curve distribution in the actual space; according to the local curve sequence list of each non-overlapping intersection, all non-overlapping intersections in the intersection set are traversed and processed to obtain the reconstructed cross-period surface.
[0025] The discretization method on the parameter domain is used to discretize each surface in the b-rep model after the surface reconstruction, including:
[0026] For each surface in the b-rep model after surface reconstruction, the topological boundary of each surface is discretized to obtain the discrete topological boundary of the surface, and then the discrete topological boundary is mapped back to the parameter domain of the surface; then, based on the discrete topological boundary in the parameter domain and the discrete points inside it, the surface is discretized using a two-dimensional triangulation method to obtain a discrete result on the parameter domain, and finally the discrete result on the parameter domain is mapped back to the three-dimensional topological surface to complete the discretization of the three-dimensional topological surface.
[0027] 2. A computer device
[0028] The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method for discretizing the b-rep model in industrial CAD by means of three-dimensional boundary curves when executing the computer program.
[0029] 3. A computer-readable storage medium
[0030] The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for discretizing the b-rep model in industrial CAD by means of three-dimensional boundary curves are implemented.
[0031] IV. A COMPUTER PROGRAM PRODUCT
[0032] The computer program product comprises a computer program / instructions, which when executed by a processor implement the steps of the method for discretizing a b-rep model in industrial CAD by means of three-dimensional boundary curves.
[0033] The beneficial effects of the present invention are:
[0034] The present invention directly performs discretization calculations on cross-periodic surfaces by utilizing three-dimensional boundary curve information, eliminating the reliance on two-dimensional parameter expression of boundary curves in traditional methods, thereby avoiding problems such as time consumption and numerical precision errors.
[0035] The method proposed in the present invention can not only improve the efficiency of discretization calculation, but also better preserve the accuracy of the three-dimensional geometric curve itself.
[0036] The method proposed in the present invention can generate high-quality discretized grids more quickly and accurately by making full use of existing three-dimensional boundary information, which will greatly promote various applications of cross-periodic surface processing in computer-aided design and computer graphics. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Schematic diagram of the b-rep wireframe model of the worm in this embodiment.
[0038] Figure 2 It is an overall flow chart of the method of the present invention.
[0039] Figure 3 It is a flow chart of the algorithm of the intersection curve sorting table in the present invention.
[0040] Figure 4 It is a schematic diagram of the boundary after adding a surface generatrix across the periodic surface in this embodiment.
[0041] Figure 5 It is a schematic diagram of boundary reconstruction after adding the surface generatrix on the parameter domain in this embodiment.
[0042] Figure 6 Schematic diagram of the triangular mesh after the b-rep helicoidal surface is discretized in this embodiment. DETAILED DESCRIPTION
[0043] The present invention will be described in detail below based on the accompanying drawings and preferred embodiments, and the purpose and effects of the present invention will become more clear. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] Now, taking a very common part in an industrial CAD model as an example, in this embodiment, a b-rep wireframe model of a worm is selected. Figure 1 As shown, the upper half of the b-rep wireframe model of the worm has a threaded shape; the thread surfaces that constitute these shapes often span multiple surface parameter cycles, and therefore can be used as a typical cross-cycle surface case to illustrate the method flow of the present invention for processing cross-cycle surfaces.
[0045] The overall flow chart of the method for completing the discretization of the b-rep model in industrial CAD by means of three-dimensional boundary curves proposed in the present invention is as follows: Figure 2 As shown, the specific process includes the following:
[0046] Import the b-rep wireframe model of the worm. For each single-period helical surface (i.e., cross-period surface) in the b-rep model, Figure 1 As shown. According to the parameter boundary of each single-period helicoid, the corresponding three-dimensional boundary geometric curve is generated and recorded as the surface generatrix;
[0047] Among them, the corresponding three-dimensional boundary geometric curve is generated according to the parameter boundary of each single-period helicoid surface itself, including:
[0048] Combined with the natural parameter domain boundary of each single-period helicoid, the three-dimensional boundary geometric curve is calculated using the parameterization method and recorded as the three-dimensional boundary geometric curve. In most cases, the parameter domain of the cross-period geometric surface is often regular, that is, its parameter domain often conforms to: (u,v)∈{0≤u≤u max , 0≤v≤v max}. At this time, the parametric boundary of the surface is often composed of four isoparametric lines: u=0, u= u max , v=0,v= v max Based on the information of these four isoparametric lines, the precise mathematical expression of these isoparametric lines in three-dimensional space can be calculated. When the geometric surface is periodic in a certain direction, the parameter boundary in this direction is used as the surface generatrix that needs to be involved in subsequent calculations.
[0049] For example, the boundary of the helicoid surface to be discretized consists of two spiral boundary lines and two arc boundary lines, such as Figure 4 The geometric surface corresponding to the spiral surface itself is a cylindrical surface, and its parameters are periodic in the U direction with a period of 2π. The performance of this topological surface in the parameter domain can be referred to Figure 5 The left figure of . Considering that the current topological surface is a single-period spiral surface, a generatrix is generated on the periodic boundary of the parameter domain, that is, an isoparametric line u=2π. According to the geometric properties of the cylindrical surface, it can be known that the isoparametric line still maintains the form of a straight line in three-dimensional space and is recorded as g.
[0050] Based on all boundary curves on each single-period helical surface, the three-dimensional boundary of the single-period helical surface is reconstructed for each surface generatrix in the current single-period helical surface to obtain the corresponding reconstructed single-period helical surface; that is, if there are two surface generatrixes in the current single-period helical surface, the three-dimensional boundary reconstruction of the single-period helical surface is repeated to obtain the corresponding reconstructed single-period helical surface. The reconstructed single-period helical surface is composed of multiple single-period surfaces. If there are multiple single-period helical surfaces in the b-rep model, each single-period helical surface is traversed and processed to obtain the corresponding reconstructed single-period helical surface, and then the b-rep model of the surface is obtained; the b-rep model of the surface reconstruction is composed of the reconstructed single-period helical surface corresponding to the single-period helical surface and the original non-single-period helical surface.
[0051] Among them, based on all boundary curves on each single-period helical surface, the three-dimensional boundary of the single-period helical surface is reconstructed for each surface generatrix in the current single-period helical surface, and the corresponding reconstructed single-period helical surface is obtained, including:
[0052] Each surface generatrix is intersected with all boundary curves on the current single-period spiral surface in a three-dimensional curve and all intersection information is recorded; considering that the boundary curves of the topological surface are often stored in a three-dimensional form, and the three-dimensional form of the surface generatrix is also obtained, the intersection between the surface generatrix and the boundary curve (i.e., the two three-dimensional curves) can be calculated using a numerical solution method. Figure 4 It can be seen that the surface generatrix g has an intersection point with each of the two spiral lines, denoted as A and B.
[0053] After merging the overlapping intersection points according to the positions of different intersection points, an intersection point set consisting of a number of non-overlapping intersection points is obtained, and then a local curve sequence list corresponding to each non-overlapping intersection point in the intersection point set is generated;
[0054] For each non-overlapping intersection, the steps for generating the local curve sequence list are as follows: Figure 3 As shown, including:
[0055] According to the local geometric information of each boundary curve, all boundary curves at each non-overlapping intersection are sorted so that the order of the boundary curves in the local curve sequence list is consistent with the circular arrangement order of the curve distribution in the actual space, thereby obtaining the local curve sequence list corresponding to the current non-overlapping intersection.
[0056] The curve sequence list is mainly used to record the circular arrangement relationship of all curve segments passing through a certain intersection. For two-dimensional curves in a two-dimensional plane, the calculation of the order relationship between these curves is relatively simple, that is, the tangent direction and curvature of each curve at the intersection point in the two-dimensional plane can be sorted; and in the processing flow of the present invention, the three-dimensional curves on the surface are involved in the intersection, so there will be some differences compared to the two-dimensional plane. For most cases, the intersection point is located at a general position on the three-dimensional surface, and the tangent plane of the three-dimensional surface can be obtained at the intersection point. At this time, it can be done by Figure 3 The method flow is given to complete the sorting calculation of each intersecting curve at the intersection point, so as to obtain the correct curve sequence list.
[0057] The following are Figure 3 Detailed description of the method flow chart in:
[0058] 1. For each boundary curve that intersects with the main line, the boundary curve is broken at the intersection of the two. That is, the topological half edge corresponding to the original curve is split into two new half edges at the break point through Euler operation, and the connection relationship is maintained according to the curve direction of the original curve (if the intersection point happens to be at the break point of the boundary curve, there is no need to break it);
[0059] 2. After the boundary curve is interrupted, the geometric information of the curves on both sides of the breakpoint is recorded, including:
[0060] a) Whether it is an incident / outgoing edge. If the breakpoint is used as the starting point of the new curve segment, the half side of the curve after the break is considered to be the outgoing edge, otherwise it is the incident edge;
[0061] b) For each half edge of the curve, calculate the tangent vector and geodesic curvature of the curve at the breakpoint. If it is an outgoing edge, calculate according to the original curve direction; if it is an incident edge, perform the above geometric calculation in the opposite direction of the original curve direction.
[0062] c) Randomly select a direction in the tangent plane at the breakpoint as the reference direction (generally, you can consider selecting the tangent direction to the mother line at this point), and calculate the angle of the tangent direction of each half of the curve rotated counterclockwise to the reference direction.
[0063] d) Sort each curve half-edge according to the rotation angle from small to large; if the tangents of two curve half-edges are equal (the rotation angles are the same), then sort the two curve half-edges according to the geodesic curvature from small to large.
[0064] e) After sorting, the curve half-edges in the curve sequence table should follow the rule of alternating "incident edge-outcident edge", that is, there are no two adjacent curve half-edges, they are both incident edges or outcries. If the sorting result does not follow this rule, it means that there is a problem with the original topological boundary itself.
[0065] 3. For some specific situations, the above method needs to be modified:
[0066] a) If the geometric surface of the topological surface has a pole, such as the vertex of a cone or the pole of a sphere, the surface generatrix intersects all boundary curves, but there is no intersection point with the boundary at the pole. In this case, it is necessary to first calculate whether the pole is within the topological boundary. If the pole is within the area represented by the topological surface, the point is added to the generatrix to complete the topological boundary.
[0067] b) If it is a double-periodic surface similar to a torus, you can add a generatrix on one period to reconstruct the boundary. Then, use the reconstructed boundary as the new boundary of the topological surface, and then add a generatrix in the other direction to perform a second boundary reconstruction operation.
[0068] c) If the intersection of the surface generatrix and the boundary curve happens to be at the singular point of the geometric surface, the tangent plane of the geometric surface cannot be correctly calculated at these points. At this time, it is necessary to calculate the ordering relationship between these curves separately for different types of situations based on the parametric equations of the surface itself. However, in practical applications, special surfaces with singular points are more limited to the rotation surface part. Therefore, for the singular points on the rotation surface, you can choose a plane that passes through the intersection and uses the direction of the rotation axis as the normal vector to "replace" the surface tangent plane in the process. At this time, you only need to project each boundary curve onto this plane and reuse it. Figure 3 According to the method flow in, the order relationship of each curve is correctly calculated.
[0069] The following is for Figure 4 For the specific helicoid given in Figure 3 The method flow is described in detail:
[0070] For the intersection point A, the original spiral line is interrupted to obtain two curve half sides a1 and a2. According to the direction of the curve, a1 is the outgoing side and a2 is the incident side. 2- The tangent direction at the intersection A is used as the basic direction for calculating the rotation angle. It can be calculated that the rotation angle at this position is about 240° (since a2 is the incident edge, a2 is first reversed, and then its tangent direction at the intersection A is calculated. With the tangent direction, the counterclockwise rotation angle from the tangent direction to the reference direction can be calculated). Similarly, it can be calculated that the rotation angle of a1 at this position is about 60°. According to the order of angles from small to large, the boundary curve sorting table of intersection A can be obtained as a1, a2. Similarly, the boundary curve sorting table at intersection B can also be calculated to obtain the boundary curve sorting table b1, b2.
[0071] According to all local curve sequence lists of the intersection set, the correct surface generatrix topological line segment is generated and the local curve sequence list is updated, that is, the newly added surface generatrix topological line segment;
[0072] According to the list of all local curve sequences of the intersection set, the correct surface generatrix topology line segments are generated, including:
[0073] For two adjacent non-overlapping intersections in the intersection set, the intersection information of the current surface busbar and the boundary curves at the two intersections is used to determine whether the busbar between the two adjacent intersections is located in the actual clipping surface, that is, whether it is located within the boundary of the current single-period helical surface; the intersection information includes the position, the tangent direction of the surface curve and the boundary curve, and the parameter value; if it is located in the actual clipping surface, that is, the left side of the busbar in the local curve sequence table is the incident edge and the right side is the exit edge, it means that the busbar segment is within the range represented by the topological surface, then the current The surface busbar between two adjacent intersection points is converted into an actual topological curve; if the right side of this busbar in the sequence is the incident edge and the left side is the outgoing edge, it means that this busbar is outside the range represented by the topological surface and does not need to be added to the local curve sequence list; the two different adjacent intersection points in the intersection set are traversed and judged so that the part that is exactly within the actual clipping surface is converted into an actual topological curve, thereby generating the correct surface busbar topological line segment and adding it to the local curve sequence list at the two end points of each surface busbar topological line segment for participating in subsequent topological operations.
[0074] For the intersection A, there are two busbars directly connected to the intersection A, denoted as g1 and g2. Each busbar should contain a pair of half-edges in opposite directions to ensure the correct topological structure. Figure 4 Medium 1+ ,g 1- ,g 2+ ,g 2- For g1, we can also get the tangent direction of g1 at the intersection point A by using the method of calculating the tangent rotation angle of the curve, and calculate the rotation angle from the tangent direction to the reference direction of the point. Since g1 and g2 are collinear at the intersection point A, we can know that g 1+ ,g 1- The corresponding rotation angles are. Similarly, g can also be calculated 2+ ,g 2- The corresponding rotation angle is 0° or 360°. Since the curve sorting table actually represents the circular sorting between the curves, the two tangential rotation angle calculation values corresponding to the g2 generatrix will not affect the final sorting result. At this time, all the half-edge curves connected to A can be sorted once. The current curve sorting table is: a1(60°), g 1- (180°), g 1+ (180°),a2(240°), g 2- (360°), g 2+(360°). Considering that a2 is the incident edge and a1 is the outgoing edge, according to the sorting rule mentioned above: "The busbar with the incident edge on the left and the outgoing edge on the right is located in the discrete area, it needs to be added to the curve sequence list", it can be known that g2 has a1 on the left and a2 on the right, which meets the above requirements, so the busbar g2 needs to be added to the curve sequence list at the intersection A. As for the busbar g1, since it has a2 on the left and a1 on the right, g1 should not be retained in the curve sequence list at the intersection A. Therefore, the final curve sorting list of the intersection A can be obtained: a2, g 2- , g 2+ ,a1.
[0075] Similarly, similar calculation steps are performed on the intersection point B, and the curve sequence table of the intersection point B can be obtained as follows: b2, g 2+ ,g 2- ,b1, and the curve sequence lists at the intersection points A and B conform to the rule of alternating ordering of incident edges and outgoing edges, indicating that the current calculated results conform to the actual topological situation.
[0076] Based on the list of all local curve sequences of the intersection set, the interrupted boundary topology curves and the newly added surface generatrix topology segments are correctly reconnected to obtain the reconstructed single-period helical surface, thus completing the three-dimensional boundary reconstruction of the single-period helical surface.
[0077] Based on the list of all local curve sequences of the intersection set, correctly reconnect the interrupted boundary topology curves and the newly added surface generatrix topology segments to obtain the reconstructed single-period spiral surface, including:
[0078] Since the spatial ordering information of the curves has also been saved in the local curve sequence table, all the curve half-edges in it can be connected in order, that is, each incident half-edge is connected to the next adjacent outgoing half-edge, so there is no need to recalculate separately. While connecting, the loops corresponding to these half-edges are also updated. For each non-overlapping intersection in the intersection set, each intersecting edge in the local curve sequence table of the current non-overlapping intersection is topologically connected according to the circular arrangement order of the curve distribution in the actual space, and the rest remains unchanged; according to the local curve sequence table of each non-overlapping intersection, all non-overlapping intersections in the intersection set are traversed and processed to obtain the reconstructed single-period spiral surface, and the topological boundary in the reconstructed single-period spiral surface is correct and complete.
[0079] For the intersection point A, the local half-edge topology before adding the busbar is: a2→a1. According to the curve sorting table after adding the busbar, we can know that the next half-edge of a2 should be the next half-edge in the curve sorting table, that is, g 2- , so the next half edge of a2 can be set to g 2- Similarly, g2+ The next half edge of will also be set to a1. At this time, the local topology at the intersection A can be recorded as: a2→g 2- , g 2+ →a1.
[0080] Then, similar operations are performed on the intersection point B, and the local topology at the intersection point B is obtained as follows: b2→g 2+ , b1→g 2- .
[0081] After the topology at all breakpoints is reconstructed, the boundary of the entire topology surface is naturally reconstructed, that is, the original loop: a2→a1→…→b2→b1→…→a2 is split into two small loops: b2→g 2+ →a1→…→b2 and a2→g 2- →b1→…→a2. There is no cross-border situation between the two loops. Each loop is located in the same cycle in the parameter domain.
[0082] Finally, the discretization method on the parameter domain is used to discretize each surface in the reconstructed b-rep model. That is, each single-period surface in the reconstructed b-rep model is discretized separately to complete the discretization of the b-rep model.
[0083] Among them, the discretization method on the parameter domain is used to discretize each surface in the b-rep model after surface reconstruction, including:
[0084] For each surface in the reconstructed b-rep model, the topological boundary of each surface is discretized to obtain the discrete topological boundary of the surface, and then the discrete topological boundary is mapped back to the parameter domain of the surface as the discrete boundary of the next two-dimensional discretization region;
[0085] according to Figure 5 As shown in the right figure, after adding the busbar, the topological surface is divided into two areas: the upper left corner and the lower right corner. The discrete boundaries projected from the discrete points on the three-dimensional curve to the parameter space will also maintain the same outline as in the figure.
[0086] Then, a certain number of discrete points (depending on the discrete accuracy requirements) are inserted inside the parameter domain. Based on the discrete topological boundary in the parameter domain and the discrete points inside it, the surface is discretized using a two-dimensional triangulation method (such as the CDT method, etc.) to obtain the discrete result on the parameter domain. Finally, the discrete result on the parameter domain is mapped back to the three-dimensional topological surface to complete the discretization of the three-dimensional topological surface. For example, Figure 6 As shown in Figure 2, since the discretization method is first performed on the boundary curve, the generatrix shared by the two regions (i.e., g 2- ,g2+ ) will have the same discrete point boundary in the parameter domain. Based on this feature, after performing the two-dimensional discretization, the discrete points of the two boundaries can be mapped back to the same three-dimensional discrete points to ensure the watertightness of the surface discretization. That is, because the surfaces in the b-rep model after surface reconstruction have topological continuity, the discretization result can also ensure the watertightness of its mesh grid and generate high-quality discretization results.
[0087] The present invention also proposes a computer device, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the steps of a method for discretizing a b-rep model in industrial CAD with the help of a three-dimensional boundary curve.
[0088] The present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for discretizing a b-rep model in industrial CAD with the help of a three-dimensional boundary curve are implemented.
[0089] The present invention also proposes a computer program product, which includes a computer program / instruction, which, when executed by a processor, implements the steps of a method for discretizing a b-rep model in industrial CAD with the help of a three-dimensional boundary curve.
[0090] Those skilled in the art can understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, etc. made within the spirit and principle of the invention shall be included in the protection scope of the invention.
Claims
1. A method for discretizing an industrial CAD model using a three-dimensional boundary curve, characterized in that: include: For each cross-period surface in the b-rep model, the corresponding three-dimensional boundary geometry curve is generated according to the parameter boundary of each cross-period surface itself, and recorded as the surface generatrix; Based on all boundary curves on each cross-period surface, the three-dimensional boundary of the cross-period surface is reconstructed for each surface generatrix in the current cross-period surface to obtain a reconstructed cross-period surface, and then a b-rep model of the reconstructed surface is obtained; The discretization method in the parameter domain is used to discretize each surface in the b-rep model after surface reconstruction, so as to complete the discretization of the b-rep model; The method of reconstructing the three-dimensional boundary of the cross-period surface for each surface generatrix in the current cross-period surface based on all boundary curves on each cross-period surface to obtain the reconstructed cross-period surface includes: Perform three-dimensional curve intersection of each surface generatrix and all boundary curves on the current cross-period surface and record all intersection point information; After merging the overlapping intersection points according to the positions of different intersection points, an intersection point set consisting of a number of non-overlapping intersection points is obtained, and then a local curve sequence list corresponding to each non-overlapping intersection point in the intersection point set is generated; According to all local curve sequence lists of the intersection point set, a correct surface generatrix topology line segment is generated and the local curve sequence list is updated; Based on the list of all local curve sequences of the intersection set, the interrupted boundary topology curves and the newly added surface generatrix topology segments are correctly reconnected to obtain the reconstructed cross-period surface, thus completing the three-dimensional boundary reconstruction of the cross-period surface.
2. The method for discretizing an industrial CAD model by means of a three-dimensional boundary curve according to claim 1, characterized in that: The step of generating a corresponding three-dimensional boundary geometric curve according to the parameter boundary of each cross-periodic surface itself includes: Combined with the natural parameter domain boundary of each cross-periodic surface, a three-dimensional boundary geometry curve is calculated using a parametric method and recorded as a three-dimensional boundary geometry curve.
3. The method for discretizing an industrial CAD model by means of a three-dimensional boundary curve according to claim 1, characterized in that: For each non-overlapping intersection, the steps of generating the local curve sequence list include: According to the local geometric information of each boundary curve, all boundary curves at each non-overlapping intersection are sorted so that the order of the boundary curves in the local curve sequence list is consistent with the circular arrangement order of the curve distribution in the actual space, thereby obtaining the local curve sequence list corresponding to the current non-overlapping intersection.
4. The method for discretizing an industrial CAD model by means of a three-dimensional boundary curve according to claim 1, characterized in that: The method of generating a correct surface generatrix topology line segment according to the list of all local curve sequences of the intersection point set includes: For two adjacent non-overlapping intersections in the intersection set, the intersection information of the current surface busbar and the boundary curves at the two intersections is used to determine whether the busbar between the two current adjacent intersections is located in the actual clipping surface; if it is located in the actual clipping surface, the surface busbar between the two current adjacent intersections is converted into an actual topological curve; the two different adjacent intersections in the intersection set are traversed and determined, so that the part located in the actual clipping surface is converted into an actual topological curve, thereby generating the correct surface busbar topological line segment and adding it to the local curve sequence list at the two end points of each surface busbar topological line segment.
5. The method for discretizing an industrial CAD model by means of a three-dimensional boundary curve according to claim 1, characterized in that: The above-mentioned all local curve sequence lists based on the intersection set correctly reconnect the interrupted boundary topology curves and the newly added surface generatrix topology line segments to obtain the reconstructed cross-period surface, including: For each non-overlapping intersection in the intersection set, each intersecting edge in the local curve sequence list of the current non-overlapping intersection is topologically connected according to the circular arrangement order of the curve distribution in the actual space; according to the local curve sequence list of each non-overlapping intersection, all non-overlapping intersections in the intersection set are traversed and processed to obtain the reconstructed cross-period surface.
6. The method for discretizing an industrial CAD model by means of a three-dimensional boundary curve according to claim 1, characterized in that: The discretization method on the parameter domain is used to discretize each surface in the b-rep model after the surface reconstruction, including: For each surface in the b-rep model after surface reconstruction, the topological boundary of each surface is discretized to obtain the discrete topological boundary of the surface, and then the discrete topological boundary is mapped back to the parameter domain of the surface; then, based on the discrete topological boundary in the parameter domain and the discrete points inside it, the surface is discretized using a two-dimensional triangulation method to obtain a discrete result on the parameter domain, and finally the discrete result on the parameter domain is mapped back to the three-dimensional topological surface to complete the discretization of the three-dimensional topological surface.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method for discretizing an industrial CAD model by means of three-dimensional boundary curves as described in any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for discretizing an industrial CAD model by means of three-dimensional boundary curves as claimed in any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method for discretizing an industrial CAD model by means of three-dimensional boundary curves as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Techniques for generating UV-net representations of 3D CAD objects of machine learning models
CN115146333A