Compurers
0045-7949(95)00191-3
FLATTENING
DEVELOPABLE SURFACES
& Srructures Vol. 58. No. 4, pp. 703-708, 1996 Copyright 6 1995 Elsevier Science Ltd Printed in Great Britain. All rights reserved 0045s7949/96 $9.50 + 0.00
BI-PARAMETRIC
M. C. Gan, S. T. Tan and K. W. Chan Department of Mechanical Engineering, University of Hong Kong, Hong Kong (Received 14 October 1994)
Abstract-This paper describes a computer method for transforming an arbitrary developable surface into a flattened pattern. Developable surfaces are a special class of ruled surfaces. The Gaussian curvature of any point of the developable surfaces is zero. Some curves on developable surfaces are geodesic curves and the geodesic curvatures of all the points on these curves are zero. The flattening technique introduced in this paper is based on the geodesic curve length preservation and linear mapping principles. Both trimmed and untrimmed developable surfaces can be flattened by the algorithm.
1. INTRODUCTION Developable surfaces are widely used in engineering because they can be easily fabricated. A developable surface is produced by simply bending or rolling a flat sheet without stretching, twisting and bulging. There is also no extension and contraction in the sheet. Generally, surfaces of leather, sheet metal, paper and plywood products are developable. Shoes, handbags, sheet-metal duct-work and ship hulls are typical products fabricated by developable surfaces. Most of the investigations on developable surfaces [l-3] were mainly focused on the methods for designing and representing developable surfaces. Investigations on methods of flattening developable surfaces are comparatively few. In this paper, a new algorithm for flattening surfaces is presented. The flattening technique is based on the geodesic curve length preservation and linear mapping principles, is capable of flattening both trimmed and untrimmed surfaces. In practice, flattening techniques for trimmed surfaces are more useful because most of the surfaces used in the fabrication processes are trimmed surfaces. 2. GEODESIC CURVATUREAND GEODESIC CURVE
Since the flattening algorithm introduced in this paper is based upon the geodesic curve length preservation principle, in order to have a clear picture of the algorithm, some background information of geodesic curvature and geodesic curve are reviewed first. If a curve C lies on a surface S, (Fig. l), the curvature vector of the curve C at point P is given by K=kfi,
(1)
where I? is in the direction of the principal normal to curve C at point P. The curvature vector K can be 703
divided into two components; one component is normal to the surface S, and the other one is tangential to the surface. The normal component is normal curvature vector K, and the tangential component is geodesic curvature vector Kg. According to Faux and Pratt [4] if p(t) is the position vector of point P and B is the binormal vector to curve C, k*
=
i@) x ii(f) 43
(2)
’
where
d*W> dp(f) D(t)= dt ,iKt) = 7’ i
11 P(t) II.
=
(3)
From Fig. 1, the magnitude of the geodesic curvature vector K, is represented by
IIK, II = 4.
ie) x P(t) j3
’
(4)
where A, is the unit normal vector to the surface S1 at point P. When a developable surface is flattened, the geodesic curvature of any point on any curve drawn on the surface remains unchanged. If a curve lies on a surface and the geodesic curvature of any point is zero, the curve is considered as a geodesic curve. If a developable surface is flattened to a planar surface, any geodesic curve on the developable surface will be transformed into a straight line. Since the flattening process is an isometric transformation, the length of the geodesic curve is the same as that of the corresponding straight line. Therefore, the geodesic curve joining two arbitrary points on a developable surface is unique and it is the shortest path between these two points. It is an important relationship between
704
M. C. Gan ef al. % (Unit
Normal
Vector to the
S, at P)
Fig. I. Illustration of geodesic curvature.
geodesic curve and developable surface. We utilize this relationship to develop the flattening technique. 3.
DETAILS
OF THE FLATTENING
TECHNIQUE
The idea of the flattening algorithm is quite simple. Firstly, we divide the developable surface into a number of triangular facets. Geodesic curves connecting the vertices of the triangular facets are chosen to replace the edges of the facets. Then we try to flatten each new triangular facet individually. In order to flatten a new triangular facet, the lengths of the edges of the triangular facet are determined. Finally, all the individual flattened triangular facets are joined together to form the complete flattened pattern of the developable surface. For trimmed developable surfaces, we transform the boundary curve of the trimmed surfaces from three-dimensional-space to its flattened pattern by linear mapping. Generally, the algorithm can be divided into 10 steps. Steps (1)<5) are used to flatten untrimmed developable surfaces. If a trimmed developable surface is to be flattened, additional steps (6)-( 10) should be used. The algorithm is shown in the following steps: (1) Triangulate a bi-parametric developable surface in the uv-space. (2) Find the lengths of the geodesic curves joining any two vertices of a triangular facet. Three lengths are needed to be found for the triangular facet. (3) Construct a triangle by cosine rule. The lengths of the sides of the triangle are equal to the three lengths found in step (2). (4).Repeat steps (2) and (3) for all the triangular facets generated by step (1).
(5) Join all the triangles edge by edge. The triangles are joined together according to the topological data of their corresponding triangular facets. (6) Find a small rectangular patch which can enclose the whole boundary curve of the trimmed surface in the uv space. Consider this rectangular patch as an untrimmed developable surface and then flatten it by steps (l)-(5). (7) Divide both the untrimmed developable surface obtained in step (6) and its flattened pattern into a number of smaller rectangular regions. (8) Divide the boundary curve of the trimmed surface into numerous small line segments. (9) Transform all the end points of the line segments from three-dimensional-space to the flattened pattern of the untrimmed developable surface. The transformation is based on linear mapping. (10) Connect all the transformed end points, the boundary curve of the flattened trimmed surface is constructed. Steps (l)-(lO) above are discussed in detail. (1) The developable surface is triangulated according to Fig. 2. In order to avoid Fig. 2 from becoming too complex, the developable surface is only divided into 72 small triangular facets. In fact, the extent of the division depends on the distortion index of the flattened pattern. The distortion index of a pattern is the mean value of the geodesic curvatures of all the valid intermediate points. It is used to estimate distortion of the flattened pattern generated by our flattening algorithm [S]. If the distortion index exceeds the acceptable limit, the developable surface should be divided into more triangular facets. After the triangulation process is completed, the coordinates of all the vertices of the triangular facets are calculated
Flattening developable bi-parametric surfaces
-
U
Fig. 2. A triangulated developable surface in uu-space.
and recorded. The three vertices of each triangular facet are grouped together. And because the developable surface is triangulated systematically, the topological information of the triangular facets and its vertices can be obtained from Fig. 2. (2) This step is used to evaluate the flattened pattern of a triangular facet, where the three edges of the facet are all geodesic curves. When the developable surface is flattened, the geodesic curve will become a straight line on the flattened pattern, because a geodesic curve joining two points on a developable surface is the shortest path between these two points. On the other hand, in an isometric transformation, the length of an infinitesimal arc on a surface and the length of the corresponding infinitesimal transformed arc on the transformed surface are equal. Since the three edges of the triangular facet are geodesic curves and the flattening process is an isometric transformation, the three edges of the triangular facet will be transformed into three straight lines when the developable triangular facet is under flattening transformation. Moreover, the lengths of the edges are the same as that of the corresponding straight lines. However, the main problem of this step is to find the length of a geodesic curve. We use a numerical approximation method to solve this problem. Firstly, we use two line segments to approximate a geodesic curve (Fig. 3). The length of the geodesic curve is approximated by the sum of the lengths of the two line segments, L,, 1_2and L,_zs. In order to obtain a more accurate result, the intermediate point P,_, must be placed as close as possible
705
to the geodesic curve. The procedures for finding the valid intermediate point P,_2 are illustrated by the following example. Assume P, , Pz and P3 are the vertices of a triangular facet and we need to evaluate the length of the geodesic curve joining P, and PI. Therefore, the valid intermediate point P,, should lie in a rectangular region. This rectangular region must enclose the triangular facet P, Pz P3 and all the surrounding triangular facets. This region is called a “testing region” of the geodesic curve joining P, and Pz. From Fig. 4, rectangle ABCD is the testing region and is further divided into 36 (i.e. 6 x 6) smaller rectangles. The extent of division is again dependent on the distortion index of the flattened pattern. The number of small rectangles should be increased if the distortion index is too high. The corner points of these 36 rectangles are determined and considered as possible intermediate points. The valid intermediate point P,_, will be one of the points among them. The geodesic curvatures of all the possible intermediate points are calculated one by one. Since the geodesic curvature of a point on a geodesic curve is zero, the possible intermediate point with the lowest geodesic curvature is chosen as the valid intermediate point P,_,. An algorithm for calculating geodesic curvature was reported by Bennis et al. [6]. Although the length of a geodesic curve can be evaluated by analytical method [7], the analytical method is not simple. A simpler algorithm for evaluating the approximated length of a geodesic curve is used in our work. In our algorithm, the sum of the lengths of the two line segments is calculated. The first line segment contains P, and one possible intermediate point while the second line segment starts from the possible intermediate point to P,. Since a geodesic curve is the shortest path joining two points on a developable surface, we substitute all other possible intermediate points into this calculation one by one and find which possible intermediate point forms the lowest sum of the lengths of the two line segments. The one with the lowest sum of the lengths is chosen as the valid intermediate point P,_, .
8-2
(Intermediate lowest geodesic
Fig. 3.
point
with
curvature)
Fig. 4. Testing region (rectangle ABCD) is subdivided into 36 smaller rectangles.
706
M. C. Gan et al. Developable
Trimmed
Surfsce
Developable
(DS)
Surface
uv-Space
CDS, )
JD-Space
Fig. 5. Trimmed developable surface in w and three-dimensional-spaces.
(7) and (8) The rectangular surface RDS, is divided into M x N regions in accordance with the flattening technique as described in steps (l)-(5). In this example, we divide RDSi into nine (i.e. 3 x 3) regions (Fig. 6). At the same time, the boundary curve of the trimmed surface is divided into numerous small line segments. All the end points of the small line segments are determined and recorded. (9) and (10) To find the boundary curve of the flattened trimmed surface DS, , all the end points of the small line segments are mapped to the flattened surface of RDS,. For instance, end point A, on the rectangular surface RDS, is mapped to the flattened surface of RDS, by the following steps (Fig. 6): Step A
(3) Having determined the lengths of the edges of the triangular facet, the lengths of the sides of the flattened triangular facet are also known. It is because flattening transformation is an isometric transformation that the lengths of the geodesic curves are preserved in this case. Knowing the lengths of the sides of a triangle, the interior angles of the triangle can be calculated by the cosine rule. (4) and (5) After all the triangular facets are flattened individually by steps (2) and (3), all the flattened triangular facets (triangles) are joined together according to their adjacency relationships. (6) Figure 5 shows a developable surface (DS) which is trimmed into two parts. DS, is a trimmed developable surface. Referring to Fig. 2, a developable surface flattened by the technique described in steps (l)-(5) must be rectangular in the uv-space. In order to flatten the trimmed surface DS,, a rectangular bounding envelope, RDS, , which encloses the trimmed surface DS, is determined from the developable surface DS. RDS, is then flattened by the technique described earlier in steps (lH5).
RDS, in uv-space
We find out the region where point Al lies in the surface RDS, . From the UDcoordinates of A,, point A, is found in R,. The corresponding points of A, are found in S, and T, respectively (i.e. B, and C,). Step B
If S, is small enough, we may approximate it as a planar surface. Therefore, point B, on S, can be mapped to point C, by linear transformation (see Appendix A) since S, is transformed to T3 by the flattening method described in steps l-5 earlier. Step C
All the other end points of the line segments (e.g. A,, A,. . . , etc.) are mapped to the flattened pattern of the surface RDS, in three-dimensional-space by repeating steps (B) and (C). Step D
Finally, all the mapped points, such as C,,C*. . . , etc., are joined together to form a curve, which is the boundary of the flattened trimmed surface DSi .
RDSl in SD-space
Flattened
pattern
V
Fig. 6. Boundary of trimmed surface in different spaces.
of RDSl
101
Flattening developable bi-parametric surfaces
m Flattened
pattern
of
the trimmed Cylindrical surface
Side
View
Front
View
Fig. 7. Trimmed cylindrical surface patch and its flattened pattern.
4. EXAMPLES
OF THE WORK
Figure 7 shows two cylindrical surfaces which are intersecting each other. The axes of the two cylindrical surfaces are orthogonal. One of the surfaces is trimmed by the other one and two trimmed surfaces can be cut out. The hatched trimmed surface is flattened by our flattening technique and the flattened pattern is shown in Fig. 7. In another example, a surface of revolution intersecting a lofted surface is shown in Fig. 8. The two surfaces are trimmed by each other. The trimmed part on the revolved surface (i.e. Surface A) and the trimmed part on the lofted surface (i.e. Surface B) are flattened by our flattening technique as shown in Fig. 9. 5. DISCUSSION
AND CONCLUSION
The flattening method is easy to implement as the mathematics involved in the algorithm is relatively simple. The technique can deal with any kind of developable surfaces on a MUparametric space. It is very useful because many products made of sheet metal, leather, fibre and plywood usually consist of developable surfaces. In a CAD/CAM environment, the flattening program can be incorporated in a CAD program for generating the required flattened patterns. The pattern definition can then be used to prepare CNC programs for the manufacture of the pattern material. In this way, it can greatly shorten the time taken in the manufacturing process and improve the material utilization. Consequently, the overall cost of manufacture can be reduced.
Flattened Trimmed Flattened Trimmed Revolutionary Surface Lofted Surface (Surface A) (Surface B) Fig. 9. Flattened patterns of the trimmed surfaces.
The accuracy of the technique depends on three factors. The first factor is the number of line segments used to approximate an edge of a triangular facet. In the paper, two line segments are used to approximate an edge (Fig. 3). In fact, more line segments may be used to approximate an edge. If more line segments are used, the accuracy of the algorithm will be increased. However, it will also increase the computation time. The second factor is the number of the triangular facets used to subdivide the whole developable surface. In the example of this paper, only 72 triangular facets are used for the ease of explanation. In practice, about 200 or more triangular facets are used to dissect the developable surface. If a higher accuracy is required, more triangular facets may be used. However, the trade-off is again an increase of the memory space and computation time. Users can adjust these factors to achieve an optimum situation. The last factor is the number of line segments used to approximate the boundary of a trimmed developable surface. This factor only affects the accuracy of the flattened pattern of a trimmed developable surface. In our program, the choice of the number of line segments depends on the curvature of the boundary curve. The higher the curvature, the more line segments are used. Our program allows users to change these three factors to meet their requirements in accuracy and computation time. We have also designed a value called distortion index to estimate the accuracy of the flattened pattern, Users can adjust
Fig. 8. Surfaces A and E are generated by the trimming operation.
708
M. C. Gan et al.
these three factors according to the distortion index. Generally, a compromise between accuracy and computation time should be made according to the size and shape of the surface. In summary, despite the fact that various methods for flattening developable surfaces have been reported in recent years, little attention has been focused on the methods for flattening trimmed developable surfaces. This paper investigates this problem and describes a new method for flattening trimmed developable surfaces by geodesic curve length preservation and linear mapping principles. Acknowledgement-The
authors would like to thank the
Department of Mechanical Engineering, the University of Hong Kong for providing financial support to this work.
REFERENCES L. W. Ferris, A standard series of developable surfaces. Marine Technol. 5, 5342
(1968).
P. Redont, Representation and deformation and developable surfaces. Comput. Aid. Des. 21, 13-20 (1989). T. J. Nolan, Computer-aided design of developable hulls surfaces, Marine Technol. 8, 233-242 (1971). I. D. Faux and M. J. Pratt, Computational Geometry for Design and Manufacture. Ellis Horwood, Chichester (1978). 5. M. C. Gan, S. T. Tan and K. W. Chan, Generating and flattening of developable surfaces. ASME Proc. Ado. Des. Autom. 1994 1, 359-366 (1994). 6. C. Bennis, J. M. V&en and G. Iglisias, Piecewise surface flattening for non-distorted texture. Comput. Graph. 25, 237-246 (1991).
7. J. M. Beck, R. T. Farouki and J. K. Hinds, Surface analysis methods. IEEE Comput. Graph. Appl. 6, 18-36 (1986).
APPENDIX
The method of linear transformation is shown by an example in Fig. Al. Assuming S is a developable surface patch and T is its flattened pattern, a point on S can be mapped to T by linear transformation. Firstly, S is projected onto xy, yz and zx planes, respectively, then the projected surface with the largest area (for numerical accuracy consideration) is found. In our example in Fig. Al, the projected surface on xy-plane is chosen. In this figure, points a,, bm,c,, d, , pm, qm, r,, s,,,and B,, are the linearly mapped points of ap, b P’ c P’ dP’ p P’ q P’ r P’ s P and B,, , respectively. Referring to Fig. Al, points pp qp, rp and sp can be calculated since points ap, b,, c,, , d, and B,, are determined from steps l-8 of the method described in Section 3 of the paper. Since points a,,, and b, are known and line a,b, is linearly mapped to line a, b, , thus point p, can also be calculated according to the following equation: length of line a,p, _ length of line a,,,p, length of line a,b, - length of line a,,, b,
Hence points q,,, , r,,, , and s, can be calculated by the same method. Having determined pm, q,,, , r,,, and s, point B,, can be evaluated since B,, is the intersecting point of lines pm r, and q,,,s,,, .
Linear
a
Projection t
Z
Surface
S
Y
L
Flattened
Projected
Surface
(AlI
of
S
X
Fig. Al. Illustration of linear mapping.
Y t
Surface X
T