CN113591356B - Construction method of non-uniform irregular spline basis function retaining sharp features - Google Patents
Construction method of non-uniform irregular spline basis function retaining sharp features Download PDFInfo
- Publication number
- CN113591356B CN113591356B CN202110911630.4A CN202110911630A CN113591356B CN 113591356 B CN113591356 B CN 113591356B CN 202110911630 A CN202110911630 A CN 202110911630A CN 113591356 B CN113591356 B CN 113591356B
- Authority
- CN
- China
- Prior art keywords
- control points
- points
- edge
- singular
- define
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/23—Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/04—Constraint-based CAD
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Image Generation (AREA)
- Numerical Control (AREA)
Abstract
本说明书实施例公开了一种保留尖锐特征的非均匀不规则样条基函数的构造方法,包括:步骤S1、根据待加工曲面形状;步骤S2、基于所述四边形控制网格,使用Bezier曲面方法提取定义最初的C0基函数;步骤S3、计算切平面;步骤S4、计算连接函数;步骤S5、局部分步优化;S51、优化顶点控制点;S52、优化边控制点;S53、优化面控制点;分步求解时求解一个带线性等式约束的最小二乘问题,即:s.t.MP=b将所述最小二乘问题转化为线性方程组的求解问题:本发明提出一种样条基函数的构造方法,使得生成的样条具有在任意拓扑的控制网格上生成全局G1连续的曲面。
The embodiment of this specification discloses a method of constructing a non-uniform irregular spline basis function that retains sharp features, including: step S1, according to the shape of the surface to be processed; step S2, based on the quadrilateral control grid, using the Bezier surface method Extract and define the initial C0 basis function; Step S3, calculate the tangent plane; Step S4, calculate the connection function; Step S5, local step-by-step optimization; S51, optimize the vertex control points; S52, optimize the edge control points; S53, optimize the surface control points ; Solve a least squares problem with linear equality constraints during step-by-step solution, that is: stMP=b transforms the least squares problem into a problem of solving a system of linear equations: The present invention proposes a construction method of a spline basis function, so that the generated spline can generate a global G1 continuous surface on a control grid of any topology.
Description
技术领域Technical field
本申请涉及数控加工技术领域,尤其涉及一种保留尖锐特征的非均匀不规则样条基函数的构造方法。The present application relates to the technical field of numerical control machining, and in particular to a method of constructing a non-uniform irregular spline basis function that retains sharp features.
背景技术Background technique
Catmull-Clark曲面在动画领域被广泛使用,而CAD工业设计上NURBS占主导地位。每种曲面格式有自己独特的优势:Catmull-Clark曲面可以在任意拓扑的控制网上生成光滑的曲面,这对动画设计来说很有优势。而NURBS曲面可以实现局部修改,更适合用于高精度的工业模型。因此人们发展了很多组曲面表达形式,这些曲面通过赋予控制网格边结点距来修改曲面形状。如果不存在奇异点,这些曲面与NURBS曲面表达一致;如果所有结点距都为1,则曲面为Catmull-Clark曲面。Catmull-Clark surfaces are widely used in the field of animation, while NURBS dominates CAD industrial design. Each surface format has its own unique advantages: Catmull-Clark surfaces can generate smooth surfaces on control networks of any topology, which is very advantageous for animation design. NURBS surfaces can be modified locally and are more suitable for high-precision industrial models. Therefore, people have developed many sets of surface expression forms, which modify the surface shape by assigning control mesh edge node distances. If there are no singular points, these surfaces are consistent with NURBS surface expressions; if all node distances are 1, the surfaces are Catmull-Clark surfaces.
细分方案适用于渲染应用,但不适合CAD设计。因为CAD设计分析流程通常需要在众多软件包之间传递模型,而且这些软件大多数是基于NURBS的。可是细分方法与NURBS并不向后兼容,因为在奇异点附件,细分方法产生了无限序列的双三次曲面,而NURBS只能导入有限截断。基于补洞的方法避免了这个兼容问题,该方法用少量补丁替换了奇异点附近的无限序列。虽然之前的都是针对传统Catmull-Clark表面,也就是结点距比例为1,但修改这些方法来处理非均匀结点距是很简单的。然而,修改后得到的曲面在结点距比例大于3的奇异点附近表现出与细分结果相同的问题。The subdivision scheme is suitable for rendering applications, but not for CAD design. Because the CAD design analysis process usually requires transferring models between numerous software packages, and most of these software are based on NURBS. However, the subdivision method is not backward compatible with NURBS because near the singular point, the subdivision method produces an infinite sequence of bicubic surfaces, while NURBS can only import finite truncation. This compatibility issue is avoided by hole-patch-based methods, which replace infinite sequences near singular points with a small number of patches. Although the previous methods are all for traditional Catmull-Clark surfaces, that is, the node distance ratio is 1, it is very simple to modify these methods to handle non-uniform node distances. However, the modified surface exhibits the same problem as the subdivision result near singular points with a node distance ratio greater than 3.
等几何分析法IGA是一种新兴的曲面分析技术,它具有直接在样条模型上分析的能力,与有限元方法相比有很高的精度。但由于通常的NURBS基函数是有理多项式,保持张量性质,边界交并问题很难解决。Isogeometric analysis method IGA is an emerging surface analysis technology. It has the ability to analyze directly on spline models and has high accuracy compared with the finite element method. However, since the usual NURBS basis functions are rational polynomials and maintain tensor properties, the boundary intersection problem is difficult to solve.
需要一种样条的生成方法,使得生成的样条具有在任意拓扑的控制网格上生成全局G1连续的曲面。A spline generation method is needed so that the generated spline can generate a global G1 continuous surface on the control grid of any topology.
发明内容Contents of the invention
本说明书实施例提供一种保留尖锐特征的非均匀不规则样条基函数的构造方法,以使得生成的样条具有在任意拓扑的控制网格上生成全局G1连续的曲面。The embodiments of this specification provide a method of constructing a non-uniform irregular spline basis function that retains sharp features, so that the generated spline has the ability to generate a globally G1 continuous surface on a control grid of any topology.
为解决上述技术问题,本说明书实施例是这样实现的:本说明书实施例提供一种保留尖锐特征的非均匀不规则样条基函数的构造方法,包括:In order to solve the above technical problems, the embodiments of this specification are implemented as follows: The embodiments of this specification provide a method for constructing non-uniform irregular spline basis functions that retain sharp features, including:
步骤S1、根据待加工曲面形状,输入具有任意拓扑的四边形控制网格;Step S1: According to the shape of the surface to be processed, input a quadrilateral control mesh with arbitrary topology;
步骤S2、基于所述四边形控制网格,使用Bezier曲面方法提取定义最初的C0基函数,所述四边形控制网格的每个面均使用双三次Bezier曲面进行表示;对于所述四边形控制网格的每个面上的面点Fi,用所述每个面上的四个控制点Pi的线性组合进行表示;所述四边形控制网格的边点Ei与顶点V是所述面点Fi的线性组合;Step S2: Based on the quadrilateral control grid, use the Bezier surface method to extract and define the initial C0 basis function. Each surface of the quadrilateral control grid is represented by a bicubic Bezier surface; for the quadrilateral control grid The surface point F i on each surface is represented by a linear combination of the four control points Pi on each surface; the edge point E i and the vertex V of the quadrilateral control grid are the surface points F Linear combination of i ;
步骤S3、计算切平面;Step S3: Calculate the tangent plane;
对度数为n的奇异点,所述奇异点临近的控制点为Ei,Fi,节点距长度为di,ai;For a singular point with degree n, the control points adjacent to the singular point are E i , F i , and the node distance length is di , a i ;
计算新的控制点令P=[V,E0,…,En-1,F0,…,Fn-1]T,/> 将细分规则写为/> Calculate new control points Let P=[V,E 0 ,…,E n-1 ,F 0 ,…,F n-1 ] T ,/> Write the segmentation rule as/>
定义NURSS格式细分矩阵为M,基于Eigen-polyhedron的细分矩阵为N;Define the NURSS format subdivision matrix as M, and the Eigen-polyhedron-based subdivision matrix as N;
定义奇异点周围一圈Bezier控制点为是点V,{Ei},{Fi}的线性组合:Define a circle of Bezier control points around the singular point as It is the linear combination of point V, {E i }, {F i }:
步骤S31、计算基于Eigen-polyhedron细分的极限点C;Step S31: Calculate the limit point C based on Eigen-polyhedron subdivision;
用L0表示矩阵N特征值为1对应的特征向量的单位化,极限点定义为C=L0MTP;Use L 0 to represent the unitization of the eigenvector corresponding to the eigenvalue of matrix N being 1, and the limit point is defined as C=L 0 M T P;
步骤S32、计算基于Eigen-polyhedron细分的切平面;Step S32: Calculate the tangent plane based on Eigen-polyhedron subdivision;
定义两个大小为2nx2n的矩阵 令/> λ是矩阵/>的主特征值,则/>写成/> Λ是由奇异值构成的对角矩阵;假设i1,i2是使得Λ(i1,i1)=Λ(i2,i2)=λ的指标,令/>为除了/>其他位置为零的对角矩阵,这样得到/>进而定义向量集合/> Define two matrices of size 2nx2n Order/> λ is the matrix/> The main eigenvalues of , then/> Written as/> Λ is a diagonal matrix composed of singular values; assume that i 1 and i 2 are indicators such that Λ(i 1 ,i 1 )=Λ(i 2 ,i 2 )=λ, let/> In addition to/> A diagonal matrix with zeros in other positions is obtained/> Then define the vector set/>
步骤S33、定义奇异点周围的Bezier控制点;Step S33: Define Bezier control points around the singular point;
奇异点周围Bezier控制点 Bezier control points around singular points
步骤S4、计算连接函数;Step S4: Calculate the connection function;
S41、对度数为n的奇异点,每个角定义权重ki:S41. For a singular point with degree n, define a weight k i for each corner:
S42、根据权重定义角度;S42. Define the angle according to the weight;
对θi求和,如果求和结果不等于2π,对角度归一化到2π;Sum θ i . If the summation result is not equal to 2π, normalize the angle to 2π;
定义(i,j)=sin(θi)sin(θi+2)…sin(thetaj)(i<j);Definition (i,j)=sin(θ i )sin(θ i+2 )…sin(theta j )(i<j);
若n=2k+1为奇数:If n=2k+1 is an odd number:
若n=2k为偶数:If n=2k is an even number:
假设集合S是n个数字的集合,令/>是集合中出现次数最多的值,如果每个数字仅出现一次,则令/> Suppose the set S is n numbers The set of , let/> is the value that occurs most often in the set. If each number appears only once, then let/>
步骤S5、局部分步优化;Step S5, local step-by-step optimization;
将每条边上的约束条件分为两部分,前两个方程成为顶点约束,剩下的称为边约束;按如下顺序求解新的基函数;Divide the constraints on each edge into two parts, the first two equations become vertex constraints, and the rest are called edge constraints; solve the new basis function in the following order;
S51、优化顶点控制点;S51. Optimize vertex control points;
每个度数为n的奇异点顶点约束包含3n+1个控制点,2n个线性约束方程,先求解得到满足顶点约束的3n+1个控制点;Each singular point vertex constraint with degree n contains 3n+1 control points and 2n linear constraint equations. First, solve to obtain 3n+1 control points that satisfy the vertex constraints;
S52、优化边控制点;S52. Optimize edge control points;
在顶点控制点被确定后,剩下的边约束设计的控制点被控制在每条边上,都变为了局部问题,这是求解每条边上满足边约束的控制点;After the vertex control points are determined, the remaining control points of the edge constraint design are controlled on each edge, which becomes a local problem. This is to solve the control points on each edge that satisfy the edge constraints;
S53、优化面控制点;S53. Optimize surface control points;
分步求解时求解一个带线性等式约束的最小二乘问题,即:Solve a least squares problem with linear equality constraints during step-by-step solution, that is:
s.t.MP=bs.t.MP=b
将所述最小二乘问题转化为线性方程组的求解问题:Convert the least squares problem into a problem of solving a system of linear equations:
S54、根据步骤S53求解得到的结果对所述待加工曲面形状进行设计。S54. Design the shape of the curved surface to be processed based on the results obtained in step S53.
本说明书一个实施例实现了能够达到以下有益效果:One embodiment of this specification achieves the following beneficial effects:
本发明提出一种样条基函数的构造方法,使得生成的样条具有在任意拓扑的控制网格上生成全局G1连续的曲面,进而可直接用于CAD设计与CAE分析,从而加速加工设计分析一体化流程。The present invention proposes a construction method of spline basis function, so that the generated spline can generate a global G1 continuous surface on the control grid of any topology, and can be directly used for CAD design and CAE analysis, thereby accelerating processing design analysis. Integrated process.
附图说明Description of the drawings
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of this specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some of the embodiments recorded in this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting any creative effort.
图1是本说明书实施例中对控制网格进行解释说明的示意图;Figure 1 is a schematic diagram explaining the control grid in the embodiment of this specification;
图2是本说明书实施例中对边点和顶点进行解释说明的示意图;Figure 2 is a schematic diagram explaining edge points and vertices in the embodiment of this specification;
图3是本说明书实施例中对面点进行解释说明的示意图;Figure 3 is a schematic diagram for explaining points in the embodiment of this specification;
图4是本说明书实施例中对NURSS细分格式进行解释说明的示意图;Figure 4 is a schematic diagram explaining the NURSS subdivision format in the embodiment of this specification;
图5是本说明书实施例中对切平面进行解释说明的示意图;Figure 5 is a schematic diagram explaining the tangent plane in the embodiment of this specification;
图6是本说明书实施例中对奇异点附近定义角度进行解释说明的示意图;Figure 6 is a schematic diagram illustrating the definition of angles near singular points in the embodiment of this specification;
图7是本说明书实施例对将奇异面升阶到双五次Bezier曲面来满足G1连续性条件进行解释说明的示意图;Figure 7 is a schematic diagram illustrating an embodiment of this specification for upgrading a singular surface to a biquintic Bezier surface to satisfy the G1 continuity condition;
图8是本说明书实施例技术方案中在奇异点孤立情况下进行解释说明的示意图;Figure 8 is a schematic diagram illustrating the case of isolated singular points in the technical solution of the embodiment of this specification;
图9是本说明书实施例的试验结果的第一种图;Figure 9 is the first graph of the test results of the embodiment of this specification;
图10是本说明书实施例的试验结果的第二种图;Figure 10 is a second graph of the test results of the embodiment of this specification;
图11是本说明书实施例的试验结果的第三种图;Figure 11 is the third graph of the test results of the embodiment of this specification;
图12是本说明书实施例的试验结果的第四种图。Figure 12 is a fourth graph of the test results of the embodiment of this specification.
具体实施方式Detailed ways
为使本说明书一个或多个实施例的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本说明书一个或多个实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本说明书一个或多个实施例保护的范围。In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification more clear, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments of this specification and the corresponding drawings. . Obviously, the described embodiments are only some of the embodiments of this specification, but not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of one or more embodiments of this specification.
Catmull-Clark曲面在动画领域被广泛使用,而CAD工业设计上NURBS占主导地位。每种曲面格式有自己独特是优势:Catmull-Clark曲面可以在任意拓扑的控制网上生成光滑的曲面,这对动画设计来说很有优势。而NURBS曲面可以实现局部修改,更适合用于高精度的工业模型。因此人们发展了很多组曲面表达形式,这些曲面通过赋予控制网格边结点距来修改曲面形状。如果不存在奇异点,这些曲面与NURBS曲面表达一致;如果所有结点距都为1,则曲面为Catmull-Clark曲面。Catmull-Clark surfaces are widely used in the field of animation, while NURBS dominates CAD industrial design. Each surface format has its own unique advantages: Catmull-Clark surfaces can generate smooth surfaces on any topological control network, which is very advantageous for animation design. NURBS surfaces can be modified locally and are more suitable for high-precision industrial models. Therefore, people have developed many sets of surface expression forms, which modify the surface shape by assigning control mesh edge node distances. If there are no singular points, these surfaces are consistent with NURBS surface expressions; if all node distances are 1, the surfaces are Catmull-Clark surfaces.
定义结点距比例为每个奇异点相连边的最大结点距比最小结点距。解决了一个在所有已发表的生成支持任意结点距的Catmull-Clark曲面都会出现的问题。这个问题首先出现在非均匀Catmull-Clark曲面和NURCCs,当奇异点的结点距比例增大时,此奇异点附近的曲面质量会下降。Cashman等人沿一个方向加细直到结点距比例小于2,之后通过双向加细得到曲面。拓展细分曲面强制所有奇异点的结点距比例为1,在简单的情况下取得了良好的效果,但其他情况下无法得到较好的结果。The node distance ratio is defined as the maximum node distance ratio of the minimum node distance of the edges connected to each singular point. Resolved a problem that occurred with all published Catmull-Clark surfaces that support arbitrary node spacing. This problem first appears in non-uniform Catmull-Clark surfaces and NURCCs. When the node distance ratio of a singular point increases, the quality of the surface near the singular point will decrease. Cashman et al. thinned in one direction until the node distance ratio was less than 2, and then obtained a curved surface by thinning in both directions. The extended subdivision surface forces the node distance ratio of all singular points to be 1, which achieves good results in simple cases, but cannot obtain better results in other cases.
细分方案适用于渲染应用,但不适合CAD设计。因为CAD设计分析流程通常需要在众多软件包之间传递模型,而且这些软件大多数是基于NURBS的。可是细分方法与NURBS并不向后兼容,因为在奇异点附近,细分方法产生了无限序列的双三次曲面,而NURBS只能导入有限截断。基于补洞的方法避免了这个兼容问题,该方法用少量补丁替换了奇异点附近的无限序列。虽然之前的方法都是针对传统Catmull-Clark表面,也就是结点距比例为1,但修改这些方法来处理非均匀结点距是很简单的。然而,修改后得到的曲面在结点距比例大于3的奇异点附近表现出与细分结果相同的问题。The subdivision scheme is suitable for rendering applications, but not for CAD design. Because the CAD design analysis process usually requires transferring models between numerous software packages, and most of these software are based on NURBS. However, the subdivision method is not backward compatible with NURBS because near the singular point, the subdivision method produces an infinite sequence of bicubic surfaces, while NURBS can only import finite truncation. This compatibility issue is avoided by hole-patch-based methods, which replace infinite sequences near singular points with a small number of patches. Although the previous methods are all for traditional Catmull-Clark surfaces, that is, the node distance ratio is 1, it is very simple to modify these methods to deal with non-uniform node distances. However, the modified surface exhibits the same problem as the subdivision result near singular points with a node distance ratio greater than 3.
等几何分析发IGA是一种新兴的曲面分析技术,它具有直接在样条模型上分析的能力,与有限元方法相比有跟高的精度。但由于通常的NURBS基函数是有理多项式,保持张量性质,边界交并问题很难解决。提出的样条具有在任意拓扑的控制网格上生成全局G1连续的曲面,可以直接用于CAD设计与CAE分析,加速了加工设计分析一体化流程。Isogeometric analysis IGA is an emerging surface analysis technology. It has the ability to analyze directly on spline models and has higher accuracy than the finite element method. However, since the usual NURBS basis functions are rational polynomials and maintain tensor properties, the boundary intersection problem is difficult to solve. The proposed spline has the ability to generate a global G1 continuous surface on the control grid of any topology, which can be directly used in CAD design and CAE analysis, speeding up the integrated process of machining design and analysis.
本发明实施例技术方案提出了一个框架用于在具有大结点距比例的奇异点附近产生可接受的表面。框架是基于补洞方法的,所以它与NURBS前后兼容。可以直接应用在当前CAD软件中,并且无损失的在各种CAD分析设计软件包之间传递,可以直接支持等几何分析方法,将CAD设计与CAE分析连接起来。The technical solution of the embodiment of the present invention proposes a framework for generating acceptable surfaces near singular points with a large node distance ratio. The framework is based on the hole-filling method, so it is backward and forward compatible with NURBS. It can be directly applied in current CAD software and transferred between various CAD analysis and design software packages without loss. It can directly support isogeometric analysis methods and connect CAD design and CAE analysis.
下面先对本发明实施例技术方案的技术思想进行说明。The technical ideas of the technical solutions of the embodiments of the present invention will be described below.
本发明实施例技术方案的输入是一个具有任意拓扑的四边形控制网格,其中奇异点可以在除边界之外任意位置,奇异点支持任意度数并且奇异点之间可以直接相连。的方法允许非均匀的控制网,节点长度可以不相等,同时支持指定任意的边,包括穿过奇异点的边为连续或不连续的折痕。The input of the technical solution of the embodiment of the present invention is a quadrilateral control mesh with arbitrary topology, in which singular points can be at any position except the boundary, singular points support any degree and singular points can be directly connected. The method allows for non-uniform control networks, node lengths can be unequal, and supports specifying arbitrary edges, including edges that pass through singular points as continuous or discontinuous creases.
输出output
算法输出是一个多项式参数曲面,在正常区域曲面为C2连续,在奇异边上为G1连续。曲面在非均匀情况下保持良好的造型能力并且可以沿着指定的尖锐边生成折痕。The output of the algorithm is a polynomial parameter surface, which is C2 continuous in the normal region and G1 continuous on the singular edges. Surfaces maintain good shaping capabilities in non-uniform situations and can create creases along specified sharp edges.
下面对本发明实施例技术方案进行详细说明。The technical solutions of the embodiments of the present invention will be described in detail below.
总的流程Overall process
使用并推广Bezier提取算法,在规则区域得到与B样条定义一致的曲面。在奇异点附近定义了一个公共切平面。然后根据奇异点周围的节点距定义每条奇异边上G1连续的连接函数。最后局部分布的求解带约束的优化问题,计算得到满足G1约束性的基函数,得到最终曲面。Use and promote the Bezier extraction algorithm to obtain a surface consistent with the B-spline definition in the regular area. A common tangent plane is defined near the singular point. Then the G1 continuous connection function on each singular edge is defined according to the node distance around the singular point. Finally, the local distribution solves the constrained optimization problem, calculates the basis function that satisfies the G1 constraint, and obtains the final surface.
(1)Bezier提取(1)Bezier extraction
如图1所示,使用Bezier提取定义最初的C0基函数,控制网格的每个面都使用双三次Bezier曲面表示。As shown in Figure 1, Bezier extraction is used to define the initial C0 basis function, and each surface of the control mesh is represented by a bicubic Bezier surface.
如图2所示,对每个面上面点Fi计算:As shown in Figure 2, calculate the point F i on each surface:
F2i+j=(1-αi)[1-γj)P0,0+γjP0,1]+αi[(1-γj)P1,0+γjP1,1]F 2i+j = (1-α i )[1-γ j )P 0,0 +γ j P 0,1 ]+α i [(1-γ j )P 1,0 +γ j P 1,1 ]
其中in
如图3所示,对每个边点Ei与顶点V计算:As shown in Figure 3, calculate for each edge point E i and vertex V:
对度数为n的奇异点,面点Fi与边点Ei计算与规则区域一样,对于顶点V:For singular points with degree n, the calculation of the surface point F i and the edge point E i is the same as that of the regular area. For the vertex V:
(2)切平面定义(2) Definition of tangent plane
当奇异点周围节点距比例非常大时,推广的Bezier提取得到的基函数会出现多峰情况。这里利用细分格式,定义了奇异点周围面点与边点,使它们处于同一个切平面。When the proportion of node distances around singular points is very large, the basis function obtained by the generalized Bezier extraction will appear multi-peaked. Here, the subdivision format is used to define the surface points and edge points around the singular point so that they are on the same tangent plane.
NURSS细分格式:NURSS subdivision format:
如图4所示,对于度数为n的奇异点V,临近的控制点为Ei,Fi,节点距长度为di,ai。要计算新的控制点令/> 则细分规则可以写为/> As shown in Figure 4, for a singular point V with degree n, the adjacent control points are E i , F i , and the node distance length is di , a i . To calculate new control points Order/> Then the subdivision rule can be written as/>
面点:Pastry:
边点:Edge points:
Mi=ωiEi+(1-ωi)VM i =ω i E i +(1-ω i )V
顶点:vertex:
fi=di-1di+2,mi=fi+fi-1 f i =d i-1 d i+2 ,m i =f i +f i-1
Eigen-polyhedron细分格式Eigen-polyhedron subdivision format
定义 在R2定义点集/> definition Define point set in R 2 />
基于Eigen-polyhedron的细分可以写成格式顶点Eigen-polyhedron based segmentation can be written in the form vertex
顶点坐标的计算与NURSS细分规则一样,令是将V,Ei,Fi用/>替代计算出的点。The calculation of vertex coordinates is the same as the NURSS subdivision rule, let Is to use V,E i ,F i /> Substitute calculated points.
面点Pastry
其中αi,1,αi,2是如下方程的唯一解:Among them, α i,1 and α i,2 are the only solutions to the following equation:
边点edge point
其中in
Pi,1=(1-αi-1,1)V+αi-1,1Ei-1,Pi,2=(1-αi,2)V+αi,2Ei+1 P i,1 = (1-α i-1,1 )V+α i-1,1 E i-1 ,P i,2 = (1-α i,2 )V+α i,2 E i+ 1
Pi,3=(1-αi-1,1)Ei+αi-1,1Fi-1,Pi,4=(1-αi,2)Ei+αi,2Ei P i,3 = (1-α i-1,1 )E i +α i-1,1 F i-1 ,P i,4 = (1-α i,2 )E i +α i,2 E i
βi,1,βi,2是下述方程的唯一解:β i,1 ,β i,2 are the only solutions to the following equations:
这里的是将V,Ei,Fi用/>替换计算得到。here Is to use V,E i ,F i /> Replacement is calculated.
切平面计算tangent plane calculation
如图5所示,被定义为点V,{Ei},{Fi}的线性组合,这里使用eigen-polyhedron细分格式作为指导。As shown in Figure 5, is defined as a linear combination of points V, {E i }, {F i }, using the eigen-polyhedron subdivision format as a guide.
计算基于eigen-polyhedron细分的极限点CCalculate the limit point C based on eigen-polyhedron subdivision
用L0表示矩阵N特征值为1对应的特征向量的单位化,极限点定义为C=L0MTP;Use L 0 to represent the unitization of the eigenvector corresponding to the eigenvalue of matrix N being 1, and the limit point is defined as C=L 0 M T P;
计算基于eigen-polyhedron细分的切平面Compute tangent planes based on eigen-polyhedron subdivisions
定义两个大小为2nx2n的矩阵 令/> λ是矩阵/>的主特征值,则/>可以写成/> Λ是由奇异值构成的对角矩阵。假设i1,i2是使得Λ(i1,i1)=Λ(i2,i2)=λ的指标,令/>为除了/>其他位置为零的对角矩阵,这样可以得到进而定义向量集合/> Define two matrices of size 2nx2n Order/> λ is the matrix/> The main eigenvalues of , then/> It can be written as/> Λ is a diagonal matrix composed of singular values. Assume that i 1 and i 2 are indicators such that Λ(i 1 ,i 1 )=Λ(i 2 ,i 2 )=λ, let/> In addition to/> A diagonal matrix with zeros in other positions, this gives Then define the vector set/>
定义奇异点周围的Bezier控制点Define Bezier control points around singular points
对奇异点周围Bezier控制点 Bezier control points around singular points
尺度优化Scale optimization
奇异点周围的面点、边点需要在给定的切平面上,因此需要确定每个点与奇异点之间的距离。最终的控制点按如下定义:The surface points and edge points around the singular point need to be on the given tangent plane, so the distance between each point and the singular point needs to be determined. The final control point is defined as follows:
展开可得:Expand to get:
希望所有的基函数都是非负的,所以si按如下形式定义:It is hoped that all basis functions are non-negative, so s i is defined as follows:
角度计算Angle calculation
如图6所示,为了在非均匀情况得到质量良好的曲面,现在奇异点附近定义角度。每个奇异点上一圈夹角和应该等于2π,并且越大的边对应的角度应该更接近 As shown in Figure 6, in order to obtain a good quality surface in a non-uniform situation, the angle is now defined near the singular point. The sum of the included angles on each singular point should be equal to 2π, and the angles corresponding to the larger sides should be closer
定义权重ki:Define weight k i :
根据权重定义角度:Define angles based on weights:
一般情况下θi求和不等于2π,这时对角度归一化到2π。Under normal circumstances, the sum of θ i is not equal to 2π. In this case, the angle is normalized to 2π.
连接函数定义Connection function definition
如图7所示,将奇异面升阶到双五次Bezier曲面来满足G1连续性条件,对每条边定义参数bi。假设奇异点度数为n。As shown in Figure 7, the singular surface is upgraded to a biquintic Bezier surface to satisfy the G1 continuity condition, and parameters b i are defined for each edge. Suppose the singular point degree is n.
定义(i,j)=sin(θi)sin(θi+2)…sin(thetaj)(i<j)Definition (i,j)=sin(θ i )sin(θ i+2 )…sin(theta j )(i<j)
若n=2k+1为奇数:If n=2k+1 is an odd number:
若n=2k为偶数:If n=2k is an even number:
假设集合S是n个数字的集合,令/>是集合中出现次数最多的值,如果每个数字仅出现一次,则让/> Suppose the set S is n numbers The set of , let/> is the value that occurs most frequently in the set, if each number occurs only once, then let/>
G1连续性约束在孤立奇异点与相连奇异点情形下并不相同The G1 continuity constraint is not the same in the case of isolated singular points and connected singular points.
如图8所示,奇异点孤立情况下:As shown in Figure 8, when the singular point is isolated:
定义α(s)=ai*ai-1,β(s)=ai*ai+1,γ(s)=bi(1-s)2,得到G1约束条件如下:Define α(s)=a i *a i-1 , β(s)=a i *ai +1 , γ(s)=b i (1-s) 2 , and obtain the G1 constraint conditions as follows:
在奇异点相连情况下:When singular points are connected:
定义得到G1约束条件如下:definition The G1 constraints are obtained as follows:
局部分步优化Local step-by-step optimization
为了可以处理一个面上存在多个奇异点情况,避免全局优化求解约束条件,采取了一种局部分步优化算法。In order to handle the situation where there are multiple singular points on a surface and avoid solving the constraint conditions through global optimization, a local step-by-step optimization algorithm is adopted.
将每条边上的约束条件分为两部分,前两个方程成为顶点约束,剩下的称为边约束。按如下顺序求解新的基函数:The constraints on each edge are divided into two parts, the first two equations become vertex constraints, and the remaining equations are called edge constraints. Solve for the new basis functions in the following order:
优化顶点控制点Optimize vertex control points
每个度数为n的奇异点顶点约束包含3n+1个控制点,2n个线性约束方程,先求解得到满足顶点约束的3n+1个控制点。Each singular point vertex constraint with degree n contains 3n+1 control points and 2n linear constraint equations. The 3n+1 control points that satisfy the vertex constraints are first solved.
优化边控制点Optimize edge control points
一但顶点控制点被确定,剩下的边约束设计的控制点被控制在每条边上,都变为了局部问题,这是求解每条边上满足边约束的控制点。Once the vertex control points are determined, the remaining control points of the edge constraint design are controlled on each edge, which becomes a local problem. This is to solve the control points on each edge that satisfy the edge constraints.
优化面控制点Optimize surface control points
面控制点对奇异边之间的连续性不产生影响,因此为了让得到基函数更加光滑,奇异面上的面控制点可以最小化二阶导数的积分,让曲面更加光滑。Surface control points have no effect on the continuity between singular edges, so in order to make the basis function smoother, surface control points on the singular surface can minimize the integral of the second derivative, making the surface smoother.
分布求解时需要求解一个带线性等式约束的最小二乘问题,即:When solving distribution, you need to solve a least squares problem with linear equality constraints, that is:
s.t.MP=bs.t.MP=b
这个优化问题可以转化为线性方程组的求解问题:This optimization problem can be transformed into a solution problem of a system of linear equations:
折痕Creases
对规则区域,的样条定义与B样条一致,这时可以使用节点插入的方法,沿着指定边插入重节点,这样可以沿这条边构造折痕。For regular areas, the spline definition is consistent with the B-spline. In this case, the node insertion method can be used to insert heavy nodes along the specified edge, so that creases can be constructed along this edge.
对经过奇异点的折痕,只要(1)剔除对应奇异边的G1约束方程,这样就可以使基函数在这条边上的连续性降低一阶。(2)同时为了控制尖锐特征,将指定奇异边对应的边控制点独立出来,也就是原本这些控制点是网格里控制点的线性组合,现在将每个边控制点添加到网格控制点中,可以直接控制,进而控制折痕的形状。(3)修改奇异点的基函数,将基函数修改为周围一圈新加入的控制点的线性组合。For creases passing through singular points, as long as (1) the G1 constraint equation corresponding to the singular edge is eliminated, the continuity of the basis function on this edge can be reduced by one order. (2) At the same time, in order to control sharp features, the edge control points corresponding to the specified singular edges are separated. That is to say, these control points were originally linear combinations of the control points in the grid. Now each edge control point is added to the grid control points. , you can directly control and thereby control the shape of the crease. (3) Modify the basis function of the singular point and change the basis function to a linear combination of newly added control points in the surrounding circle.
如果有多个折痕经过同一个奇异点,当指定两条折痕是连续时,修改这两条边直接的角度θi…θj,使得保持/>若这些折痕不是连续的,则保持角度不变。If there are multiple creases passing through the same singular point, when specifying that two creases are continuous, modify the direct angles θ i ... θ j of these two sides so that Keep/> If these creases are not continuous, the angle remains unchanged.
本发明实施例技术方案的试验结果。Test results of the technical solutions of the embodiments of the present invention.
构造的基函数在非均匀情况下仍有很好的造型能力,奇异点附近的曲面保持单峰光滑。The constructed basis function still has good modeling ability under non-uniform conditions, and the surface near the singular point remains single-peak smooth.
对度数为5的奇异点,将部分边结点距设置为6,其余为1,算法可以得到如图所示的单峰G1连续的基函数。For singular points with degree 5, set some edge-node distances to 6 and the rest to 1. The algorithm can obtain the unimodal G1 continuous basis function as shown in the figure.
在实际模型中,戒指模型里部分边结点距设2,其余为1,部分结点的边设置为连续的折痕,可以得到如图的结果。In the actual model, the node distance of some edges in the ring model is set to 2, and the rest is 1. The edges of some nodes are set to continuous creases, and the results as shown in the figure can be obtained.
本发明提出一种样条基函数的构造方法,使得生成的样条具有在任意拓扑的控制网格上生成全局G1连续的曲面,进而可直接用于CAD设计与CAE分析,从而加速加工设计分析一体化流程。The present invention proposes a construction method of spline basis function, so that the generated spline can generate a global G1 continuous surface on the control grid of any topology, and can be directly used for CAD design and CAE analysis, thereby accelerating processing design analysis. Integrated process.
上述实施例仅例示性说明本发明的原理及其功效,而非用于限制本发明。任何熟悉此技术的人士皆可在不违背本发明的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡所属技术领域中具有通常知识者在未脱离本发明所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本发明的权利要求所涵盖。The above embodiments only illustrate the principles and effects of the present invention, but are not intended to limit the present invention. Anyone familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed in the present invention shall still be covered by the claims of the present invention.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110911630.4A CN113591356B (en) | 2021-08-10 | 2021-08-10 | Construction method of non-uniform irregular spline basis function retaining sharp features |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110911630.4A CN113591356B (en) | 2021-08-10 | 2021-08-10 | Construction method of non-uniform irregular spline basis function retaining sharp features |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113591356A CN113591356A (en) | 2021-11-02 |
| CN113591356B true CN113591356B (en) | 2023-10-27 |
Family
ID=78256750
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110911630.4A Active CN113591356B (en) | 2021-08-10 | 2021-08-10 | Construction method of non-uniform irregular spline basis function retaining sharp features |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113591356B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117541747B (en) * | 2023-10-31 | 2024-08-06 | 中国人民解放军总医院 | C-B spline-based subdivision wavelet transformation method, device, equipment and medium |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103064344A (en) * | 2012-12-25 | 2013-04-24 | 广东省自动化研究所 | Non uniform rational B spline (NURBS) interpolation based speed smooth control method |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6950099B2 (en) * | 2002-07-01 | 2005-09-27 | Alias Systems Corp. | Approximation of Catmull-Clark subdivision surfaces by Bezier patches |
| WO2004088468A2 (en) * | 2003-03-26 | 2004-10-14 | Brigham Young University | System and method for defining t-spline and t-nurcc surfaces using local refinements |
| US10109103B2 (en) * | 2010-06-30 | 2018-10-23 | Barry L. Jenkins | Method of determining occluded ingress and egress routes using nav-cell to nav-cell visibility pre-computation |
-
2021
- 2021-08-10 CN CN202110911630.4A patent/CN113591356B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103064344A (en) * | 2012-12-25 | 2013-04-24 | 广东省自动化研究所 | Non uniform rational B spline (NURBS) interpolation based speed smooth control method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113591356A (en) | 2021-11-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6943790B2 (en) | Dual mesh resampling | |
| JP4934789B2 (en) | Interpolation processing method and interpolation processing apparatus | |
| CN113348459A (en) | Transformation of generative design geometry into editable and watertight boundary representation in computer-aided design | |
| US20150127301A1 (en) | Updating A CAD Model To Reflect Global Or Local Shape Changes | |
| CN109961517B (en) | A Triangular Mesh Reparameterization Method for Parametric Surface Fitting | |
| JP5436416B2 (en) | Approximation processing method and approximation processing apparatus | |
| Sevilla et al. | The generation of triangular meshes for NURBS‐enhanced FEM | |
| CN115130253A (en) | Generating a refined control mesh for generating a smooth surface of an object | |
| US20190251218A1 (en) | System and Method for Performing Isogeometric Analysis and Finite Element Analysis Using H-Splines | |
| Wang et al. | Optimal NURBS conversion of PDE surface-represented high-speed train heads | |
| CN107886569B (en) | Measurement-controllable surface parameterization method and system based on discrete lie derivative | |
| JP4639292B2 (en) | 3D mesh generation method | |
| Zeng et al. | Least squares quasi-developable mesh approximation | |
| CN113591356B (en) | Construction method of non-uniform irregular spline basis function retaining sharp features | |
| Feng et al. | Patching non-uniform extraordinary points | |
| Yavuz et al. | A dynamic neural network model for accelerating preliminary parameterization of 3D triangular mesh surfaces | |
| CN118212377B (en) | A method for generating high-order triangular meshes of CAD surfaces based on minimal surface theory | |
| CN118468631A (en) | An alternating size field optimization-parameter model re-gridding method and device | |
| CN108460192A (en) | Method for processing uncoordinated grids in finite element calculation of physical field | |
| US11373020B2 (en) | Method and system with mesh data conversion for stamping dies | |
| CN120107528A (en) | Method and system for converting unstructured T-splines into non-uniform rational B-splines | |
| Jingyu et al. | An approach to computing multipoint inversion and multiray surface intersection on parametric surface | |
| CN120107527A (en) | Unstructured PHT spline storage and calculation method and system | |
| CN110908338B (en) | Blade profile spline reverse curvature correction method and system for turbine blade | |
| Yu et al. | T-spline Surface Fairing Based on Centripetal Re-parameterization |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |