Slicing procedures for layered manufacturing techniques A Dolenc and I M&kel&
The 1980s witnessed the emergence of new manufacturing t'echnologies that build parts layer by layer. These layeredmanufacturing techniques can significantly reduce the design-toproduct leadtimes. The paper overviews several procedures for generating the layers from a CADmodel such that the resulting part can be accurately manufactured using LMT.
Keywords: stereolithography, sectioning
An example of a layered-manufacturing technique (LMT) is the stereolithography apparatus (SLA) (see Figure 1). The model to be manufactured is sliced by a set of parallel planes. The space between two adjacent slices is called a layer. Initially, the elevator is located at a distance from the surface of the liquid that is equal to the thickness of the first, bottom-most layer. The laser beam scans the surface, following the contours of the slice. The interior of the contour is then hatched using a hatch pattern. The liquid is a photopolymer that, when it is exposed to the laser beam, solidifies, or is cured. The elevator is moved downwards, and the subsequent layers are produced in a similar way. Finally, the part is removed from the vat, and the liquid that is still trapped in the interior is usually cured in a special oven. Although the processes can differ significantly, e.g. by the use of materials other than photopolymers, the underlying theme is the same. The characteristics of the various commercially available systems and the promising ones under development can be found elsewhere 1-4. The transfer of data to these processes is shown in the simplified state diagram in Figure 2. All the state transitions in Figure 2 are possible. For instance, one can take slices from medical imaging systems, and interpolate Institute of Industrial Automation, Department of Computer Science, Helsinki University of Technology, Otakaari l, SF-02150, Espoo, Finland Paper received"28 August 1992. Revised."6 March 1993
intermediary slices that are subsequently used in an L M T process. In this case, a 3D model is never evaluated. On the other hand, some processes cannot effectively handle sliced models, or '2 1/3 D' models, and so a faceted model is created and then sliced again. The reason is that, in some cases, it is important to have the ability to position the model arbitrarily in the workspace of the machine, and this cannot be done with sliced models. Typically, a 3D CAD system, a surface or solid modeUer, is used to create the model. The most common step that follows is that of faceting the model. The current de facto data-exchange standard for representing faceted models is STL 5. This format requires significant redundancy, and it is restricted to triangles. Normally, each vendor supplies the software tools to perform the slicing of faceted models, and the format for representing the slices is proprietary. There is a trend for L M T vendors to develop interfaces based on slicing surface models together with major CAD vendors. One of the objectives is to eliminate the need always to generate intermediary, faceted models. Therefore, the interest in correctly slicing models for L M T is growing. The purpose of this paper is not to explain how to compute the slices per se. We will assume that, given a model ~ ' , there exists an algorithm d that can compute the intersection curve c.g between ~ ' and a plane equation E within a given tolerance t. Our intention is to explore how to use the algorithm ~¢ to obtain slices that can be used to manufacture J / a s accurately as possible. As a corollary, the techniques to be explained are only applicable to the cases in which the input model is a 3D model. A typical problem with a naive usage of algorithm d is shown in Figure 3, in which flat areas, areas parallel to the slicing direction, are not properly handled, notably the bottom of the model. Only the outline of the model (a kayak-like object) is shown. The broken lines represent the location of slices generated by planes that are perpendicular to the z axis (and, thus, to the paper). As explained above, the bottom-most layer is the first one to be manufactured, and it contributes one layer to the
0010-4485194/020119-08 © 1994 Butterworth-Heinemann Ltd Computer-Aided Design Volume 26 Number 2 February 1994
119
Slicing procedures for layered manufacturing techniques: A Dolenc and I Makel&
Mirrors Lenses Object
1¢ uv-laser beam
Contouroftheslice
f
/
Urface of
Hatchpa~ern
Uquid
liquid polymer
Platform and Elevator
Figure 1 Stereolithographyapparatus
Facettod Model
(e.g. STL) Sliced Model Internal representation of Application Programs
=
~" LMTProcess
Surface Model
(e.g. IGES or VDAFS) Figure 2 State transitions of model manufactured via LMT z-ax/s
........
(b) xy-pS- - - I
Figure 3 Naive slicing procedure of kayak-like object; (a) original model, (b) resulting part
part. As we will learn in the sequel, the correct procedure in this case is to discard the bottom-most slice. In principle, the model to be manufactured must represent one or more closed, nonintersecting objects, or solids. Each slice then contains closed, nonintersecting, simple contours. It is usually assumed that the normal vectors have a consistent orientation, e.g. that they point towards the outside of the model. If this is not the case, then it is not possible to generate the internal structure of slices during manufacturing, e.g. the hatching may solidify regions outside the interior of the model, or it may not solidify regions inside the interior of the model when it should. In practice, most models contain gaps or cracks caused by errors in the original model, inadequate faceting procedures, or intrinsic limitations
120
in the model. Therefore, all models are usually verified, and, it is to be hoped, corrected, prior to slicing. Correcting models is a complex and interesting problem, but we shall not delve into it in this paper. Instead, the interested reader is directed to the literature 6-8.
Statement of problem As generally stated, the problem is to manufacture a part as accurately as possible with a minimal number of layers given a specific L M T process. In this sense, minimizing the number of slices is usually of less importance than accuracy. Slicing can affect the quality of the resulting part in several ways. Parts usually exhibit a visible staircase effect (see Figures 3 and ll), and, in many applications, posttreatment is necessary. The smoothness can be improved by either the removal of material, e.g. using sand blasting or grinding, or the addition of material. Therefore, if a process allows a range of layer thicknesses, or thicknesses for short, then it is desirable to restrict the staircase effect to a user-specified tolerance. It is also desirable to compute the slices taking into consideration the type of posttreatment that will be performed, if any. The addition of material and removal
Computer-Aided Design Volume 26 Number 2 February 1994
Slicing procedures for layered manufacturing techniques: A Dolenc and I M~.kel&
of material are mutually exclusive, and, therefore, it is important that the resulting part be consistent with the posttreatment used. Posttreatment is particularly important when the L M T part is used in a chain of processes that results in a tool. One must keep in mind the practical problems faced by the machine operator. Currently, some vendors supply software that requires several parameters to be supplied each time the thickness changes, and a tall model can require hundreds or even thousands of layers. As a result, it may be necessary to limit the number of times the thickness changes. Another problem is that of not omitting features from the model. Usually, fiat areas (areas parallel to the slicing direction) and features, or 'peaks', such as the bottom and the top of the model must be accurately reproduced, either to achieve tolerances, or for aesthetic reasons. Finally, the user expects the slicer to determine the bounds of the model such that it is unnecessary to specify the initial and final slices. This is straightforward in the case of faceted models, but more sophisticated procedures are required for surface models. As mentioned above, we shall not discuss how the slices should be evaluated, i.e. algorithms such as those relating to plane-surface intersections will not be discussed. Our goal is to explain how to use such algorithms for manufacturing purposes. Without loss of generality, we assume that slices are computed along the z axis. The notation C(S) denotes the contours of a slice S. Contours such as points and open lines that have only a boundary but no interior are called degenerate contours. The values lmi. and Lm,x denote the minimum and maximum thicknesses, respectively, with 0
Figure 5 Uniform slicing with thickness 1; (a) original model, (b) resulting part clarity, only a simplified outline viewed from the perspective of a person standing on the xy plane is shown.
UNIFORM
The simplest slicing procedure uses only one parameter, the layer thickness l (see Figure 5). Although this is not sufficient to deal with the problems stated in the first subsection, it is useful for debugging the model, very simple to use, and the easiest to implement. In fact, some processes cannot handle variable thicknesses, and, in this case, l = l m i n = Lmax" Notice that the first slice at the bottom must be discarded; otherwise, it will contribute to one undesirable layer to the part, and small details may be lost, such as the 'peak' on the upper left of Figure 5a. Some fiat areas are not accurately reproduced, and the staircase effect is seen along the segment PQ. When variable thickness is possible, the user can have better control of tolerances by allowing there to be different values for different intervals of the model, but our objective is to minimize the need for user interaction.
HANDLING
Figure 4 Example 3D triangulated model
SLICING
PEAKS
First, we define intuitively what is meant by a peak in the model. Henceforth, the notation Si means a slice computed at z = zi, unless stated otherwise. Consider a model with no flat areas, and assume that it has been sliced with infinite precision. Take a slice S~ and a contour C e C(S~) that is not degenerate. If there exists a slice S~ with zj
Computer-Aided Design Volume 26 Number 2 February 1994
121
Slicing procedures for layered manufacturing techniques: A Dolenc and I M~ikelf
This procedure is shown in Figure 6. When the slice S~+~ is evaluated, a peak is detected, and one layer is added between it and S~. Geometries that cause these heuristics to fail are easy to find, but they are not likely to occur too often in
¢Y2:t:::'I::::
.
Figure 6
....
.
.
.
.
.
.
.
.
.
.
HANDLING
.
.
Using thinner layers when peaks are detected
z-ax/~ .
.
.
.
.
.
.
.
.
.
.
~.
I xy.plane
Undetectedpeak Figure 7
Undetected peaks
I
Positive Z
......
I ................ Z..axis Figure 8
practice (see Figure 7). More robust procedures can be used to minimize this problem, such as pairing corresponding contours in adjacent layers, or computing intermediary slices which are subsequently discarded if not needed. However, usually only correctness within a tolerance can be guaranteed.
N#ga,~v¢ Ncgtaga,¢
Flat areas split z axis into intervals
FLAT AREAS
Now we turn our attention to flat areas, or areas parallel to the slicing direction. Identifying the areas in a slice that are flat is not only important to preserve tolerances, but it can also simplify and improve the postprocessing for some L M T processes. In particular, when using an SLA, it is usually desirable to use a different hatch pattern in such areas. The flat areas split the z axis into several intervals Zmin= F0, F 1 , F 2 . . . . . Fn, F , + I = z . . . . where Fi denotes a flat area at some z = z,. Sometimes, we use this notation to denote the value z,, and the meaning should be clear from the context., First, let us classify the flat areas into positive and negative areas, depending on their normal directions (see Figure 8). The notations F + and F - denote positive and negative flat areas, respectively (the terms up-facing and down-facing are sometimes used). Next, consider a negative flat area at F t. To manufacture F f accurately, it is necessary that (a) an additional slice F) be placed above F f such that 0 < / m i n ~ F)-- F f <~L . . . . and (b) the areas in F f that correspond to the negative flat areas must be discarded. In Figure 9, the contour F is discarded, and the final contour for the slice F j- is C.
C a s e 1: 1= imin = L m a x In the case of uniform slicing, the flat areas usually lie in-between two adjacent slices. In Figure 10 (on the left), the flat area F 7 is manufactured with an error of E = F f - Si, because the tinted area will be present in the resulting part. On the other hand, the tinted area to the right will be omitted. If E > 1/2, it is better to approximate
z-aM= I n ~ r ~ r orP
F xy.pku~
°11'
apj
T.__,.
Figure 9 Contours; (a) side view of part P and slice at F j, (b) top view of contour of Fi (above), contour split into two parts (below), one of which encloses negative fiat area
122
Computer-Aided Design Volume 26 Number 2 February 1994
Slicing procedures for layered manufacturing techniques: A Dolenc and I Mhkel&
F f using Si+ 2 by eliminating from C(S~+I) the area determined by F. Adding the area F to C(S~+2) is, in practice, unnecessary. The resulting error is Si + ~- F f ~< I/2. In the case of positive flat areas, if Si + 1 - F f < F f - Si, then the positive contours at Fj should be merged with the contours of S~+ 1. In conclusion, the error between any two flat areas can be bounded by l, instead of 2l if no appropriate action is taken.
Case 2: lmin ~ l ~ Lma x
HANDLING
If lmi n < L . . . . the user should have the option to specify that flat areas be accurately reproduced. If F i is a positive flat area, it is sufficient to slice the model at that location. If F i is a negative flat area, an additional slice must be computed above at an appropriate location, and the contours must be modified as explained in the previous sections. We call these added slices floatin9 slices. The result is a collection of intervals [Fi, Fi+l] that must be sliced with a thickness l and an optional alternative thickness lp for peaks. The problem that we now have is that of layers that are too thin to be manufactured. There are several instances of this problem, and we explain those we find most interesting. If the problem is caused by positive fiat areas that are too close to each other, in other words F[+ 1 - Fi+ < Imin, then an aceptable solution is to discard one of the slices with a warning. Other solutions are possible, such as that of substituting both slices by an 'average', as long as the layer below F [ does not become too thick, but general procedures along these lines can be difficult to implement and error-prone.
/ Model
~f !
"~ St~¢e (i÷1)
->
Error "~
Thin layers usually occur when the last slice within an interval is evaluated. Several approaches are possible in this case. We have chosen to implement options that allow the user to control the number of layers in which the thickness deviates from both 1 and lp. For instance, the location of the floating slices can be adjusted to account for the last, thin layer. Alternatively, the last slice can be discarded if the resulting layer is not too thick. In the last case, all the slices or a subset of the slices in the interval must be shifted. STAIRCASE EFFECT
We now describe a method that allows the user to control the staircase effect. The problem is shown in Figure 11. In this case, the slicer must be given a range of thicknesses. The slicer determines the thickness of the layer such that the cusp height c is within a user-specified tolerance Cmax. The location of the next slice can be estimated using the normals evaluated along the last slice. If N = (Nx, Nr, Nz) is the unit normal at a point P, then C = c N must satisfy 1[C[[2 : C ~ C m a x. Since Cmax is given, the calculations are straightforward with l= Cmax/Nz, if N= 4=0. Otherwise, l = ~ . The estimated thickness is rain {L . . . . min {l}} evaluated along all the contours of the slice. Values below Imi. could be discarded with a warning, and l could be set to Imi,. In the sixth section, we demonstrate how to 'improve' this estimate. Because two kinds of cusp are distinguished by the normal directions, one caused by a lack of material and another caused by added material, it is possible to assign different tolerances for each. Further, some users may wish to assign different tolerances for the 'outside' and 'inside' surfaces, i.e. the cusps along the outer and inner contours. Care must be taken when slopes change abruptly, as shown in Figure 12. In this case, the thickness is recomputed using data gathered from slice Si + ,, resulting in a thickness of h instead of H, with h < H. POSTPROCESSING
$lic¢ (i) -
-->
Model Figure 10 Error in manufacturing negative (left)and positive(right) fiat areas
Once the slices are ready, there are several operations that one would like to perform. These operations can be classified into three types.
!
iii
. . . . . . .
.
. . . .
:
N
C=sp/u,/g~
Figure 11 Staircase effectand cusp height c
Computer-Aided Design Volume 26 Number 2 February 1994
123
Slicing procedures for layered manufacturing techniques: A Dolenc and I M&kel~i
As mentioned in the first section, the slices may be incorrect, either because of errors in the original model, or inadequate conversion procedures. Therefore, corrective procedures are needed to guarantee that the contours represent closed, simple, nonintersecting areas. Sometimes, it is desirable to alter the model being manufactured. Instead of a part with a solid interior, it may be preferable to manufacture just a 'shell', i.e. the same part consisting of a thin boundary and an 'empty' interior. A typical range for offsetting a solid to obtain a shell for lost wax casting is I-0.10, 0.25] mm. Usually, when the model is represented using parametric surfaces, this task is performed manually by the user, and it is therefore costly and time-consuming. Some research is being done on performing such operations on faceted models, and some RP vendors such as Cubital offer such functionalities in their systems that give acceptable results. However, it would be interesting to investigate the possibility of performing the offsetting on the slices. Because, in this case, the quality of the interior surface is of no importance, the results could, perhaps, be as
•
~_ Slice( i + l )
h
\
-
Slice (i)
Figure 12 Backtrackingin adaptive slicing
acceptable as offsetting the original model, with the benefit of being easier to implement. The offsetting of the contours of the slice can be used to compensate for the posttreatment operations mentioned in the first subsection, and to either obtain more accurate parts or use thicker layers. Fiyure 13 shows how the offsetting could be performed to compensate for a posttreatment that required the addition of material to the resulting part. If the contours were composed of line segments, a simple implementation could move the points of the contour along the normal direction by the specified amount. This, however, is not a correct offset, and, for comparison, Figure 14 shows how the approximate offset compares with the true offset when the posttreatment requires the removal of material. A better approach is to evaluate additional points (points A, B and C on the top right of Figure 14) to obtain a better approximation to the true offset. If offsetting the contours is done during the slicing, as shown in Figure 15, the estimated thicknesses used can be twice the estimated values mentioned in the fifth section. In this case,, the points are moved in the normal directions by half the estimated cusp height. Thus, one can obtain the same accuracy with fewer layers. On the other hand, if the offsetting is done after the slicing, one obtains a more accurate part, as long as the normals are still available. Generating the true offset of contours composed of line segments is not easy, and there are several problems that are not discussed in detail in this paper, such as the handling of self intersections in the offset curve. For L M T applications, the offset values for compensation for posttreatment are usually relatively small, e.g. in the range [0.10, 0.25] mm for the SLA, and 0.15 for the SOLIDER
z-~
P
x-ax/~ !
Q
xy-p~ ~
y.axis
Figure 13 Compensatingfor posttreatment that requires addition of material
z.aris
"•" ~,
P "I ~ ""-"""
Q
A
'~..4. C
x-ar~
Figure 14 Compensatingfor posttreatment that requires removal of material
124
Computer-Aided Design Volume 26 Number 2 February 1994
True
' "~"Offs#t
............
xy.planc
it
--- y-axLf
I"i,..,_._ Approximate Offset
Slicing procedures for layered manufacturing techniques: A Dolenc and I M~ikel& $ ,.o,,
x-axis
\ xy.plane
y-ax~
Figure 15 Compensatingfor minimizingnumberof layers,or better accuracy
process from Cubital. Therefore, a simple approach produces acceptable results. The interested reader can consult the literature 9 in which these problems have already been solved, and adapt the algorithms to the ideas presented above.
NORMALS OF PARAMETRIC SURFACE MODELS So far, we have assumed that the 3D model is represented by facets, but the original model is usually described using more complex surfaces. When applying the methods described above to a faceted model, one is, evidently, attempting to manufacture accurately a model that approximates the original one by a given tolerance. Therefore, it is possible to improve the accuracy further by slicing the original model. One of the problems in implementing the various slicing procedures discussed in the previous sections is that of automatically orienting the normal vectors of the parametric surface model. Recall that the direction of the normal vector must indicate the outside of the model. Because only the normals along the contours must be oriented, the problem can be reduced by one dimension. Our suggestion is to proceed along the following lines. Consider a normal vector N and its corresponding x y component N~y. If IINxrll2>e, with e being sufficiently large to account for rounding errors, then the use of a point-in-polygon test by casting a semiinfinite line in the direction indicated by Nxy can determine if N is correctly oriented. If IlNxrll2~
IMPLEMENTATION A tool for slicing 3D models represented by triangles has been implemented by one of the authors. It incorporates all the features described in this paper. It is written in c, and it is portable, being available on six platforms. Currently, the output is represented in a data-exchange format called LEAF 10. Our efforts are now being directed to the development of a good graphical user interface and the implementation of a slicing tool for 3D models represented by rational parametric surfaces stored in a neutral file format, such a s IGES o r VDAFS.
CONCLUSIONS Our main contributions are the development of methods for handling flat areas, and the restriction of the staircase effect to a user-specified tolerance. In addition, we have overviewed the functionality of tools for generating data for LMT processes from 3D models, and explained how offsetting the slices computed by the intersection algorithm can account for posttreatment operations, to minimize the number of layers, or to obtain a more accurate part. It is hoped that this paper provides useful guidelines for implementers.
ACKNOWLED GEMENTS The work was carried out within the INSTANTCAMproject (BRI'rE/EURAM BE-3527), a European consortium of partners from industry and research centres. Although not all the partners have been directly involved in software development, they have all contributed in some way, with suggestions, support, patience, or testing of the tools. The partners are, in alphabetical order, BIBA, Germany, Black & Decker, Germany, Danfoss, Denmark, the Danish Technological Institute (DTI), Denmark, E & D Design, Finland, Helsinki University of Technology (HUT), Finland, the Instituto Superior Trcnico, Portugal, NTH-SINTEF Production Engineering, Norway, Raufoss, Norway, Oy Saab-Valmet, Finland, and Wilhelm Karmann, Germany.
Computer-Aided Design Volume 26 Number 2 February 1994
125
Slicing procedures for layered manufacturing techniques: A Dolenc and I M&kela
We thank Reidar Hovtun (NTH-SINTEF),Karsten Lumbye Jensen (DTI), Professor Martti M~intylfi (HUT), Gil Barequet (Cubital), and the anonymous referees of this paper for their comments on earlier versions of the paper. Fiyure 4 was obtained using a surface modeller developed by DeskArtes Oy, and triangulated using software developed by HUT in the above-mentioned project. At HUT, we received the financial support of TEKES.
3 4
5 6
7
8
REFERENCES 1 2
Jacobs, P F (Ed.) Rapid Prototypin9 and Manufacturing: Fundamentals of Stereolithography SME (1992) Jensen, K L 'Desktop manufacturing, the next Industrial Revolution' Technical Report Danish Technological Institute, Aarhus, Denmark (1991)
9 10
Andrb Dolenc received an M S in computer science from the State University of Campinas, Brazil, in 1986. He is currently a research associate, pursuing a PhD degree in computer science. Since 1989, he has been developing software tools for rapid prototyping for the INSTANTCAM project. His research interests include computer graphics, geometric modelling, process planning, and approximation theory. His favourite sports are downhill skiing and'sailing.
126
Computer-Aided Design Volume 26 Number 2 February 1994
Kruth, J P 'Material incress manufacturing by rapid prototyping techniques' Ann. CIRP Vol 40 No 2 (1991) Rapid Prototyping: Strategic Technology for Product Development Success Technical Insights, USA (1991) (Technical Insights, PO Box 1304, Fort Lee, NJ 07024-9967, USA) "Stereolithography interface specification' 3D Systems, USA (Jul 1988) Dolenc, A and M~ikel/i, 1 'Optimized triangulation of parametric surfaces' Technical Report TKO-B74 Helsinki University of Technology, Finland (1991) (to be published in Math. Surl'aces Vol IV) Herken, R, H6dicke, R, Thamm-Schaar, T-M, Yost, J and Borac, S 'High quality visualization of CAD data' in Hoschek, J (Ed.) FreeJ'orm Tools in CAD Systems: A Comparison Teubner, Germany (1991) pp 173 194 Sheng, X and Tucholke, U 'On triangulation surface model for SLA' Proc. 2nd Int. Conf. Rapid Prototyping Dayton, OH, USA (23-26 Jun 1991) pp 236-245 Held, M On the Computational Geometry of Pocket Machining Springer-Verlag (1992) Dolenc, A and M~ikel~i, I 'LEAF: a data exchange format for LMT processes' Proc. 3rd Int. Conf. Rapid Prototyping Dayton, OH, USA (7 10 Jun 1992)
Ismo Miikelii received an M S in computer sciencefrom Helsinki University, Finland, in 1991. He is currently a research associate. Since 1989, he has been developin 9 software tools for rapid prototypingfor the tUST,4UTCAMproject. His research interests include computer graphics and geometric modelling.