Pipe transition piece three-dimensional modeling method, system, electronic device and storage medium
Patent Information
- Application Number
- CN202211675527.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-12-26
AI Technical Summary
但该方法未考虑管道过渡件03前、后两段的管道一01、管道二02的连续性问题,导致管道过渡件03与管道一01及管道二02的衔接处不圆滑且棱角分明;此外,生成的模型样式无法通过参数进行调整,难以满足实际建模要求
[0069] Compared with the prior art, the beneficial effects of the present invention are as follows: A preprocessing method using B-spline transformation and surface refinement is employed to preprocess the two pipes to be connected, ensuring consistent parametric characteristics of the two pipe surfaces; then, a control point mesh v-direction sequence pairing method is used to match the isoparametric lines in the two isoparametric line sets picked from the pipe surfaces, and the positions of the isoparametric lines in one of the isoparametric line sets are adjusted to achieve one-to-one pairing of isoparametric lines in the two isoparametric line sets; next, a preset transition curve algorithm is used to construct transition curves for the paired isoparametric lines to form a transition curve set, which is then fitted using a surface fitting algorithm to obtain a transition surface, achieving a smooth transition between the pipe surfaces before and after; finally, based on the starting and ending sections of the pipe transition component, and combined with the transition surface, a topological stitching algorithm is used to obtain the topological entity of the pipe transition component. In short, the above steps are generated based on the surface continuity constraints between the pipe transition component and the two pipes before and after it. The transition curve is fitted to the side of the pipe component, which can achieve a smooth transition between the two pipes before and after it, and supports curvature continuity at the highest level. Furthermore, the control points of the transition curve can be adjusted according to the dynamic balance factor parameters, so that the style of the transition component can be adjusted as needed. This solves the shortcomings of existing modeling methods for pipe transition components, such as the lack of smoothness at the connection between the two pipes to be connected and the inability to adjust the style of the generated model through parameters.
Smart Images

