A Study of Surface Fitting Method to an N

A Study of Surface Fitting Method to an N-sided Region
Considering G1-Continuity with Adjacent Surfaces
Yuta Muraki∗1 Katsutsugu Matsuyama∗1 Kouichi Konno∗1 Yoshimasa Tokuyama∗2
∗1 Faculty of Engineering, Iwate Univ. ∗2 Faculty of Engineering, Tokyo Polytechnic Univ.
∗1 Faculty of Engineering, Iwate Univ., 4-3-5 Ueda, Morioka-shi, Iwate, Japan
∗2 Faculty of Engineering, Tokyo Polytechnic Univ., 1583 Iiyama, Atsugi-shi, Kanagawa, Japan
E-mail: [email protected]
Abstract
3D shape models generated with a 3D CAD system are often
expressed with trimmed surfaces. Especially, the shape models
of Japanese Industrial Standards (JIS) contain a lot of notches,
expressed using trimmed surfaces. The trimmed surface is
defined with a surface and a set of boundary edges expressing
a closed region. The boundary edges that trim a surface are
the curves lying on the surface within a certain tolerance. In
the shape modeling operations with 3D CAD systems, if the
shape model expressed with trimmed surfaces is modified,
the consistency of the trimmed surfaces must be maintained,
although this is a big restriction. It is effective to apply a
new free-form surface to a closed region composed of the
modified edges because the consistency of a trimmed surface
can be maintained. The previous surface fitting methods do
not consider the connection with the adjacent surfaces, and
the surface fitting methods are applied to each of closed regions. Accordingly, after applying the surface fitting method,
the continuity with the adjacent surfaces collapses to cause
discontinuity with adjacent surfaces.
In this paper, we propose a new surface fitting method applied
to an N-sided region with considering the continuity with
adjacent surfaces. In our method, a smooth connection with
adjacent surfaces is implemented by the surface interpolation
method and the inner geometry shape by the N-side filling
method. Our method integrates the advantage of these two
methods. To be more concrete, the control points are created to
connect two surfaces based on the geometry of the boundary
edge and a B-spline surface is created to cover an N-sided
region with using sample points on the tangent plane of
the boundary edge. The control points obtained by the two
methods are united and a trimmed surface is created to be
G1 -continuous with the adjacent surfaces. Our method can
be also applied to shapes with holes or concave shapes.
Keywords : Trimmed Surface, Surface Fitting, G1 -continuous,
Notch Shape
I. I NTRODUCTION
Recently, 3D CAD systems are indispensable tools for
product design. 3D shape models designed by 3D CAD
systems can be used in a lot of fields such as product design, prototyping, analysis, evaluation and product brochures.
Expressing adequately 3D shape models that designers intend
is an important theme.
In shape operation using 3D CAD systems, trimmed
surfaces[1] are often generated. For instance, as shown in
Figure 1, Japanese Industrial Standards (JIS) models contain
a lot of notches, expressed using trimmed surfaces. It is
necessary, however, to modify the trimmed surface shape so
as to maintain geometrical consistency of the boundary edges
and surfaces in direct modeling, and this is a big restriction. It
is effective to apply a new free-form surface to a closed region
composed of the modified edges because the consistency of
a trimmed surface can be maintained.
The methods of fitting a surface to an N-sided closed
region are classified into surface interpolation method[3] and
N-side filling method[4]. The surface interpolation method
interpolates a closed region with free-form surfaces so that
the boundary edges of the closed region coincide with the
boundary curves of the free-form surface. The N-side filling
method generates a quadrilateral trimmed surface that includes
a closed region of the boundary curves.
The details of the N-side filling method are described first.
Tokuyama et al. proposed the method of fitting a bicubic Bspline surface to an N-sided region[5]. The method[5] applies
a bicubic B-spline surface to a quadrilateral region enclosed
with free-form boundary curves. When a B-spline surface
is generated, four boundary curves are generated first, and
according to the tangent plane on each of the boundary curves,
point clouds are generated onto the tangent plane outside the
quadrilateral region. Then, using the four boundary curves
and the generated point clouds, the internal control points
are calculated for the B-spline surface by using the leastsquare method. Moreover, the authors extended the method[5]
so that surfaces with holes or concave shapes could also be
treated[6]. This method, however, applies a surface to each
closed region, and the continuity with adjacent surfaces is not
considered. Therefore, the generated surface is discontinuous
with the adjacent surfaces. The discontinuity with adjacent
surfaces reduces surface shape quality remarkably. So solving
this problem is an important issue.
The surface interpolation method is one of the methods of
connecting adjacent surfaces smoothly. Piegl et al. introduced
an interpolation method with the angle tolerance ϵ to generate
smooth surfaces[7]. In his method, the angle of the normal
vectors on an arbitrary point of the common boundary edge
between adjacent patches becomes smaller than ϵ. Yi-Jun
Yang et al. enhanced the Piegl’s method to enable rational
curve meshes[8]. Sederberg et al. proposed T-splines that
relaxed the restriction of the topology of NURBS[9]. In his
method, the control points that are not important geometrically
can be removed. T-spline reduces a lot of control points in
order to permit T-shaped connection. Chongyang Deng et
al. proposed an efficient algorithm for constructing CatmullClark surfaces[10][11]. The method of Chongyang Deng et al.
II. P REVIOUS METHODS OF SURFACE GENERATION AND
THEIR PROBLEMS
This section describes the methods of generating a surface to an N-sided region. As related works, N-side filling
method[5], surface interpolation method[3], and the method
of Garcia et al.[12] are explained and their problems are
compared.
Figure 1.
Figure 2.
JIS sample shape model[2]
Example of surface subdivision with Catmull-Clark base
models surfaces by repeating element division. The method
need not consider the connection of surfaces, and is suitable
for interactive construction of free-form surfaces. The proposed methods[7], [8], [9], [11] are integrated into CatmullClark subdivision. In an N-sided region, the center point and
division curves are generated so that the region is divided into
N quadrilateral regions, and a surface is interpolated to each
of the generated quadrilateral regions. Therefore, the internal
curve is generated to divide the N-sided region depending on
the shape of the boundary edge. For instance, as shown in
Figure 2, the distorted internal curve is generated depending
on the shape of boundary edge with this method. As a result,
the distorted surface is generated. Moreover, this method
cannot be applied to the surface including a hole. JIS models
are expressed by notches, which are surfaces with holes
or concave shapes. Therefore, for the surface interpolation
method, it is difficult to generate a surface to a closed region
expressing a notch.
The extended N-side filling method the authors proposed
has an advantage that shapes with holes or concave shapes can
also be treated. Moreover, the surface interpolation method
has an advantage that adjacent surfaces are smoothly connected. In this paper, the advantage of the N-side filling
method and surface interpolation is united, and we propose
the method that can generate G1 -continuous surface with the
adjacent surfaces and that can treat notches.
In our method, the neighborhood of a boundary introduces control points computed through surface interpolation,
and connects an adjacent surface with the generated surface
smoothly. This method enables smooth continuity with adjacent surfaces and can be applied to surfaces with holes or
concave shapes.
A. N-side filling method
N-side filling method[5] that Tokuyama et al. proposed
covers an N-sided region with a B-spline surface. This method
uses the boundary curves of a B-spline surface that covers an
N-sided region and sample points on the tangent planes, so
that a surface is generated with the surface fitting method[13].
Suppose a surface is applied to an N-sided region whose
boundary edges are drawn in blue. First, as shown in Figure
3-(a), four reference planes are obtained so that they enclose
the boundary edges. After that, as shown in Figure 3-(b), the
straight lines are generated based on the tangent plane of
the boundary edge, and the intersection points between the
straight lines and the reference planes are calculated. In this
paper, the straight line is called “ a Cross Boundary Tangent
Line (CBTL). ” As shown in Figure 3-(c), a sequence of
the intersection points is interpolated by a B-spline curve,
and the boundary curves that cover an N-sided region are
generated. After that, as shown in Figure 3-(d), sample points
are generated on the CBTLs. With using the sample points
and the four-sided region obtained above,the internal control
points of a B-spline surface are computed by the least-square
method.
The authors extend the method of Tokuyama et al. so that
it can be applied to surfaces with holes or concave shapes[6].
In the author’s method, the boundary curves of a B-spline
surface are generated with shapes around a concave section
considered. Moreover, as shown in Figure 4, the offset curves
are generated to compensate the deleted CBTLs, insufficient
sample points around the concave shape. With the operation
described above, we can generate a surface to notches such
as the surfaces with holes or concave shapes.
B. Surface interpolation method
Surface interpolation method[3] generates a surface with
using two or more surface patches. As shown in Figure 5-(a),
red internal curves are generated on a green N-sided region
by using Catmull-Clark subdivision method. Then, the Nsided region is divided into N quadrilateral regions. After that,
surface patches are applied to each of the divided four-sided
regions. Generating the internal curves to divide the region
generates T-nodes for the region. A T-node is a T-shaped contact point that occurs near the dividing point. When parameter
T has a T-node, the cross boundary derivative for parameter
t is calculated based on the basis patch method[14][15].
By calculating the control points inside a surface using the
obtained cross boundary derivatives, a surface is generated
to satisfy G1 -continuity between the patches. The generated
control points are shown in Figure 5-(b).
Figure 6.
(a)CAD data of a JIS model
(b)Result of applying the method[6] and showing the normal
vectors
Table I
C OMPARISON OF SURFACE GENERATION
Figure 3.
Calculating sample points from boundary edges
N-side Filling method
Extended N-side Filling method
Surface Interpolation method
The method of Garcia
convex
○
○
○
○
METHODS
hole or concave
△
○
×
×
continuity
×
×
○
○
intuitive shape operation is possible and an arbitrary N-sided
shape can be interpolated with surface patches.
D. Problems of previous works
Figure 4.
method[6]
Sample points and boundary curves obtained by the author’s
C. Method of Garcia et al.
The method of Garcia et al.[12] generates a surface with
using two or more surface patches. The method of Garcia
et al. inputs boundary edges representing a star-shaped Nsided region and interpolates two or more smooth patches
in the region. N regular quadrilateral patches Xn are generated around the star-shaped N-sided patches and the patches
are connected smoothly. The size of a star-shaped N-sided
patch can be controlled using parameter f . If the value off
increases, the N-sided region will be larger; and if the value of
f decreases, the region will be smaller. With this method, an
Figure 5.
Example of application of surface interpolation method
We show the comparison of the surface generation methods
in Table I. The surface interpolation method divides a region
based on the Catmull-Clark subdivision method, and applies a
surface patch to each of four-sided regions. This method can
generate a surface with G1 -continuity with adjacent surfaces.
But as shown in Figure 3, if a surface with a hole or a concave
shape is divided by Catmull-Clark subdivision method, the
inner curves will go out of the region. As a result, the
generated surface will go out of the region.
The method of Garcia generates a star-shaped N-sided patch
in a region. This method can generate a surface that is G1 continuous with adjacent surfaces. But, it is difficult to apply
this method to a surface with holes or concave shapes because
it cannot generate a star-shaped N-sided patch.
Our method described in section II-A can be applied to the
surface with holes or concave shapes. Our method, however,
applies a surface to each of the closed regions and it does
not consider the continuity with adjacent surfaces. Due to
this, the generated surface is C 0 -continuous with the adjacent
surfaces. Our method[6] is applied to a JIS model shown in
Figure 6-(a). The normal vectors on the boundary edges of
the generated surface are shown in Figure 6-(b). Although
the surfaces are generated in good accuracy for each surface,
it is found that the surfaces are discontinuous on the boundary
edge of two surfaces. Since the discontinuity drastically loses
the quality of surface shape, it is important to solve this
problem.
In this paper, the advantages of the methods [3] and [6]
are integrated and we propose the surface generation method
with considering the continuity with adjacent surfaces.
Figure 7.
Concept of the proposed method
Figure 8.
Analysis of a connection section between two surfaces
Figure 9.
(a)Boundary curve generation for the shape including G1 edges
(b)Connecting end points of boundary curves
III. P ROPOSED METHOD
Our proposed method integrates the advantages of the
surface interpolation method and N-side filling method. When
two surfaces are connected, control points are generated by
the basis patch method adopted for the surface interpolation
method. The control points expressing the internal shape are
generated by the N-side filling method. By integrating the
two methods on the viewpoint mentioned above, the generated
surface will be G1 -continuous with adjacent surfaces and can
generate surfaces applicable to shapes with holes or concave
shapes. The concept of the proposed method is shown in
Figure 7. The blue sections inside the regions use the control
points obtained by the N-side filling method. The red sections
where is G1 -continuous with the adjacent surfaces use the
control points obtained by the surface interpolation method.
A. Boundary curve generation
This section describes the method of generating the boundary curves of a B-spline surface. Before generating a surface,
the sections where two surfaces are connected are analyzed
to judge whether the boundaries should be G1 -continuous.
As shown in Figure 8, the normal vectors are calculated for
the boundary edge of the two adjoining closed regions (surrounded by the red circle in Figure 8). If the normal vectors
on the boundary edge where two surfaces share coincide each
other, the two surfaces are judged to be connected with G1 continuity. Based on the connection information between two
surfaces judged as above, a four-sided region that includes a
closed region is generated. In the section where two surfaces
are connected with G1 -continuity, sample points are generated
on the boundary edge and they are approximated with a Bspline curve. If the two surfaces are not G1 -continuous, the
cross boundary derivatives are generated from the boundary
edge outside of the region, and a set of intersection points
with the bounding box is obtained[6]. After that, the set of
the obtained intersection points is approximated with a Bspline curve. As shown in Figure 9-(a), four boundary curves
shown in purple are generated for the closed region shown
with green lines.
After generating four boundary curves, the end points of
the curves are connected and the closed four-sided region is
generated. To be more concrete, the end points of a boundary curve where is G1 -continuous extends to the tangential
direction, and the intersection points between the curve and
the bounding box are generated. The average of the obtained
intersection points and the end point of the boundary curve is
calculated, and the obtained value is added as a sample point.
After that, the closed four boundary curves whose end points
are connected are generated by re-fitting the sample points.
The generation result of the closed four-sided region is shown
in Figure 9-(b).
B. Restricted control point generation
This section describes how to connect surfaces to be G1 continuous. By restraining the control points of the sections
shown in red in Figure 7, a B-spline surface will be G1 continuous with the adjacent surface. To be more concrete, the
cross vectors tangent to the boundary edge of the two surfaces
are calculated based on surface interpolation method[14][15].
A knot is inserted to the parameter section corresponding
to an end point of the boundary edge where two surfaces
are G1 -continuous, and the boundary curve generated by the
method described in section III-A is divided. After that, as
shown in Figure 10, the cross vectors connected to each of
the divided boundary curves are calculated based on the basis
patch method and a restricted control point is obtained.
C. Sample point and surface generation
This section describes how to generate sample points and
a B-spline surface. First, sample points are generated inside
the boundary curves of the B-spline surface generated in
section III-A and outside the closed region based on the cross
boundary derivatives[6]. The purple dots in Figure 11-(a) are
the sample points on the CBTLs. The generated point cloud
lies on the tangent plane at the sample points of the boundary
edge.
The internal control points of a B-spline surface are calculated by using the boundary curve described in section III-A
Figure 10.
Control point restraint for a G1 -continuous section
Figure 11.
(a)Sample point generation
(b)B-spline surface generation by the least-square method
and the sample points generated here with the least-square
method[6]. After that, by restraining the B-spline surface
using the control points generated in section III-B, the Bspline surface such will be G1 -continuous with the adjacent
surfaces. The generated surface is shown in Figure 11-(b).
IV. E XPERIMENTAL RESULT
Our method was applied to JIS models obtained at
web2CAD[2]. Figures 12 and 15 show the control points of
the generated surfaces.
Figures 13 and 16 and Table II show the result of shape
evaluation of the generated surfaces. The blue dots in Figures
13 and 16 are put by projecting the grid points of the source
surface to the generated surface. The red dots in Figures 13
and 16 are put by extending the blue dots in Figures 13 and
16 in the normal direction of the tangent plane. The distance
between a blue dot and a red one represents the distance
between the source surface and the generated one multiplied
by twenty five. Table II shows the error margin values of the
generated surface. In Table II, three kinds of values are shown:
“ Avg. ” indicates the average error margin value obtained
by averaging the distances between the generated surfaces
and the source one, “ Max ” indicates the maximum error
margin value representing the maximum distance between the
generated surface and the source one, and“ Ratio ”indicates
the ratio of the bounding box size and the maximum distance.
As shown in Table II, the surface is generated with good
accuracy.
In order to evaluate the continuity with an adjacent surface,
the normal vectors are shown in Figures 14 and 17. The red
lines show the normal vectors on the boundary edge of the
generated surface and the blue ones show the normal vectors
Figure 12.
Showing control points(Surface A)
Figure 13.
Showing error margins(Surface A)
on the boundary edge of the adjacent surface. The boundary
edge and its surrounding section are enclosed with red circles
and zoomed in. Since the normal vectors of the generated
surface coincide with those of the adjacent surface on their
boundary edge, we can find that two surfaces are connected
with G1 -continuity.
Figure 14.
Showing normal vectors(Surface A)
Table II
E VALUATION OF ERRORS BETWEEN THE SOURCE SURFACE AND THE
GENERATED ONE
Surface
A
B
Evaluation object
Trimmed surface
Boundary edges
Trimmed surface
Boundary edges
Avg
0.000005
0.030912
0.009148
0.021373
Max
0.000014
0.080738
0.023674
0.097650
Ratio(%)
0.0000159
0.0921822
0.109337
0.4509911
Figure 15.
Showing control points(Surface B)
Figure 18.
Figure 16.
Showing error margins(Surface B)
Periodic NURBS surface
boundary edge shapes are changed.
Since our method uses sample points based on a tangent
plane at a point on a boundary edge, it cannot be applied to a
periodic NURBS surface as shown in Figure 18, which divides
a cylinder into halves. Therefore, application to periodic
NURBS surfaces is mentioned as our future works.
ACKNOWLEDGMENTS
V. C ONCLUSION AND FUTURE WORKS
In this paper, we proposed the method of generating a
trimmed surface that connects to the adjacent surfaces with
G1 -continuity. The proposed method integrates the advantages
of the N-side filling method and surface interpolation method.
To be more concrete, the control points in a region are
obtained based on sample points using the tangent planes of
the boundary edge and the control points on the boundary with
an adjacent surface are obtained using surface interpolation
method.
Our method was applied to 3D shapes with notches obtained from JIS models and the practicality was verified.
The distances between the trimmed surface and the B-spline
surface generated using our method ware measured and a good
result was obtained. Our method can be applied to shapes
with holes or concave shapes. Our method is also effective
for machine parts that often contain notches. Inputting the
boundary edges of a closed region can generate a surface.
Therefore, it is also effective for direct modeling where
Figure 17.
Showing normal vectors(Surface B)
A part of the study is supported by the RING!RING! project
in fiscal 2011.
R EFERENCES
[1] G. Farin: Curves and Surfaces for Computer Aided Geometric Design A
Practical Guide, Academic Press, (1996)
[2] web2CAD, http://www.web2cad.co.jp/
[3] H. Toriya, H. Chiyokura: Basics and Applications of Three-dimensional
CAD,Kyoritsu Shuppan Co., Ltd., (1991)
[4] Y. Muraki, K. Konno, Y. Tokuyama: “A STUDY OF SUBDIVISION
METHOD TO THREE AND FIVE SIDED FACES BASED ON REGULAR POLYGON”, in Proc. of IWAIT 2009, (2009)
[5] Y. Tokuyama, K. Konno: “Filling N-sided Region with a B-spline
Surface”,Information Processing Society of Japan, Vol. 43, No. 10, pp.
3209-3218, (2002)
[6] Y. Muraki, K. Konno, Y. Tokuyama: “Curve Mesh Modeling Method of
Trimmed Surfaces for Direct Modeling”,The Journal of Art and Science,
Vol. 10, No. 1, pp. 12-27, (2011)
[7] L. Piegl, W. Tiller: “Filling n-sided regions with NURBS patches”, The
Visual Computer, Vol. 2, No. 15, pp. 77-89, (1999)
[8] Yi-Jun. Yang, Jun-Hai. Yong, Hui. Zhang, Jean-Claude. Paul, Jia-Guang.
Sun: “A rational extension of Piegl’s method for filling n-sided holes”,
Computer Aided Design, Vol. 38, No. 11, pp. 1166-1178, (2006)
[9] T. W. Sederberg, D. L. Cardon, G. T. Finnigan, N. S. North, J. Zheng, and
T. Lyche: “T-spline Simplification and Local Refinement”, SIGGRAPH
2004, Vol. 23, No. 3, pp. 276-283, (2004)
[10] E. Catmull, J. Clark “Recursively generated B-spline surfaces on
arbitrary topological meshes”, Computer Aided Design, Vol. 10, No. 6,
pp. 350-355, (1978)
[11] C. Deng, X. Yang “A simple method for interpolating meshes of
arbitrary topology by Catmull-Clark surfaces”, The Visual Computer, Vol.
26, No. 2, pp. 137-146, (2009)
[12] N. Pla-Garcia, M. Vigo-Anglada, J. Cotrina-Navau: “N-sided patches
with B-spline boundaries”, Computers & Graphics, Vol. 30, No. 6, pp.
959-970, (2006)
[13] L. Piegl, W. Tiller: The NURBS Book, Springer-Verlag, (1995)
[14] K. Konno, Y. Tokuyama, H. Chiyokura: “A G1 connection around
complicated curve meshes using C 1 NURBS Boundary Gregory Patches”,
Computer Aided Design, Vol. 33, No. 4, pp. 293-306, (2001)
[15] Y. Muraki, K. Konno, Y. Tokuyama: “A Smooth Interpolation Method
for Generating Non-Distorted Surfaces of Three and Five Sided Faces
Based on Regular Polygon”,The Journal of Art and Science, Vol. 9, No.
2, pp. 49-57, (2010)