Journal of Materials Processing Technology 89±90 (1999) 191±197
An adaptive slicing and selective hatching strategy for layered manufacturing Weiyin Ma*, Peiren He Department of Manufacturing Engineering and Engineering Management, City University of Hong Kong, 83 Tat Chee Avenue, Kowloon, Hong Kong
Abstract In layered manufacturing, the selection of the layer thickness directly affects part accuracy and building speed. There have been several publications exploring a variable layer thickness to cope with the issue of the compromise between part accuracy and building speed. This paper presents an adaptive slicing and selective hatching strategy for layered manufacturing. Compared with existing approaches, this strategy has several important features. First of all, an adaptive slicing approach is used to obtain an accurate and smooth part surface. The developed algorithms operate directly upon a NURBS-based CAD surface model for avoiding possible problems in connection to the commonly used STL interface. A selective hatching strategy is also proposed to reduce the build time by solidifying/depositing kernel regions of the part with the maximum allowable thick layers of a certain RP system/process. In addition, the strategy provides an alternative solution to the containment problem with mixed tolerances for the slicing of an RP part. The article provides precise skin contours for all layers and for all tolerance requirements. A case study is presented to illustrate the developed algorithms and the proposed strategy. # 1999 Elsevier Science S.A. All rights reserved. Keywords: Direct and adaptive slicing; Selective hatching; Rapid prototyping
1. Introduction Rapid prototyping (RP) refers to a class of layer-based manufacturing technologies. In contrast to traditional material removal processes, these techniques build a part by gradually adding materials layer-by-layer. The process is fully automatic and it offers many advantages over traditional manufacturing processes. The commonly used RP processes include stereolithography, selective laser sintering, fused deposition modelling, laminated object manufacturing and 3D printing. Several issues in RP, such as material properties, bonding strength, part surface quality and build time, are active research topics. In the areas of surfaceaccuracy improvement and build-time reduction, there have been many achievements during the past decade. Recent researches have been focused mainly on determining an optimal build orientation, an adaptive layer thickness, and ef®cient hatching patterns. In general, there are two slicing approaches for determining the layer thickness, i.e., uniform slicing and adaptive slicing. Uniform slicing is the simplest approach in which a part is sliced at equal intervals. It is used widely for RP *Corresponding author. E-mail:
[email protected]
systems in industry today. It is, however, a compromise issue in determining the layer thickness. If the layer thickness is small, one obtains a smooth part. This may however result in many layers and a long build time. On the other hand, if the layer thickness is large, the build time is short, but one may end up with a part having a large staircase effect. Adaptive slicing is one of the approaches to resolve the issue. In the literature, one may ®nd a number of procedures for adaptive slicing. One of the procedures was reported by Dolenc and MaÈkelaÈ [1] for faceted surfaces. The angle of the surface normal is used to predict a possible selection of the layer thickness. Important peak features of a part are considered in [1]. Sabourin et al. [2] proposed another method by ®rst subdividing the model space into uniform slabs with the maximum thickness acceptable by a RP process. Each of these slabs is further uniformly subdivided into thinner layers such that the produced cusp height is within a given tolerance. These slicing procedures are based on an STL interface, the de facto standard of the RP industry. The STL data is a faceted approximation of an object that can only be used to precisely describe planar surfaces. In the case of a free-form shape, one often needs to create a very large STL ®le in order to satisfy the accuracy requirement, which results in a long processing time. A lower precision will
0924-0136/99/$ ± see front matter # 1999 Elsevier Science S.A. All rights reserved. PII: S 0 9 2 4 - 0 1 3 6 ( 9 9 ) 0 0 0 4 3 - 6
192
W. Ma, P. He / Journal of Materials Processing Technology 89±90 (1999) 191±197
create a smaller STL ®le, but the accuracy of the part surface may not be suf®cient. The pros and cons of the STL interface have been discussed widely in the RP community during the past years [3]. Instead of going through the STL interface, several researchers developed adaptive slicing algorithms for directly slicing a CAD model to maintain its original accuracy. Amongst these approaches, Kulkarni and Dutta [4] developed an algorithm for determining a variable layer thickness for an object represented in parametric form. They use the normal curvature in the vertical direction to determine the maximum allowable layer thickness for the surface at the reference level/points with a pre-speci®ed cusp height. Jamieson and Hacker [5], on the other hand, sliced a model using a standard layer thickness and compared the contours of the present layer with those of the previous layer for possible increase of the layer thickness. If the difference between the contours on two slices is small, the maximum layer thickness is ®rst attempted: otherwise, a middle slice between the standard slice and the previous slice is created. The contours on the newly created slice are again compared to those on the previous slice. The procedure is repeated until a maximum allowable layer thickness is found. With this approach, one may need to compute many slices in order to ®nd an acceptable layer thickness. Hope et al. [6] sliced an object using layers with sloping boundary surfaces that closely match the part surface. Their slicing procedure can greatly reduce the staircase effect, but is not suitable to commonly used commercial RP systems. In a recent paper, Sabourin et al. [7] proposed an interesting approach for tackling the compromise issue of smooth surface ®nish and fast build speed based on the work reported in Sabourin et al. [2]. With their approach, the internal areas of a part will be processed only once for each of the uniform slabs. The skin areas remain processed with the re®ned uniform layer thickness within that slab. The common contour offsets within a slab are generated to separate the parts within a slab into exterior and interior regions. In addition to the previously summarized issues in layered manufacturing, there are also a number of other issues that are critical for producing accurate prototypes in a short time. One may consult [8,9], e.g., for build orientation optimization and [10,11] for investigating some important parameters affecting the quality fabrication of a part. 2. An adaptive slicing and selective hatching strategy This article presents another approach, namely an adaptive slicing and selective hatching strategy, for tackling the compromise issue of smooth surface ®nish and fast build time. The complete procedure is subdivided into the following steps. First of all, all extreme points on the model surfaces are computed from a CAD model based on nonuniform rational B-spline (NURBS) surfaces. The model is
then subdivided at the extreme points along the z-direction into several slabs in order to preserve the peak features on the model surface. An adaptive slicing algorithm based on the normal curvature in the vertical direction at the reference level/points is further applied to each of the slabs with a prespeci®ed cusp height tolerance, the minimum and maximum layer thickness. The skin contours on each layer are obtained with the allowable layer thickness and given tolerances, either positive, negative or their combination. To minimize the build time, a selective hatching strategy is implemented to selectively solidify the areas on the current layer. Starting from the bottom layer of the part upwards, if the accumulated layer thickness approaches the maximum layer thickness of a certain RP process, a set of common ``offset'' contours on these several layers is computed. These common ``offset'' contours are computed as the 2D offset contours of the maximum inscribed external surface contours or the minimum envelope of the internal surface contours with a pre-speci®ed wall-thickness. The original contours and the common offset contours de®ne the skin of the part. The skin regions between the skin contours and the common offset contours for all layers then can be ®lled to ensure an accurate part surface, and depositing or solidifying of the internal space within the common offset contours on these several layers in a single step to reduce the build time. Given the layer thickness and the required tolerance, this article provides a simple method to compute the skin contours. At the same time, it also proposes an alternative solution to the containment problem using mixed tolerances. This paper is mainly focused on introducing the developed algorithms for adaptive slicing and selective hatching of a CAD surface model. The containment problem and peak features are also addressed. Other issues such as build orientation, shrinkage and down facing are not addressed. It is assumed that the build orientation has been determined and transformed as the Z direction before using the slicing procedure. One may also ®nd discussions on shrinkage and other aspects in [12,13]. Compared with the approach reported in [7], the present approach directly slices a CAD model and allows the use of a variable layer thickness for the deposition or solidi®cation of the skin regions. 3. Adaptive slicing of a NURBS-based CAD surface model The approach discussed in this section can be termed as a direct and adaptive slicing approach. The use of adaptive slicing with variable layer thickness can obtain the minimum number of layers along a given direction that satisfy the cusp height requirement or other tolerance criterion. The build time is thus reduced. At the same time, direct slicing of a CAD model can avoid many of the problems related to the STL interface and thus improve the slicing accuracy. The following subsections detail the slicing procedure mentioned in Section 2.
W. Ma, P. He / Journal of Materials Processing Technology 89±90 (1999) 191±197
193
or surface. It is also possible that an extreme point on a boundary curve could be the same as an extreme point found on a surface. To eliminate duplicate points, all extreme points P on a NURBS surface model can be represented as P
[Pp [
[Pc [
[Ps :
Fig. 1. Two slicing strategies: (a) peak features lost; (b) peak features preserved.
3.1. Sub-division of the CAD model into slabs Peak features of an object are easily missed when performing slicing in layered manufacturing. Fig. 1 illustrates two slicing strategies. All of the peak features are preserved with the second strategy shown in Fig. 1(b). This is however not the case for the ®rst strategy shown in Fig. 1(a). A peak feature may occur at places including a corner, a boundary curve, and an interior area of a surface. For the purpose of layered manufacturing, all peak features can be handled with character points on the individual surfaces. The character points can be sub-divided into three classes, i.e., peak/corner points Pp, boundary/curve points Pc and interior/surface points Ps. With the present implementation, all of the corner points of a surface are simply taken as peak feature points. These points should however be further examined with tighter criterion. A corner point should be considered as a peak feature point only if the tangent vectors at that point do not lie on the same tangent plane, or even the tightest criterion of the z-coordinates of the tangent vectors at a corner point being either all non-positive values or all non-negative values. To proceed further for the extreme points on a boundary curve or a surface, let: Pc
u xc
u; yc
u; zc
uT ;
0 u 1;
(1)
stand for a NURBS curve and Ps
u; v xs
u; v; ys
u; v; zs
u; vT
0 u; v 1
(2)
stand for a NURBS surface in 3D space. The extreme points on a boundary curve are then those where zc0 (u)0.0. The term zc(u) is the z-coordinate of Pc(u) in 3D space. This is an over estimation. A further veri®cation might be useful to eliminate those extreme points on a boundary curve where the surface is geometrically continuous. In a similar way, all of the extreme points on a surface are those, where, 8 @zs
u; v > > 0 < @u (3) > > : @zs
u; v 0 @v In this equation zs(u,v) is again the z-coordinate of Ps(u,v) in 3D space. The equations for calculating the derivatives of Pc(u,v) and Ps(u,v) can be found in [14]. It should be noted that there might be multiple extreme points on a single curve
(4)
For trimmed surfaces, it is possible that an extreme point found by Eq. (3) might be out of the trimmed area. For this reason, all extreme points Ps(u,v) should also be veri®ed to see whether they are lying on the trimmed surface or not. Those extreme points not within the trimmed surface should be rejected. The veri®cation can be done in 2D parametric space. With the Mechanical Desk Top environment that is used by the authors, the boundaries of a trimmed surface are de®ned as 2D curves in the parametric uv-plane. It is therefore possible to determine whether an extreme point should be accepted or rejected by comparing the location of the extreme point to the regions formed by the 2D parametric boundary curves in the uv plane. Fig. 2, e.g., shows a spherical surface after trimming and the parameter region enclosed by the boundaries on the uv-plane. If the parameter (u,v) of an extreme point is within the gray region shown in Fig. 2(b), then the extreme point is accepted. One can draw a line in the uv-plane passing through (u,v) along the direction of the u-axis, and count the number of the intersection points of the line with the boundary curves in the 2D space. If the number of intersection points on one side of (u, v) is an odd number, the extreme point is then on the trimmed surface. When the extreme points are obtained from Eq. (4), the objects are then subdivided into slabs according to the z-coordinates of the extreme points for further adaptive slicing. 3.2. Layer thickness determination The tolerance requirement of a RP part is an important input for layer thickness determination. The tolerance distribution can be either ``negative'', ``positive'', or their combination, as illustrated in Fig. 3 with uniform slices. The positive tolerance is often used in situations where posttreatment operations, such as polishing, can be entertained. The negative tolerance can be used for situations where the fabricated RP part acts as a core pattern. In some other situations, a mixed tolerance, as shown in Fig. 3(c) might be
Fig. 2. A trimmed spherical surface and the parameter space: (a) the trimmed surface; (b) the region of parameter (u,v).
194
W. Ma, P. He / Journal of Materials Processing Technology 89±90 (1999) 191±197
Fig. 3. Tolerance distribution: (a) negative tolerance; (b) positive tolerance, (c) mixed tolerance.
desirable. In this case, the same distribution of the mixed tolerance occurs at all layers. It is different from the situation discussed in [4] where the RP part is skewed. The acceptable layer thickness at a point on a surface is often determined by an allowable cusp height and the local surface shape in the vertical direction. The local surface shape in the vertical direction at a point is represented by an intersection curve between the surface itself and a plane passing through the point. The plane normal is determined by a vector product of the surface normal and the z-axis. For determining the layer thickness, the curve is locally approximated with a circle having radius determined by the curvature of the curve at that point, the so called normal curvature in the vertical direction in [4]. Details of this approach can be found in [4]. Given a surface point P{x, y, z} be the allowed cusp height, be the radius of the normal curvature at P, d be the layer thickness, N be the normal vector of the surface at P and n{nx, ny, nz} be the unit vector of N. The determination of layer thickness with both negative tolerance and positive tolerance can be found in [9] for faceted surfaces and in [4] for curved surfaces. The equations for determining the layer thickness with mixed tolerance are derived from Fig. 4 and the results of the eight cases are the following:
a
d
nz
(5)
b
dÿ
nz
(6)
q 2 n2z 2 q
d d nz 2 n2z 2 q
e d ÿnz ÿ 2 n2z ÿ 2;
c
d ÿnz
(7) (8) when
2 n2z > 2 (9)
d nz ÿ
q 2 n2z ÿ 2;
g
d ÿ2nz ;
when
2 n2z
2
(11)
h
d 2nz ;
when 2 n2z 2
(12)
f
when
2 n2z > 2
Fig. 4. Mixed tolerances for the determination of layer thickness and skin contours.
Considering Eqs. (9) and (10) derived from Fig. 4(e) and (f), if 2 n2z ÿ 2 0, then this leads to n2z 2. Since , this case implies that nz is very small or the point P lies very close to the equator. The expressions for layer thickness determination in such cases are given by Eqs. (11) and (12), respectively. Fig. 4(g) and (h) show the two special cases when the layer thickness is symmetric about the equator. Eqs. (5)±(12) are equations for layer thickness determination at a point. To ®nd the minimum layer thickness that needs to be used for all contour points on that layer, the following minimization algorithm is used: Subject to :
minimize d
u; v
u; v 2 the corresponding trimmed surface & z
u; v constant (13)
(10)
If there is more than one surface on the current slice, when all of the resulting layer thicknesses must be compared and the smallest should be used. Because the objective function and the constraints of the above-mentioned minimization
W. Ma, P. He / Journal of Materials Processing Technology 89±90 (1999) 191±197
problem are very complex, some sample points on a layer are used to determine the minimum layer thickness. 3.3. Computing skin contours Depending on the tolerance requirement, skin contours might not be the same as the sliced contours as shown in Fig. 4. A ``top-down'' and ``bottom-up'' approach is proposed in [4] to determine the skin contours. With this approach, the skin contours can be readily determined when the vertical coordinate of the surface normal maintains its sign on any given contour. Otherwise, the upper slice and the lower slice of a layer are projected onto a common horizontal plane to determine an inner and an outer closed contour. The inner and outer contours are regarded as the skin contours with negative and positive tolerance, respectively. The cusp height on each layer is however changed. In addition, this approach cannot be applied to the case of mixed tolerances. In this article, a direct method is proposed for computing skin contours. The approach is similar to determining the layer thickness at a point on a surface. It computes the skin points of the following layer based on the derived layer thickness d and local surface geometry. The approach is applicable to all cases with either negative, positive or mixed tolerance requirements. Assume that at a point P{x, y, z}, the coordinates of the corresponding skin point is {xs, ys, zd}, and 8 nx > n0x q > > > < n2x n2y ; (14) ny > 0 > q n > > : y n2x n2y where n{nx, ny, nz} is the unit vector of the surface normal at P. The equations for determining the skin point at point P with mixed tolerances can be again derived from Fig. 4 the results for all of the cases (a)±(h) being summarized as the following: 8 n0x nz > > d p > x ÿ x s > < 2 1 ÿ n2z ; (15)
a;
b > n0y nz > > > : ys y ÿ p2 d 2 1 ÿ nz r 8 2 > d 0 > 2 2 < xs xÿnx nx ÿ 4
d 2nz ÿ nz r ;
c;
e 2 > > 0 d 2 2 : ys yÿny ny ÿ 4
d 2nz ÿ nz
0 ÿ xs x ÿ nx nx 4 4 ÿ n2z ÿ ;
g 0 ys y ÿ ny ny 4 4 ÿ n2z 0 ÿ xs x nx ÿ nx 4 4 ÿ n2z ÿ :
h 0 ys y ny ÿ ny 4 4 ÿ n2z
195
(18) (19)
In a similar way, the equations for determining the skin points at point P with positive and negative tolerances can also be derived. These skin points then form the skin contours at the following level. To avoid error accumulation, exact intersection/slicing points on the current level are used for the derivation of the skin points/contours of the following level. The intersection curves are obtained by calling a function of Autodesk Mechanical Desktop through its API interface. The skin contours are properly ordered following the CLI interface. 4. Selective hatching strategy The aim of slicing an object with variable layer thickness is to improve the surface quality and shorten the build time for layered manufacturing. The variable layer thickness may however produce very thin layers, especially when slicing objects having curved surfaces, so that the build time may therefore still be very long. To cope with the compromise issue, the authors propose a selective hatching strategy when using the adaptive slicing results. Only the skin regions will be scanned at all layers to ensure a smooth part surface. The internal areas will be scanned only when the accumulated layer thickness approaches the maximum allowable layer thickness of a particular process so as to maintain fast building speed. Based on this idea, we subdivide a layer into skin and internal regions. In other words, the skin regions of a layer are built with the adaptive layer thickness whilst the internal or the kernel regions are built with the maximum possible layer thickness of a RP process. The idea is illustrated in Fig. 5. Assume that the adaptive layer thickness at a level zi is di. One can ®nd an integer n such that: nÿ1 X i0
di D <
n X
di ;
(20)
i0
where D is the maximum layer thickness allowed by a RP system/process. These n layers are then grouped as a hatching unit for the determination of the skin regions and the
(16) r 8 2 > d 0 > 2 2 < xs xnx ÿ nx ÿ 4
d ÿ 2nz ÿ nz r ;
d;
f 2 > > d : ys yny ÿ n0y ÿ 4
d ÿ 2nz ÿ2 n2z (17)
Fig. 5. Thin depositing in skin regions, thick depositing in kernel regions.
196
W. Ma, P. He / Journal of Materials Processing Technology 89±90 (1999) 191±197
Fig. 6. The skin and the kernel regions.
kernel regions. To ®nd the separation contours between the skin and the kernel regions, the n skin contours are ®rst projected onto a common horizontal plane. The innermost contours of the external skin contours and the outermost contours of the internal skin contours are computed. The separation contours are then solved as the offset contours of the innermost and outermost contours along the offset direction pointing to the material side. Fig. 6 illustrates the extreme contours, the separation contours and the skin and kernel regions. 5. A case study for evaluation The adaptive slicing and selective hatching algorithms developed in this article have been implemented on an Autodesk Mechanical Desktop environment. Fig. 7 illustrates a case study conducted with the implemented slicing algorithms. Fig. 7(a) shows the sliced part and Fig. 7(b) provides the slicing results. One of the quantities illustrated in Fig. 7(b) shows the relationship between the number of layers and the z height, a quantity representing the variable layer thickness. Both of the scanning strategies, either with or without selective hatching, share the same curve since the same adaptive slicing algorithm is applied. The other quantity illustrates the relationship between the number of layers and the accumulated total slicing area at that layer, a quantity more or less proportional to the build time required until that layer. Fig. 7(b) provides a comparison of the two slicing strategies. The part shown in Fig. 7(a) is a camera model composed of eight NURBS surfaces. The size of the part is about 126 mm60 mm70 mm. It is assumed that the allowable layer thickness is d2[0.1 mm, 0.6 mm]. The part is sliced with mixed tolerance and the pre-speci®ed cusp height 0.1 mm. Two scanning strategies are used for comparison, i.e., with and without selective hatching. The wall/skin thickness for selective hatching is 2.00 mm. Fig. 7(b) illustrates the slicing results. For this example, there are in total 344 variable layers. The total scanning area is 8.09105 and 15.00105 mm2 for the cases of with and without selective hatching, respectively. The selective hatching strategy provides about 46% reduction of the scanning time compared with the traditional scanning/hatching strategy.
Fig. 7. Comparison of slicing results for general free-form parts: (a) A camera model; (b) a comparison between the slicing results of with and without selective hatching.
6. Conclusions This paper develops algorithms for adaptively slicing an object represented in NURBS surfaces. A selective hatching strategy is proposed to shorten the build time. Compared with existing approaches, the approach explored in this article has several important features. First of all, it develops algorithms for precisely calculating the skin contours of all layers for adaptive slicing. Both positive, negative and mixed tolerance requirements are considered for solving the containment problem. A selective hatching strategy is also proposed and evaluated with a case study. The results show that the selective hatching strategy is very useful for the rapid prototyping of general free-form parts or parts with sloped surfaces. In the case of parts without slope surfaces or with thin walls, the selective hatching strategy may not help. The integration of adaptive slicing and the selective hatching strategy is an effective approach for resolving the compromise issue of an accurate and smooth part surface and fast building speed. Future work will be mainly focused on the applications of the developed strategy for practical prototyping and the optimization of process parameters for
W. Ma, P. He / Journal of Materials Processing Technology 89±90 (1999) 191±197
adaptive slicing and selective hatching for various RP equipment/processes. Acknowledgements The authors acknowledge with thanks the sponsorship of this work by the City University of Hong Kong through SRG Grant 7000589. References [1] A. Dolenc, I. MaÈkelaÈ, Slicing procedures for layered manufacturing techniques, Comput.-Aided Des. 26(2) (1994) 119±126. [2] E. Sabourin, S.A. Houser, J.H. Bùhn, Adaptive slicing using stepwise uniform refinement, Rapid Prototyping J. 2(4) (1996) 20±26. [3] M. Rajagopalan, N.M. Aziz, C.O. Huey Jr., A model for interfacing geometric modeling data with rapid prototyping systems, Adv. Engr. Software 23 (1995) 89±96. [4] P. Kulkarni, D. Dutta, An accurate slicing procedure for layered manufacturing, Comput.-Aided Des. 28(9) (1996) 683±697.
197
[5] R. Jamieson, H. Hacker, Direct slicing of CAD models for rapid prototyping, Rapid Prototyping J. 1(2) (1995) 4±12. [6] R.L. Hope, R.N. Roth, P.A. Jacobs, Adaptive slicing with sloping layer surfaces, Rapid Prototyping J. 3(3) (1997) 89±98. [7] E. Sabourin, S.A. Houser, J.H. Bùhn, Accurate exterior, fast interior layered manufacturing, Rapid Prototyping J. 3(2) (1997) 44±52. [8] S. Allen, D. Dutta, On the computation of part orientation using support structures in layered manufacturing, Proceedings of the Fifth SFF Symposium, Austin, TX, September 1994, pp. 259±269. [9] F. Xu, Y.S. Wong, H.T. Loh, J.Y.H. Fuh, T. Miyazawa, Optimal orientation with variable slicing in stereolithography, Rapid Prototyping J. 3(3) (1997) 76±88. [10] D. Frank, G. Fadel, Expert system-based selection of the preferred direction of build for rapid prototyping processes, J. Intell. Manuf. 6 (1995) 339±345. [11] P.T. Lan, S.Y. Chou, L.L. Chen, D. Gemmill, Determining fabrications for rapid prototyping with stereolithography apparatus, Comput.-Aided Des. 29(1) (1997) 53±62. [12] D. Kochan, Solid Freeform Manufacturing: Advanced Rapid Prototyping, The Netherlands, Amsterdam, 1993. [13] P.F. Jacobs, Stereolithography and other RP and M Technologies: from Rapid Prototyping to Rapid Tooling, ASME Press, New York, 1996. [14] L. Piegl, W. Tiller, The NURBS Book, Springer, Berlin, 1995.