Figure CN115937469B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of computer modeling, and specifically relates to a three-dimensional modeling method, system, electronic device and storage medium for pipe transition components. Background Technology
[0002] like Figure 1 As shown, pipe transition component 03 is an irregularly shaped component that meets certain continuity requirements between given pipes (pipe 1 01 and pipe 2 02 in the figure). The three-dimensional solid model of the pipe transition component is the foundation for three-dimensional simulation and numerical verification calculations in building plumbing, therefore, the three-dimensional solid modeling of the pipe transition component is particularly important.
[0003] Existing 3D modeling techniques for pipe transition components typically employ a lofting and fusion method. This method uses the starting contour line, ending contour line, and lofting path as input, and constructs a topological solid through surface fitting and surface stitching techniques. However, this method fails to consider the continuity between the two sections of pipe transition component 03—pipe 1 01 and pipe 2 02—resulting in unsmooth and angular connections between pipe transition component 03 and both pipe 1 01 and pipe 2 02. Furthermore, the generated model style cannot be adjusted through parameters, making it difficult to meet actual modeling requirements. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a three-dimensional modeling method, system, electronic device, and storage medium for pipe transition components. By combining the surface characteristics of the two pipe sections before and after the transition component, a transition curve is constructed to fit the side of the pipe transition component. Then, a topological entity is constructed through surface fitting and surface stitching techniques. Furthermore, the control points of the transition curve can be adjusted so that the style of the transition pipe component can be adjusted as needed.
[0005] In a first aspect, the embodiments of this application provide a three-dimensional modeling method for pipe transition components, which includes:
[0006] Obtain the pipe surfaces corresponding to the two pipes to be connected, as well as the starting and ending sections of the pipe transition piece between the two pipes;
[0007] The two pipe surfaces are preprocessed to ensure that their parametric characteristics remain consistent; the preprocessing includes B-spline transformation and surface refinement.
[0008] Pick an equal number of isoparametric lines from the two pipe surfaces respectively, and use the control point grid v-direction sequence pairing method to match the isoparametric lines in the two isoparametric line sets. Adjust the position of the isoparametric lines in one of the isoparametric line sets so that the isoparametric lines in the two isoparametric line sets are paired one by one to form paired isoparametric lines.
[0009] Based on different continuity constraints, corresponding preset transition curve algorithms are adopted to construct transition curves for the paired isoparametric lines to form a set of transition curves;
[0010] A surface fitting algorithm is used to fit the set of transition curves to obtain the transition surface;
[0011] Based on the starting section and the ending section, and in conjunction with the transition surface, the topological entity of the pipe transition component is obtained through a topological stitching algorithm.
[0012] Preferably, the specific steps for obtaining the pipe surfaces corresponding to the two pipes to be transitioned and connected, as well as the starting and ending cross-sections of the pipe transition piece between the two pipes, include:
[0013] The three-dimensional parameters of the two pipes to be transitioned are used to obtain the corresponding pipe surfaces using three-dimensional software.
[0014] The starting section of the pipe transition piece between the two pipes is generated based on the pipe surface termination profile of one of the pipes.
[0015] The termination section of the pipe transition between the two pipes is generated based on the initial profile of the pipe surface of the other pipe.
[0016] Preferably, the preprocessing of the two pipe surfaces ensures that their parametric characteristics remain consistent; wherein the preprocessing includes B-spline transformation and surface refinement steps, specifically comprising:
[0017] The two pipe surfaces are respectively converted into their corresponding B-spline surfaces using the B-spline surface conversion algorithm;
[0018] A surface order-increasing algorithm is used to unify the u-direction order of the two B-spline surfaces; wherein, the u-direction order is the maximum order in the u-direction of the two B-spline surfaces;
[0019] A curve node refinement algorithm is used to unify the u-direction node vectors of the two B-spline surfaces; wherein, the u-direction node vector is the union of the node vectors in the u direction of the two B-spline surfaces;
[0020] The consistent u-axis degree and u-axis node vector are used to ensure that the parametric properties of the two pipe surfaces remain consistent.
[0021] Preferably, the step of picking an equal number of isoparametric line sets from the two pipe surfaces, matching the isoparametric lines in the two isoparametric line sets using a control point grid v-direction sequence pairing method, and adjusting the position of the isoparametric lines in one of the isoparametric line sets so that the isoparametric lines in the two isoparametric line sets are paired one-to-one to form paired isoparametric lines specifically includes:
[0022] Sample n isoparametric lines along the u direction for each of the two pipe surfaces to obtain a set C of equal numbers of isoparametric lines. s C e ;
[0023] According to the isoparametric set C s C e Set the corresponding control point matrix M respectively. s M e ;in,
[0024]
[0025] Solving for the optimal pairing of control point sequences to determine M s The i-th row of the sequence {p 0i p 1i , ..., p mi} and M e The j-th row sequence {q 0j q 1j , ..., q mj}pair;
[0026] Define the control point matrix M s M e The objective function ε(M) for optimal pairing of v-direction sequences s M e ,j,b), where j = 1, 2, 3, ..., n+1, and b represents a Boolean identifier;
[0027] Based on the recursive order of the Boolean identifier b, the calculation formula for the objective function is determined, wherein the specific calculation formula is as follows:
[0028] ε(M s M e ,j,b)=Min(D(A,shift(B,j)),D(A,N shift(B,j))),
[0029] In the formula, A = {p} m0 p m1 , ..., p mn}, B={q l0 q l1 , ..., q ln}, where D represents the Euclidean distance between two control point sequences, shift(B,j) represents the j-th sequential shift operation on vector B, and N shift(B,j) represents the j-th reverse shift operation on vector B; if D(A, shift(B,j))≤D(A, N shift(B,j), then b is a sequential recursion, otherwise it is a reverse recursion.
[0030] Based on the result of the objective function, the isoparametric lines in the two sets of isoparametric lines are paired one-to-one to form paired isoparametric lines.
[0031] Preferably, the formula for calculating the Euclidean distance D is:
[0032]
[0033] In the formula, Dist represents the calculation of the distance between three-dimensional points.
[0034] Preferably, the preset transition curve algorithm is one of the following: position continuous algorithm, tangent continuous algorithm, and curvature continuous algorithm.
[0035] Preferably, the preset transition curve algorithm is a curvature continuity algorithm; based on the consistency of the u-direction node vector and the number of control points, the u-direction curvature of the transition surface is continuous with that of the two pipe surfaces.
[0036] Secondly, this application provides a three-dimensional modeling system for pipe transition components, comprising:
[0037] The acquisition module is used to acquire the pipe surfaces corresponding to the two pipes to be connected, as well as the starting and ending sections of the pipe transition piece between the two pipes.
[0038] A preprocessing module is used to preprocess the two pipe surfaces to ensure that the parametric characteristics of the two pipe surfaces are consistent; wherein, the preprocessing includes B-spline transformation processing and surface refinement processing;
[0039] The pairing module is used to pick up an equal number of isoparametric line sets from the two pipe surfaces, and use the control point grid v-direction sequence pairing method to match the isoparametric lines in the two isoparametric line sets. It also adjusts the position of the isoparametric lines in one of the isoparametric line sets so that the isoparametric lines in the two isoparametric line sets are paired one by one to form paired isoparametric lines.
[0040] A construction module is used to construct transition curves for the paired isoparametric lines by adopting appropriate preset transition curve algorithms based on different continuity constraints, thereby forming a set of transition curves.
[0041] The fitting module is used to perform fitting processing on the set of transition curves using a surface fitting algorithm to obtain a transition surface;
[0042] The topology module is used to obtain the topological entity of the pipe transition component through a topology stitching algorithm based on the starting section and the ending section, and in combination with the transition surface.
[0043] Preferably, the acquisition module includes:
[0044] The acquisition unit is used to acquire the corresponding pipe surface using 3D software based on the 3D parameters of the two pipes to be transitioned and connected.
[0045] The first generation unit is used to generate the starting section of the pipe transition between the two pipes based on the pipe surface termination profile of one of the pipes.
[0046] The second generation unit is used to generate the termination section of the pipe transition between the two pipes based on the pipe surface start profile of the other pipe.
[0047] Preferably, the preprocessing module includes:
[0048] The conversion unit is used to convert the two pipe surfaces into their corresponding B-spline surfaces using the B-spline surface conversion algorithm.
[0049] An order-increasing unit is used to unify the u-direction order of the two B-spline surfaces using a surface order-increasing algorithm; wherein the u-direction order is the maximum order in the u-direction of the two B-spline surfaces;
[0050] The refinement unit is used to unify the u-direction node vectors of the two B-spline surfaces using a curve node refinement algorithm; wherein the u-direction node vector is the union of the node vectors in the u direction of the two B-spline surfaces;
[0051] The processing unit is used to ensure that the parametric characteristics of the two pipe surfaces remain consistent based on the unified u-direction number and the u-direction node vector.
[0052] Preferably, the pairing module includes:
[0053] The sampling unit is used to sample n isoparametric lines along the u direction for each of the two pipe surfaces, so as to obtain a set C of isoparametric lines with an equal number of lines. s C e ;
[0054] The setting unit is used to set the isoparametric lines C according to the given set of isoparametric lines. s C e Set the corresponding control point matrix M respectively. s M e ;in,
[0055]
[0056] Solving unit, used to solve for the optimal pairing of control point sequences to determine M s The i-th row of the sequence {p 0i p 1i , ..., p mi} and M e The j-th row sequence {q 0j q1j , ..., q mj}pair;
[0057] Define unit, used to define the control point matrix M s M e The objective function ε(M) for optimal pairing of v-direction sequences s M e ,j,b), where j = 1, 2, 3, ..., n+1, and b represents a Boolean identifier;
[0058] The calculation unit is used to determine the calculation formula of the objective function according to the recursive order of the Boolean identifier b, wherein the calculation formula is specifically as follows:
[0059] ε(M s M e ,j,b)=Min(D(A,shift(B,j)),D(A,N shift(B,j))),
[0060] In the formula, A = {p} m0 p m1 , ..., p mn}, B={q l0 q l1 , ..., q lm}, where D represents the Euclidean distance between two control point sequences, shift(B,j) represents the j-th sequential shift operation on vector B, and N shift(B,j) represents the j-th reverse shift operation on vector B; if D(A, shift(B,j))≤D(A, N shift(B,j), then b is a sequential recursion, otherwise it is a reverse recursion.
[0061] The pairing unit is used to pair isoparametric lines in the two sets of isoparametric lines to form paired isoparametric lines based on the result of the objective function.
[0062] Preferably, the formula for calculating the Euclidean distance D is:
[0063]
[0064] In the formula, Dist represents the calculation of the distance between three-dimensional points.
[0065] Preferably, the preset transition curve algorithm is one of the following: position continuous algorithm, tangent continuous algorithm, and curvature continuous algorithm.
[0066] Preferably, the preset transition curve algorithm is a curvature continuity algorithm; based on the consistency of the u-direction node vector and the number of control points, the u-direction curvature of the transition surface is continuous with that of the two pipe surfaces.
[0067] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the three-dimensional modeling method for pipe transition components as described in the first aspect.
[0068] Fourthly, embodiments of this application provide a storage medium storing a computer program that, when executed by a processor, implements the three-dimensional modeling method for pipe transition components as described in the first aspect.
[0069] Compared with the prior art, the beneficial effects of the present invention are as follows: A preprocessing method using B-spline transformation and surface refinement is employed to preprocess the two pipes to be connected, ensuring consistent parametric characteristics of the two pipe surfaces; then, a control point mesh v-direction sequence pairing method is used to match the isoparametric lines in the two isoparametric line sets picked from the pipe surfaces, and the positions of the isoparametric lines in one of the isoparametric line sets are adjusted to achieve one-to-one pairing of isoparametric lines in the two isoparametric line sets; next, a preset transition curve algorithm is used to construct transition curves for the paired isoparametric lines to form a transition curve set, which is then fitted using a surface fitting algorithm to obtain a transition surface, achieving a smooth transition between the pipe surfaces before and after; finally, based on the starting and ending sections of the pipe transition component, and combined with the transition surface, a topological stitching algorithm is used to obtain the topological entity of the pipe transition component. In short, the above steps are generated based on the surface continuity constraints between the pipe transition component and the two pipes before and after it. The transition curve is fitted to the side of the pipe component, which can achieve a smooth transition between the two pipes before and after it, and supports curvature continuity at the highest level. Furthermore, the control points of the transition curve can be adjusted according to the dynamic balance factor parameters, so that the style of the transition component can be adjusted as needed. This solves the shortcomings of existing modeling methods for pipe transition components, such as the lack of smoothness at the connection between the two pipes to be connected and the inability to adjust the style of the generated model through parameters. Attached Figure Description
[0070] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0071] Figure 1 This is a simplified diagram illustrating the transition connection of the pipeline.
[0072] Figure 2 This is a flowchart of the three-dimensional modeling method for pipe transition components provided in Embodiment 1 of the present invention;
[0073] Figure 3This is a schematic diagram of the conversion of a pipe surface into a B-spline surface provided in Embodiment 1 of the present invention;
[0074] Figure 4 This is a schematic diagram of the pairing of two curved pipe surfaces in the v-direction provided in Embodiment 1 of the present invention;
[0075] Figure 5 This is a schematic diagram illustrating the curvature continuity of the two pipe surfaces and the transition surface provided in Embodiment 1 of the present invention;
[0076] Figure 6 This is a structural block diagram of a three-dimensional modeling system for pipe transition components provided in Embodiment 2 of the present invention, corresponding to the method in Embodiment 1;
[0077] Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in Embodiment 3 of the present invention.
[0078] Explanation of reference numerals in the attached figures:
[0079] 01-Pipe 1, 02-Pipe 2, 03-Pipe transition fitting;
[0080] 10 - Acquisition module, 11 - Acquisition unit, 12 - First generation unit, 13 - Second generation unit;
[0081] 20 - Preprocessing module, 21 - Conversion unit, 22 - Upgrade unit, 23 - Refinement unit, 24 - Processing unit;
[0082] 30-Pairing module, 31-Sampling unit, 32-Setting unit, 33-Solving unit, 34-Definition unit, 35-Calculation unit, 36-Pairing unit;
[0083] 40 - Building Modules;
[0084] 50-Fitting Module;
[0085] 60 - Topology Module;
[0086] 70-Bus, 71-Processor, 72-Memory, 73-Communication interface. Detailed Implementation
[0087] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0088] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0089] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0090] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0091] Example 1
[0092] Specifically, Figure 1 The diagram shown is a flowchart of a three-dimensional modeling method based on pipe transition components provided in this embodiment.
[0093] like Figure 2 As shown, the 3D modeling method for pipe transition components in this embodiment includes the following steps:
[0094] S101, obtain the pipe surfaces corresponding to the two pipes to be transitioned and connected, as well as the starting and ending sections of the pipe transition piece between the two pipes.
[0095] Specifically, in this embodiment, the pipe transition component 03 is located between the two pipes 01 and 02, and is used to transitionally connect the two pipes. For details, please refer to [reference needed]. Figure 1 The mechanism is illustrated. This embodiment addresses the technical problems in existing technologies regarding the modeling of pipe transition components between two pipes, such as the lack of smoothness at the connection between the two pipes and the inability to adjust the generated model style through parameter adjustments.
[0096] Furthermore, the specific steps of step S101 include:
[0097] S1011, the corresponding pipe surfaces are obtained using 3D software based on the three-dimensional parameters of the two pipes to be transitioned.
[0098] Specifically, in this embodiment, the three-dimensional parameters of the two pipes that need to be connected (in this embodiment, the two pipes are named the starting pipe and the ending pipe) are used to perform three-dimensional modeling in UG software or other three-dimensional modeling software to obtain the starting pipe surface S1 and the ending pipe surface S2.
[0099] S1012, generate the starting section of the pipe transition between the two pipes based on the pipe surface termination profile of one of the pipes.
[0100] Specifically, in this embodiment, the starting cross section of the pipe transition component can be generated based on the termination contour of the starting pipe surface S1. Let the termination contour of the starting pipe surface S1 be W1, and the plane where the termination contour is located be P1. Then the starting cross section is the planar region on the infinite plane P1 enclosed by the closed contour W1. Therefore, the starting cross section is: Ss = f(P1, W1), where f represents the planar boundary constraint.
[0101] S1013, Generate the termination section of the pipe transition between the two pipes based on the pipe surface start profile of the other pipe.
[0102] Specifically, in this embodiment, the termination section of the pipe transition component can be generated based on the initial contour of the terminating pipe S2. For the specific generation mechanism, please refer to the detailed implementation process of step S1012.
[0103] S102, preprocess the two pipe surfaces to ensure that the parametric characteristics of the two pipe surfaces are consistent; wherein, the preprocessing includes B-spline conversion processing and surface refinement processing.
[0104] Specifically, the B-spline transformation process converts the pipe surfaces of the starting and ending pipes into B-spline expressions to obtain the B-spline surfaces of the starting and ending pipes for subsequent unified calculations; the surface refinement process unifies the degree and node vectors in the u-direction of the B-spline surfaces of the starting and ending pipes to ensure that the parametric characteristics of the pipe surfaces of the starting and ending pipes remain consistent.
[0105] Furthermore, the specific steps of step S102 include:
[0106] S1021, The two pipe surfaces are respectively converted into their corresponding B-spline surfaces using the B-spline surface conversion algorithm.
[0107] Specifically, such as Figure 3 As shown, the B-spline surface transformation algorithm is used to express the starting pipe surface S1 and the ending pipe surface S2 using B-spline, resulting in the following:
[0108] BS1 = ConverToBSpline(S1); BS2 = ConverToBSpline(S2); where,
[0109] ConverToBSpline is a B-spline surface transformation algorithm.
[0110] S1022, The u-direction degree of the two B-spline surfaces is unified by a surface order-increasing algorithm; wherein, the u-direction degree is the maximum degree in the u-direction of the two B-spline surfaces.
[0111] Specifically, surface elevation is an important technique in free-form curve surface modeling. Elevation can improve the flexibility of a curve; by increasing the degree of elevation, the number of control vertices can be increased, thus enhancing the degree of freedom in curve control. Simultaneously, surface elevation algorithms facilitate the exchange of product data between different CAD systems. In this embodiment, the B-spline surface elevation algorithm unifies the degree of elevation in the u direction of the starting pipe's B-spline surface BS1 and the ending pipe's B-spline surface BS2 to P. max P max This represents the maximum number of times in the u direction of BS1 and BS2.
[0112] S1023, a curve node refinement algorithm is used to unify the u-direction node vectors of the two B-spline surfaces; wherein, the u-direction node vector is the union of the node vectors in the u direction of the two B-spline surfaces.
[0113] Specifically, B-spline curve node refinement refers to the process of inserting nodes multiple times into the B-spline curve node vector. A node vector is a parameter in the B-spline curve equation expression. In this embodiment, the u-direction node vectors U of BS1 and BS2 are unified using the B-spline curve node refinement algorithm. Let the u-direction node vectors of BS1 and BS2 be U1 and U2 respectively, then the unified u-direction node vector is: U = U1∪U2.
[0114] S1024, based on the unified u-direction degree and the u-direction node vector, ensure that the parametric characteristics of the two pipe surfaces remain consistent.
[0115] Specifically, in this embodiment, the starting pipe surface S1 and the ending pipe surface S2 are expressed as B-spline BS1 and BS2 through the B-spline surface transformation algorithm. Then, the u-direction degree and u-direction node vector of BS1 and BS2 are unified through surface refinement processing to maintain the consistency of the parameter characteristics of the starting pipe surface and the ending pipe surface.
[0116] S103, pick out equal sets of isoparametric lines from the two pipe surfaces respectively, use the control point grid v-direction sequence pairing method to match the isoparametric lines in the two sets of isoparametric lines, and adjust the position of the isoparametric lines in one of the sets of isoparametric lines so that the isoparametric lines in the two sets of isoparametric lines are paired one by one to form paired isoparametric lines.
[0117] Specifically, such as Figure 4 As shown, the curves in the two sets of isoparametric lines can be matched one-to-one. In order to maintain the v-direction continuity of the transition surface, the isoparametric lines in the two sets of isoparametric lines are matched and calculated by the control point sequence pairing method, and one set of isoparametric lines is shifted accordingly to ensure that they can be matched one-to-one according to the sequence number.
[0118] Furthermore, the specific steps of step S103 include:
[0119] S1031, sample n isoparametric lines along the u direction for each of the two pipe surfaces to obtain a set C of isoparametric lines with an equal number of lines. s C e .
[0120] Specifically, n samples are taken from the input starting pipe surface S1 and ending pipe surface S2 along the u direction, where n is the number of control points in the u direction, and the sampling parameters are the u parameters corresponding to the starting control points in the v direction. In this embodiment, let the n isoparametric lines of the starting pipe surface be C. s The isoparametric curves of the n terminating pipe surfaces are C e ,but
[0121] C s ={C s1 C s2 C sn};C e ={C e1 C e2 C en}
[0122] S1032, according to the isoparametric line set C s C e Set the corresponding control point matrix M respectively. s M e ;in,
[0123]
[0124] S1033, Solve for the optimal pairing of control point sequences to determine M. s The i-th row of the sequence {p 0i p 1i , ..., p mi} and M e The j-th row sequence {q0j q 1j , ..., q mj}pair.
[0125] S1034, Define the control point matrix M s M e The objective function ε(M) for optimal pairing of v-direction sequences s M e ,j,b), where j = 1, 2, 3, ..., n+1, and b represents the Boolean identifier.
[0126] Specifically, j is M e In and M s The first row contains the row number of the pairing, and the boolean identifier b indicates whether the pairing of subsequent row numbers is done sequentially or in reverse order.
[0127] S1035, Based on the recursive order of the Boolean identifier b, determine the calculation formula of the objective function, wherein the specific calculation formula is as follows:
[0128] ε(M s M e ,j,b)=Min(D(A,shift(B,j)),D(A,N shift(B,j))),
[0129] In the formula, A = {p} m0 p m1 , ..., p mn}, B={q l0 q l1 , ..., q ln}, where D represents the Euclidean distance between two control point sequences, shift(B,j) represents the j-th sequential shift operation on vector B, and N shift(B,j) represents the j-th reverse shift operation on vector B; if D(A, shift(B,j))≤D(A, N shift(B,j), then b is a sequential recursion, otherwise it is a reverse recursion.
[0130] Specifically, the formula for calculating the Euclidean distance D is as follows:
[0131]
[0132] In the formula, Dist represents the calculation of the distance between three-dimensional points.
[0133] Specifically, taking the B control point sequence as an example, the calculation method for the sequential shift operation is as follows:
[0134] Shift(B, 1) = {q l0 q l1 , ..., q ln}
[0135] Shift(B, 2) = {q l1 q l2 , ..., q ln q l0}
[0136] ...
[0137] Shift(B, n+1) = {q ln q l0 , ..., q ln-2 q ln-1},
[0138] Taking the B control point sequence as an example, the calculation method for the reverse shift operation is as follows:
[0139] NShift(B, 1) = {q l0 q l1, …, q ln}
[0140] NShift(B, 2) = {q ln q l0 , ..., q ln-2 q ln-1}
[0141] ...
[0142] NShift(B, n+1) = {q l1 q l2 , ..., q ln q l0}
[0143] S1036, based on the result of the objective function, pair the isoparametric lines in the two sets of isoparametric lines to form paired isoparametric lines.
[0144] S104, based on different continuity constraints, an appropriate preset transition curve algorithm is adopted to construct transition curves for the paired isoparametric lines to form a set of transition curves.
[0145] The preset transition curve algorithm is one of the following: positional continuity algorithm, tangent continuity algorithm, and curvature continuity algorithm. In this embodiment, the preset transition curve algorithm is specifically a curvature continuity algorithm; this algorithm is based on the consistency of the u-direction node vector and the number of control points to ensure that the u-direction curvature of the transition surface is continuous with that of the initial and final pipe surfaces.
[0146] Specifically, such as Figure 5As shown, curvature continuity, based on tangent continuity, requires that the curvature at the starting point of the transition curve be equal to the curvature at the ending point of the starting isoparametric line, and the curvature at the ending point of the transition curve be equal to the curvature at the starting point of the ending isoparametric line. Let the ending point of the starting isoparametric line be b1 and its tangent vector be t1, and the starting point of the ending isoparametric line be b4 and its tangent vector be t2. Then the transition curve is:
[0147]
[0148] Among them, the calculation method for the four control points P0 = b1, P1 = b2, P4 = b3, and P5 = b4 is the same as that for tangential line continuity. The other two control points P2 and P3 can be calculated based on curvature. {N i,3 (u)} is defined in the node vector 3rd-order B-spline basis functions on;
[0149] For any curve C, the curvature vector at parameter u is:
[0150]
[0151] Where D1(C(u)) represents the first derivative of curve C at parameter u, and D2(C(u)) represents the second derivative of curve C at parameter u;
[0152] Based on the curvature continuity characteristic, the curvature vector at the endpoint of the initial isoparametric line is the same as the curvature vector at the starting point of the transition curve. Since control points P1 and P4 have already been calculated based on the tangent continuity constraint, the first derivative of the endpoint of the initial isoparametric line is equal to the first derivative of the starting point of the transition curve. Therefore, the second derivative of the endpoint of the initial isoparametric line is equal to the second derivative of the starting point of the transition curve. Thus:
[0153]
[0154] Where l1 is the termination parameter of the initial isoparametric line C1, and f3 is the initial parameter of the transition curve C3. Similarly, we can obtain:
[0155]
[0156] Where f2 is the initial parameter of the termination isoparametric line C2; by solving the system of equations, the coordinates of control points P2 and P3 can be obtained.
[0157] S105, A surface fitting algorithm is used to fit the set of transition curves to obtain a transition surface.
[0158] Specifically, according to the set of transition curves C b ={C b1 C b2 C bn}, the fitted transition surface has S = Approx(C b In this algorithm, Approx is a B-spline surface fitting algorithm. During the fitting calculation, the node vectors in the u-direction of the transition surface are consistent with the node vectors of the two input pipe surfaces. Since the transition curve is calculated with curvature continuity, the transition surface and the starting and ending pipe surfaces can achieve curvature continuity in the v-direction. Combined with the consistency of the u-direction node vectors and the consistency of the number of control points, the transition surface and the starting and ending pipe surfaces have continuous curvature in the u-direction. Therefore, the transition surface can achieve the highest curvature continuity.
[0159] S106, Based on the starting section and the ending section, and in conjunction with the transition surface, the topological entity of the pipe transition component is obtained through a topological stitching algorithm.
[0160] Specifically, the starting section of the transition pipe fitting can be generated based on the ending profile of the starting pipe surface, and the ending section of the transition pipe fitting can be generated based on the starting profile of the ending pipe surface. Combined with the fitted transition surface, the topological entity of the pipe transition fitting can be obtained through the topological stitching algorithm.
[0161] In summary, in this embodiment, firstly, a preprocessing method using B-spline transformation and surface refinement is employed to preprocess the two pipes to be connected, ensuring that the parametric characteristics of the two pipe surfaces remain consistent. Secondly, a control point mesh v-direction sequence pairing method is used to match the isoparametric lines in the two isoparametric line sets picked from the pipe surfaces, and the positions of the isoparametric lines in one of the isoparametric line sets are adjusted to achieve one-to-one pairing of isoparametric lines in the two isoparametric line sets. Thirdly, a preset transition curve algorithm is used to construct transition curves for the paired isoparametric lines to form a transition curve set, which is then fitted using a surface fitting algorithm to obtain a transition surface, achieving a smooth transition between the pipe surfaces before and after. Finally, based on the starting and ending sections of the pipe transition component, and combined with the transition surface, a topological stitching algorithm is used to obtain the topological entity of the pipe transition component. This addresses the shortcomings of existing modeling methods for pipe transition components, such as the lack of smoothness at the connection between the two pipes to be connected and the inability to adjust the generated model style through parameters.
[0162] Example 2
[0163] This embodiment provides a structural block diagram of a system corresponding to the method described in Embodiment 1. Figure 6 This is a structural block diagram of the 3D modeling system for pipe transition components according to this embodiment, such as... Figure 6 As shown, the system includes:
[0164] The acquisition module 10 is used to acquire the pipe surfaces corresponding to the two pipes to be connected by transition, as well as the starting and ending sections of the pipe transition piece between the two pipes.
[0165] The preprocessing module 20 is used to preprocess the two pipe surfaces to ensure that the parametric characteristics of the two pipe surfaces are consistent; wherein, the preprocessing includes B-spline transformation processing and surface refinement processing;
[0166] The pairing module 30 is used to pick up equal sets of isoparametric lines from the two pipe surfaces respectively, and use the control point grid v-direction sequence pairing method to match the isoparametric lines in the two sets of isoparametric lines, and adjust the position of the isoparametric lines in one of the sets of isoparametric lines so that the isoparametric lines in the two sets of isoparametric lines are paired one by one to form paired isoparametric lines.
[0167] The construction module 40 is used to construct transition curves for the paired isoparametric lines by adopting a corresponding preset transition curve algorithm based on different continuity constraints to form a set of transition curves.
[0168] The fitting module 50 is used to perform fitting processing on the set of transition curves using a surface fitting algorithm to obtain a transition surface;
[0169] Topology module 60 is used to obtain the topological entity of the pipe transition component through a topology stitching algorithm based on the starting section and the ending section and in combination with the transition surface.
[0170] Furthermore, the acquisition module 10 includes:
[0171] The acquisition unit 11 is used to acquire the corresponding pipe surface through 3D software based on the 3D parameters of the two pipes to be connected.
[0172] The first generation unit 12 is used to generate the starting section of the pipe transition between the two pipes based on the pipe surface termination profile of one of the pipes.
[0173] The second generation unit 13 is used to generate the termination section of the pipe transition piece between the two pipes based on the pipe surface start profile of the other pipe.
[0174] Furthermore, the preprocessing module 20 includes:
[0175] The conversion unit 21 is used to convert the two pipe surfaces into their corresponding B-spline surfaces using the B-spline surface conversion algorithm.
[0176] The order-increasing unit 22 is used to unify the u-direction degree of the two B-spline surfaces using a surface order-increasing algorithm; wherein the u-direction degree is the maximum degree in the u-direction of the two B-spline surfaces;
[0177] The refinement unit 23 is used to unify the u-direction node vectors of the two B-spline surfaces using a curve node refinement algorithm; wherein the u-direction node vector is the union of the node vectors in the u direction of the two B-spline surfaces;
[0178] Processing unit 24 is used to ensure that the parametric characteristics of the two pipe surfaces remain consistent based on the unified u-direction number and the u-direction node vector.
[0179] Furthermore, the pairing module 30 includes:
[0180] Sampling unit 31 is used to sample n isoparametric lines along the u direction for the two pipe surfaces respectively, so as to obtain a set C of isoparametric lines with an equal number of lines. s C e ;
[0181] Setting unit 32 is used to set the isoparametric lines C according to the isoparametric line set C. s C e Set the corresponding control point matrix M respectively. s M e ;in,
[0182]
[0183] Solver 33 is used to solve for the optimal pairing of control point sequences to determine M. s The i-th row of the sequence {p 0i p i1 , ..., p mi} and M e The j-th row sequence {q 0j q 1j , ..., q mj}pair;
[0184] Definition unit 34 is used to define the control point matrix M. s M e The objective function ε(M) for optimal pairing of v-direction sequences s M e ,j,b), where j = 1, 2, 3, ..., n+1, and b represents a Boolean identifier;
[0185] Calculation unit 35 is used to determine the calculation formula of the objective function according to the recursive order of the Boolean identifier b, wherein the calculation formula is specifically as follows:
[0186] ε(M s M e ,j,b)=Min(D(A,shift(B,j)),D(A,N shift(B,j))),
[0187] In the formula, A = {p}m0 p m1 , ..., p mn}, B={q l0 q l1 , ..., q ln}, where D represents the Euclidean distance between two control point sequences, shift(B,j) represents the j-th sequential shift operation on vector B, and N shift(B,j) represents the j-th reverse shift operation on vector B; if D(A, shift(B,j))≤D(A, N shift(B,j), then b is a sequential recursion, otherwise it is a reverse recursion.
[0188] The pairing unit 36 is used to pair the isoparametric lines in the two sets of isoparametric lines to form paired isoparametric lines based on the result of the objective function.
[0189] The formula for calculating the Euclidean distance D is as follows:
[0190]
[0191] In the formula, Dist represents the calculation of the distance between three-dimensional points.
[0192] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0193] Example 3
[0194] Combination Figure 2 The described 3D modeling method for pipe transition components can be implemented using electronic devices. Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to this embodiment.
[0195] The electronic device may include a processor 71 and a memory 72 storing computer program instructions.
[0196] Specifically, the processor 71 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0197] The memory 72 may include a mass storage device for data or instructions. For example, and not limitingly, the memory 72 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 72 may include removable or non-removable (or fixed) media. Where appropriate, the memory 72 may be internal or external to a data processing device. In a particular embodiment, the memory 72 is non-volatile memory. In a particular embodiment, the memory 72 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0198] The memory 72 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 71.
[0199] The processor 71 reads and executes the computer program instructions stored in the memory 72 to implement the three-dimensional modeling method for the pipe transition component described in Embodiment 1 above.
[0200] In some embodiments, the electronic device may further include a communication interface 73 and a bus 70. For example, Figure 7 As shown, the processor 71, memory 72, and communication interface 73 are connected through bus 70 and complete communication with each other.
[0201] The communication interface 73 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of this application. The communication interface 73 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0202] Bus 70 includes hardware, software, or both, that couples components of a device together. Bus 70 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 70 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 70 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0203] The electronic device can acquire the 3D modeling system for pipe transition components and execute the 3D modeling method for pipe transition components in Embodiment 1.
[0204] Furthermore, in conjunction with the three-dimensional modeling method for pipe transition components in Embodiment 1 above, this application embodiment can provide a storage medium for implementation. This storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement the three-dimensional modeling method for pipe transition components in Embodiment 1 above.
[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0206] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A three-dimensional modeling method for pipe transition components, characterized in that, include: Obtain the pipe surfaces corresponding to the two pipes to be connected, as well as the starting and ending sections of the pipe transition piece between the two pipes; The two pipe surfaces are preprocessed to ensure that their parametric characteristics remain consistent; the preprocessing includes B-spline transformation and surface refinement. Pick an equal number of isoparametric lines from the two pipe surfaces respectively, and use the control point grid v-direction sequence pairing method to match the isoparametric lines in the two isoparametric line sets. Adjust the position of the isoparametric lines in one of the isoparametric line sets so that the isoparametric lines in the two isoparametric line sets are paired one by one to form paired isoparametric lines. Based on different continuity constraints, corresponding preset transition curve algorithms are adopted to construct transition curves for the paired isoparametric lines to form a set of transition curves; A surface fitting algorithm is used to fit the set of transition curves to obtain the transition surface; Based on the starting section and the ending section, and in conjunction with the transition surface, the topological entity of the pipe transition component is obtained through a topological stitching algorithm; The step of picking an equal number of isoparametric line sets from the two pipe surfaces, matching the isoparametric lines in the two isoparametric line sets using the control point grid v-direction sequence pairing method, and adjusting the position of the isoparametric lines in one of the isoparametric line sets so that the isoparametric lines in the two isoparametric line sets are paired one-to-one to form paired isoparametric lines specifically includes: Sample n isoparametric lines along the u direction for each of the two pipe surfaces to obtain a set C of equal numbers of isoparametric lines. s C e ; According to the isoparametric set C s C e Set the corresponding control point matrix M respectively. s M e ;in, 、 ; Solving for the optimal pairing of control point sequences to determine M s The i-th row sequence With M e The j-th row sequence pair; Define the control point matrix M s M e The objective function ε(M) for optimal pairing of v-direction sequences s M e (j, b), where j = 1, 2, 3, ..., n+1, and b represents a Boolean identifier; Based on the recursive order of the Boolean identifier b, the calculation formula for the objective function is determined, wherein the specific calculation formula is as follows: ε(M s ,M e ,j,b)=Min(D(A,shift(B,j)),D(A,N shift(B,j))), In the formula, A = B= D represents the Euclidean distance between two control point sequences, shift(B,j) represents the j-th sequential shift operation of vector B, and N shift(B,j) represents the j-th reverse shift operation of vector B; if D(A, shift(B,j))≤D(A,N shift(B,j), then b is a sequential recursion, otherwise it is a reverse recursion. Based on the result of the objective function, the isoparametric lines in the two sets of isoparametric lines are paired one-to-one to form paired isoparametric lines.
2. The three-dimensional modeling method for pipe transition components according to claim 1, characterized in that, The specific steps for obtaining the pipe surfaces corresponding to the two pipes to be transitioned and connected, as well as the starting and ending cross-sections of the pipe transition piece between the two pipes, include: The three-dimensional parameters of the two pipes to be transitioned are used to obtain the corresponding pipe surfaces using three-dimensional software. The starting section of the pipe transition piece between the two pipes is generated based on the pipe surface termination profile of one of the pipes. The termination section of the pipe transition between the two pipes is generated based on the initial profile of the pipe surface of the other pipe.
3. The three-dimensional modeling method for pipe transition components according to claim 1, characterized in that, The step of preprocessing the two pipe surfaces to ensure that their parametric characteristics remain consistent includes the following steps: B-spline transformation and surface refinement. The two pipe surfaces are respectively converted into their corresponding B-spline surfaces using the B-spline surface conversion algorithm; A surface order-increasing algorithm is used to unify the u-direction order of the two B-spline surfaces; wherein, the u-direction order is the maximum order in the u-direction of the two B-spline surfaces; A curve node refinement algorithm is used to unify the u-direction node vectors of the two B-spline surfaces; wherein, the u-direction node vector is the union of the node vectors in the u direction of the two B-spline surfaces; The consistent u-axis degree and u-axis node vector are used to ensure that the parametric properties of the two pipe surfaces remain consistent.
4. The three-dimensional modeling method for pipe transition components according to claim 3, characterized in that, The formula for calculating the Euclidean distance D is: , In the formula, Dist represents the calculation of the distance between three-dimensional points.
5. The three-dimensional modeling method for pipe transition components according to claim 1, characterized in that, The preset transition curve algorithm is one of the following: positional continuity algorithm, tangent continuity algorithm, and curvature continuity algorithm.
6. The three-dimensional modeling method for pipe transition components according to claim 5, characterized in that, The preset transition curve algorithm is specifically a curvature continuity algorithm; based on the consistency of the u-direction node vector and the number of control points, the u-direction curvature of the transition surface is made continuous with that of the two pipe surfaces.
7. A three-dimensional modeling system for pipe transition components, characterized in that, include: The acquisition module is used to acquire the pipe surfaces corresponding to the two pipes to be connected, as well as the starting and ending sections of the pipe transition piece between the two pipes. A preprocessing module is used to preprocess the two pipe surfaces to ensure that the parametric characteristics of the two pipe surfaces are consistent; wherein, the preprocessing includes B-spline transformation processing and surface refinement processing; The pairing module is used to pick up an equal number of isoparametric line sets from the two pipe surfaces, and use the control point grid v-direction sequence pairing method to match the isoparametric lines in the two isoparametric line sets. It also adjusts the position of the isoparametric lines in one of the isoparametric line sets so that the isoparametric lines in the two isoparametric line sets are paired one by one to form paired isoparametric lines. A construction module is used to construct transition curves for the paired isoparametric lines by adopting appropriate preset transition curve algorithms based on different continuity constraints, thereby forming a set of transition curves. The fitting module is used to perform fitting processing on the set of transition curves using a surface fitting algorithm to obtain a transition surface; The topology module is used to obtain the topological entity of the pipe transition component through a topology stitching algorithm based on the starting section and the ending section, and in combination with the transition surface; The pairing module includes: The sampling unit is used to sample n isoparametric lines along the u direction for each of the two pipe surfaces, so as to obtain a set C of isoparametric lines with an equal number of lines. s C e ; The setting unit is used to set the isoparametric lines C according to the given set of isoparametric lines. s C e Set the corresponding control point matrix M respectively. s M e ;in, 、 ; Solving unit, used to solve for the optimal pairing of control point sequences to determine M s The i-th row sequence With M e The j-th row sequence pair; Define unit, used to define the control point matrix M s M e The objective function ε(M) for optimal pairing of v-direction sequences s M e (j, b), where j = 1, 2, 3, ..., n+1, and b represents a Boolean identifier; The calculation unit is used to determine the calculation formula of the objective function according to the recursive order of the Boolean identifier b, wherein the calculation formula is specifically as follows: ε(M s ,M e ,j,b)=Min(D(A,shift(B,j)),D(A,N shift(B,j))), In the formula, A = B= D represents the Euclidean distance between two control point sequences, shift(B,j) represents the j-th sequential shift operation of vector B, and N shift(B,j) represents the j-th reverse shift operation of vector B; if D(A, shift(B,j))≤D(A,N shift(B,j), then b is a sequential recursion, otherwise it is a reverse recursion. The pairing unit is used to pair isoparametric lines in the two sets of isoparametric lines to form paired isoparametric lines based on the result of the objective function.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the three-dimensional modeling method for pipe transition components as described in any one of claims 1 to 6.
9. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the three-dimensional modeling method for pipe transition components as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Aircraft air inlet curved surface transition generation method and device
CN115437309A
Seam modification for 3D CAD models
US20160004790A1