Int J Adv Manuf Technol DOI 10.1007/s00170-007-0995-y
ORIGINAL ARTICLE
Improved intermediate point curve model for integrating reverse engineering and rapid prototyping V. K. Kumbhar & P. M. Pandey & P. V. M. Rao
Received: 27 July 2006 / Accepted: 27 February 2007 # Springer-Verlag London Limited 2007
Abstract Direct integration of reverse engineering and rapid prototyping removes two intermediate steps of surface fitting from point cloud data and STL file generation from CAD models. Therefore errors introduced due to surface fitting and triangulations are eliminated and also the process of STL data validation and repair is avoided. Intermediate point based curve model (IPCM) method is one of the promising approaches for direct integration of reverse engineering and rapid prototyping however this approach has the limitation that it cannot handle objects, which result in multiple contoured slices. Moreover, IPCM based method is implemented with layers of constant thickness slices, and adaptive slicing with this method is not attempted. The present work is an attempt towards improving the capabilities of IPCM based method by overcoming the above-mentioned two limitations. The new system developed here has been tested on many parts, which demonstrates the capability of the proposed system. Keywords Adaptive slicing . Multiple contoured slices . Point cloud data . Rapid prototyping . Reverse engineering
V. K. Kumbhar Engineering & Industrial Services, Tata Consultancy Services, Pune, India e-mail:
[email protected] P. M. Pandey (*) : P. V. M. Rao Department of Mechanical Engineering, Indian Institute of Technology Delhi, New Delhi, India e-mail:
[email protected] P. V. M. Rao e-mail:
[email protected]
1 Introduction Reverse engineering (RE) involves acquiring threedimensional geometric data in the form of point cloud using laser scanners, coordinate measuring machines (CMM) or computer tomography (CT) scanners. A CAD model can be constructed from acquired point cloud data and can be used for generation of cutter tool paths for CNC machining or slice generation for rapid prototyping. Rapid prototyping (RP) technology uses layer-by-layer material deposition to quickly fabricate a physical model of a part or assembly from three-dimensional computer aided design (CAD) data. Both reverse engineering and rapid prototyping are technologies that have led to reduction of product development lead times in many cases. Integration of the two processes, i.e. RE and RP has the potential to drastically reduce the product development times further. There exist three routes to integrate reverse engineering and rapid prototyping. In the first route a CAD model is first constructed from point cloud data, which is tessellated to give an STL file. This STL file is then sliced and is used for deposition of part in a RP system. Construction of a CAD model from point cloud data is often non-trivial and calls for many steps such as use of correct method to capture geometry, pre-processing of point cloud data, data segmentation, surface fitting, post processing of captured geometry by operations such as blending and stitching, and finally verification of captured model for accuracy [1]. In the second route, STL file is directly generated from point cloud data, which is then sliced and used to drive an RP machine to produce prototype [2–4]. In this route the process of building a CAD model from point cloud data is eliminated. However, errors introduced due to triangulation need to be addressed. Validation of STL data and its repair cannot be avoided in many cases introducing further errors [5].
Int J Adv Manuf Technol Table 1 Comparison of methods for direct integration of RE and RP Sr. ISSUES No.
IPCM [12, 13]
SHAPE NURBS HOMOTOPY ERROR BASED BASED [8, 9] [10] [6, 7]
1 2
No No
No Yes
Yes Yes
No No
No
No
Yes
No
Yes
No
No
Yes
No
Yes
Yes
–
No
Yes
No
Yes
Yes No
Yes No
No Yes
No Yes
Less
More
–
Less
3 4
5 6
7 8
9
Surface fitting Adaptive slicing available Cusp height related File size reduction applied Multiple contours Point cloud data preprocessing required Polygon contour Curvature information used Time for calculation of contour file
In the third route, slice data as required for an RP process can be directly generated from point cloud data. The third route of direct integration of reverse engineering and rapid prototyping is promising as it removes intermediate steps such as surface fitting from point cloud data and STL file generation. Errors introduced due to surface fitting and triangulations are eliminated and also there is no need for use of software for STL file repair. From the above discussion it is clear that out of the three routes for RE and RP integration, the third route has more potential for RP applications as the sliced layer data (CLI or SLC) file is directly generated from point cloud data. Realizing this, some research attempts towards direct integration of RE and RP have been made by researchers in the past. Lee and Woo [6, 7] have tried to interface RE with RP by reducing point cloud data. They extracted points where sharp curvature change occurs and by using a concept of point Fig. 1 Hypothetical middle plane of a region with square grid to implement the concept of digital image technology [12, 13]
extraction ratio, point data is divided into sub-regions. They used homotopy method to generate contours. Wu et al. [8] and Zhang et al. [9] developed an iterative algorithm to integrate RE and RP. They defined shape factor, which is maximum distance between points and best-fit polygon when projected on middle plane. Depending on calculated shape error, thickness of the layer is increased or decreased by a small dimension. Zhongwei [10] tried to integrate RE and RP on the basis of the properties of the NURBS surfaces. In his algorithm, point cloud data is segmented into different region based on curvature and NURBS are fitted to each region by using the centripetal method. Thickness of adaptive slices in his work has been calculated by the algorithm reported by Kulkarni and Dutta [11]. Liu et al. [12, 13] developed a method to integrate RE and RP by constructing an intermediate point based curve model (IPCM). Unlike more commonly used triangular mesh model, IPCM is a novel point based curve model, which is simple and computationally efficient [13]. To construct IPCM the point cloud data is first reduced by an approach similar to digital image technology and modified by applying maximum distance error method. IPCM is thus constructed and sliced by applying regular slicing methods of constant thickness slices. This involves finding intersection of slice plane and lines in IPCM model. The method generates direct layer file (CLI or SLC) from point data. Comparison of four major approaches reported in the literature for direct integration of RE and RP is shown in Table 1. These are shape error method by Wu et al. [8] and Zhang et al. [9], NURBS based adaptive slicing method by Zhongwei [10], Homotopy based method by Lee and Woo [6, 7] and IPCM method by Liu et al. [12, 13]. From this comparison, it is found that IPCM method proposed by Liu et al. [12, 13] is the most promising one due to the following reasons. – –
Many time consuming steps of point cloud data preprocessing is avoided in this method. It neither uses NURBS based representation nor higher order information like curvature as used in the method proposed by Zhongwei [10]. Distance 'd' White point (value=0)
Black point (value=1)
Digital plane
Int J Adv Manuf Technol
N 3 (P )
N 2 (P )
N 1 (P )
N 4 (P )
Point (P)
N 0 (P )
N 5 (P )
N 6 (P )
N 7 (P )
Fig. 2 Point P and its neighbours
– –
File size reduction is a part of the process that reduces computational time particularly in data captured from non-contact methods. It is not an iterative method like the other three methods and is found to be computationally efficient.
However the IPCM method has two major limitations. The IPCM method proposed by Liu et al. [12, 13] produces constant thickness slices. An adaptive slicing based on IPCM would be an advantage for getting parts in less time without compromising on quality. Another major limitation is that their method can handle objects where sliced layers consist of single contour layers. This restricts the use of method to only a small class of objects. In the present work an attempt is made to overcome these limitations by coming up with an improved method based on IPCM for direct integration of reverse engineering and rapid prototyping. Three case studies are presented here to show the capabilities of the developed system.
non-contact methods, it is often thinned before moving to further steps. This step saves overall processing time. In the present work, point cloud data is captured by using a CMM and is stored in ASCII format (text mode) for further processing. Point data in this work is reduced or thinned by using digital image technology proposed by Liu et al. [12, 13] after dividing into a number of regions and then subregions. The details of each step are described below. 2.1 Division of point cloud data into regions and sub-regions Point cloud data obtained by CMM in this work is first divided into a number of regions depending on the curvature of surfaces. The number of divisions is taken as a user input in the present work. All points in the region are projected on to a middle plane (called digital plane) and distance (‘d’) between point and middle plane is calculated as shown in Fig. 1. Average projection error is then calculated by using the expression [12, 13] 1 1 X 2 2 average subdivision error ¼ ðd Þ ð1Þ n where n is total number of points in that region. If this calculated average subdivision error is greater than user specified subdivision error then this region is divided into two equal parts or sub-regions and the procedure is repeated.
2 Intermediate point curve model 2.2 Reduction of point cloud data within a sub-region Construction of intermediate point curve model (IPCM) as proposed by Liu et al. [12, 13] consists of many steps. These steps are described in brief in this section for the sake of completeness. The process starts with collection of points from an artifact to be reverse engineered. This can be done by either a contact method like coordinate measuring machine (CMM) or non-contact methods. As point cloud data is usually very dense, particularly that obtained by Fig. 3 Standard templates of digital image technology used for deletion of points is a subregion [4, 9]
224 0 0 0 P 1 1 97 0 0 0 P 1 1 227 0 0 0 P 1 1 225 0 0 0 P 1 1
0 0 1 0 1 0 1 1 1 0 1 1
56 1 0 1 P 1 0 67 0 0 0 P 0 1 248 1 0 1 P 1 1 120 1 0 1 P 1 1
0 0 0 1 1 0 0 0 1 0 0 0
14 1 1 0 P 0 0 208 0 0 1 P 0 1 62 1 1 1 P 1 0 30 1 1 1 P 0 0
Dense point data in a sub-region is reduced by using the concept of digital image technology. Here, a grid like structure at the centre of sub region known as the digital plane is first considered and all points in that sub region are projected on that plane (Fig. 1). If projected points intersect with grid-square then it is assigned a value ‘1’ (black point) otherwise ‘0’ (white point) as shown in Fig. 1. Each point
1 0 0 0 0 1 1 0 0 1 0 0
131 0 0 0 P 0 0 88 1 0 1 P 0 1 143 1 1 0 P 0 0 15 1 1 0 P 0 0
1 1 1 0 0 0 1 1 1 1 1 0
193 0 0 0 P 0 1 52 0 1 1 P 1 0 195 0 0 0 P 0 1
0 1 1 0 0 0 1 1 1
112 0 0 1 P 1 1 22 0 1 1 P 0 0 240 0 0 1 P 1 1
0 0 0 1 0 0 0 0 1
28 1 1 1 P 0 0 13 1 1 0 P 0 0 60 1 1 1 P 1 0
0 0 0 0 1 0 0 0 0
7 0 1 0 P 0 0 133 0 1 0 P 0 0 135 0 1 0 P 0 0
1 1 0 0 1 1 1 1 1
Int J Adv Manuf Technol Fig. 4 Maximum distance calculation and re-consideration of feature points [12, 13]
3D skeletal curve White digital square of value 0
Black digital square of value 1
Digital plane
a
3D skeletal curve
Pk
Pi-1
Pi+1 Pi
b in the digital plane has value either 1 or 0 and is surrounded by eight neighbours (Fig. 2). These neighbours for a point P are numbered from 0 to 7 as per the scheme given in Fig. 2. It can be seen from Fig. 2 that P is a point of concern and Ni(P) are the neighbours which have value ‘1’ if it is black point and value ‘0’ if it is a white point. The neighbourhood of the point is identified by a number, which is calculated as follows [4, 9]. Bð PÞ ¼
7 X
Ni ð PÞ 2i
maximum distance calculation
Fig. 3 proposed by Chen et al. [4] and Zhang et al. [9]. If the number is equal to any of the 28 numbers, the point P is deleted. This procedure is repeated for all the points of a sub-region and point data reduction is obtained. In this step, a point which is deleted from a sub-region is stored in a different file as it may be needed for feature preservation during the next step of processing.
ð2Þ
i¼0
Build orientation ‘θ’ computation from IPCM
Angle θ
This obtained number B(P) is then compared with the standard template of digital image technology as shown in
R1
R2 R3 R4 R5
R3 R4 R5
R2 R1
R3 R2 R1
R4 R5
R5
R4 R3 R2 R1
Fig. 5 Scheme for construction of IPCM among different sub-regions R1 to R5
Slicing plane
Slicing direction Line segment of IPCM
Fig. 6 Build orientation ‘θ’ computation from IPCM
Int J Adv Manuf Technol Fig. 7 Problem associated in finding multiple contours by nearest neighbour method
2.3 Restoring feature points Feature points are restored by using maximum distance error method that might be ignored by the previous step, i.e. application of digital image technology for reduction of number of points. A three-dimensional skeletal curve is generated by using 3D points in a sub-region. If more than one point in a sub-region is related to the same grid then the centre of the grid is considered rather than points. Example of one such skeletal curve is given in Fig. 4(a). This skeletal curve is used to cover approximate shape of object. Therefore to consider most co-related points maximum distance error method is used in the present work [12, 13] and is implemented as follows. Suppose Pk is one of the rest points and Pi is the most correlated point to this point in the skeletal curve. In this algorithm minimum distance between point Pk and the line segments Pi-1Pi and PiPi+1 is calculated as shown in Fig. 4(b). The larger of the two distances is then compared with maximum distance error presubscribed by the user. If the larger distance is less than maximum prescribed distance error then point Pk is considered as a co-related point to skeletal curve and it is added as a feature points to sub-region.
these two points is more than a certain limit (user input) then nearest point in the next sub-region, i.e. R3 is found. To construct IPCM these points are joined by straight-line segments. This procedure is continued till the points in the last sub-region, i.e. R5 is achieved. Once the point in the last sub-region is achieved, IPCM construction is done in reverse direction. The reversed growing of IPCM is started from end or last sub-region, i.e. R5 and continued in the direction R4, R3, R2, R1 as mentioned above. This procedure is continued till all the feature points are completed.
3 Generation of slices In the previous section construction of IPCM from point cloud data has been discussed. Generation of slice geometries from IPCM is described in the present section. As discussed earlier, in generation of slice geometries, adaptive slicing has been introduced and our approach is able to generate slices having multiple contours.
2.4 Construction of IPCM Internal contour
IPCM construction is done with the help of points retained after restoring the feature points in a sub-region as described in the previous section. In IPCM construction straight lines are joined from a point of one sub-region to closest point of next sub-region and so on. It is continuously growing process from one sub-region to another subregion. This process consists of two stages, first in the slicing direction and second in the reverse of the slicing direction. The process of IPCM construction can be well understood from Fig. 5. For example point data is divided into five sub-regions namely R1, R2, R3, R4, and R5 where R1 and R5 are two end regions. The growing IPCM starts from first region, i.e. R1 and continues in the slicing direction, i.e. towards R2 to R5. Point in region R1 is connected to the nearest point (by Euclidian distance) in the following region, i.e. R2. However, if the distance between
a
b
External contour
Internal contour
c Fig. 8 Internal-external and external contour/polygons
Int J Adv Manuf Technol
Fig. 9 Output obtained from the developed system (case study 1: mouse)
3.1 Adaptive slicing In the present work an attempt has been made to implement adaptive slicing for IPCM based integration of RE and RP. Intermediate point curve model has an advantage that it facilitates sliced layer geometries to be computed with ease. This involves finding intersection points for the chosen sliced plane with line segments of IPCM. The intersections results in many coplanar points, which can be traced to find layer geometry. Slice thickness is fixed in the case of conventional slicing. It varies between minimum and
Table 2 Parameters used for execution of adaptive slicing (case study 1) Parameter
Values Used
Subdivision error Minimum no of divisions Grid size Shape tolerance Surface roughness bound
0.5 10 2 mm 0.8 20 μm
Int J Adv Manuf Technol Table 3 Comparison of surface roughness with slice thickness variation for case study 1 Layer thickness (mm)
Number of layers
Maximum surface roughness (μm)
0.1 0.3 0.1-0.3
294 98 103
72.2 158.5 72.2
maximum permissible slice thickness values in the case of adaptive slicing. As evident from literature, adaptive slicing reduces the number of layers to build an object without sacrificing part quality [14, 15]. In other words, it reduces part build times significantly leading to higher productivities in rapid prototyping. Most of the adaptive slicing approaches are based on the consideration of slice edge profiles as rectangular and, limited cusp height is taken as a criterion to decide the slice
Fig. 10 Output obtained from the developed system (case study 2: Cylinder with cylindrical projections)
thickness [14]. Recently Pandey et al. [15] have shown that edges of slices in the case of fused deposition modelling (FDM) are not rectangular but are more like parabola with sharp vertex. They developed a stochastic model for prediction of surface roughness in terms of build orientation and layer thickness. In the present work, adaptive slicing used is based on use of limited surface roughness as a criterion proposed by Pandey et al. [15]. Adaptive layer thickness t is therefore calculated by using the following expression [14, 15] t¼
Ra cos ðq Þ 70:82
ð3Þ
where θ is maximum angle made by those line segments of IPCM, which intersect with slicing plane and slicing direction (Fig. 6) and Ra is user specified maximum limit of surface roughness permitted at any point on the part surface.
Int J Adv Manuf Technol
3.2 Handling multiple contours The present system has the capability to handle complex parts which when sliced yield multiple contour slices. If the object to be reverse engineered is simple which when sliced results in a layer of single contour, geometric computations are rather trivial. The intersection points resulting from intersection of slice plane with IPCM can be traced by nearest neighbour search. This approach seems to work in most of the cases. However, when a part is complex which results in multiple contoured slices, the nearest neighbour approach fails. It results in erroneous contours as shown in Fig. 7. To avoid the above-mentioned problem apart from nearest neighbour search, higher order information like local curvature is also used in the present work to compute slice geometries. In order to compute curvature, a piecewise parametric cubic form of curve is used. A piece-wise parametric cubic curve with continuity requirements can be constructed locally from a set of points obtained by intersection of slice plane with IPCM curves. In multiple contours slicing, deciding the sequence of polygons to generate CLI file is most important because polygon may be internal type or external type as shown in Fig. 11 Output obtained from the developed system (case study 1: Typical toy)
Fig. 8. In multiple polygons, it is necessary that inner and outer polygon must be identified by geometric reasoning. In the present work, different types of polygons are identified and properly numbered as per the scheme suggested by Choi and Samvedam [16] which is also compatible with CLI file format. The numbering of polygon gives a hint about the solid and hollow part between two polygons that belong to the same slice.
4 Results and discussion The proposed method has been used to reverse engineer many simple and complex artifacts. Three representative case studies are presented in this section to demonstrate the capabilities and working of the developed system. At this stage the reader should not confuse the values and selection of various user specified parameters, as the value of various parameters like number of regions, maximum permissible sub-division error, maximum permissible distance error, minimum distance value used while constructing IPCM and contours etc. are chosen suitably by the user and many trials are required to capture the
Int J Adv Manuf Technol
actual shape and various features of a part as the actual part is readily available with user. 4.1 Case study 1: mouse A computer mouse is selected as a first example part for reverse engineering. It is a typical part having a free-form surface. The point cloud data for this part was obtained on a CMM. A total of 5260 points have been obtained from the surface of mouse, which is shown in Fig. 9(a). Obtained point data is divided into 13 sub-regions by using subdivision error as 0.5 units in the slicing direction as shown in Fig. 9(a). Using a grid size of 2 mm, the point cloud data is reduced to 426 points by the data reduction method discussed earlier. The point cloud data after reduction can be seen in Fig. 9(b). As the points obtained after reduction may be small in number for capturing possible design intent, the maximum distance error method is applied to increase the number of points in point data in order to preserve key feature points. In this case maximum distance error method increases the number of points from 426 to 3010 as shown in Fig. 9(c). An IPCM for this set of points is constructed which is depicted in Fig. 9(d). IPCM model is sliced to get sliced data in common layer interface (CLI) format, which is used to drive an RP machine for part fabrication. The sliced model of the part and fabricated model of the part on RP machine are shown in Fig. 9(e) and (f), respectively. Various parameters used to execute the developed system of reverse engineering and rapid prototyping integration for mouse type of part are given in Table 2. In any RP process, slice thickness influences both part build time and surface quality of the fabricated part [14, 15]. In order to study the effect of slice thickness on maximum surface roughness and number of layers, experiments were carried out with layers of different slice thickness. The results of adaptive slicing are presented in Table 3 as well as depicted pictorially in Fig. 9(g). Table 3 shows number of layers for three cases of constant thickness slices of 0.1 mm, constant thickness slices of 0.3 mm and adaptive slicing in 0.1-0.3 mm thickness range. Substantial reduction in number of slices due to adaptive slicing is evident from the results presented in Table 3. 4.2 Case study 2: cylinder with two cylindrical projections In the second example a part, which yields multiple contour slices, is considered for reverse engineering. A total of 6969 points were obtained by scanning the object (Fig. 10(a)). The point data is divided into 21 sub-regions by using subdivision error as 0.3 and using Z-direction as a slicing
direction. The obtained graphical output showing various sub-regions can be seen in Fig. 10(a). Figure 10(b) and (c) show intermediate phases of reverse engineering process and IPCM for the part is shown in Fig. 10(d). Figure 10(e) shows sliced model for the part. Regions A and B shown in Fig. 10(d) and (e) respectively are defects in IPCM and sliced model and this happens due to poor selection of parameters during the data reduction phase. This is important as the process of data reduction done inappropriately may also lead to loosing small part features. Figure 10(f) shows the part fabricated by RP after reverse engineering process. 4.3 Case study 3: a toy with complex features Our experience shows that reverse engineering is a widely used process in the toy industry. A toy with many complex features is selected for reverse engineering. This part has external-external as well as external-internal types of contours. This part has been captured by 49,756 data points and point cloud data is shown in Fig. 11. Obtained point data is divided into 43 sub-regions by using subdivision error as 0.5. Graphical outputs of reverse engineering of this part are given in Fig. 11. It can be seen from Fig. 11, that the developed system is able to handle complex features present on a product. In this method, capturing of point cloud data and selection of values of various parameters like subdivision error, number of divisions, grid size and shape tolerance are important as the obtained IPCM is sensitive to it. Here complexity of features does not matter but the capability of the scanning technique as well as the selection of abovementioned parameters is important. Sometimes in more complex parts one has to take many trials to determine proper values of parameters and to arrive at accurate IPCM and then sliced model. Facility of editing IPCM on computer screen may reduce these trials and work is progressing to achieve the same.
5 Conclusions In this work integration of reverse engineering and rapid prototyping has been demonstrated successfully by an enhanced method based on intermediate point curve model (IPCM). The enhancements were in terms of adaptive slicing based on surface roughness model [15] and ability to reverse engineer parts with multiple contour slices. The system is implemented using standard engineering tool, i.e. MATLAB 7.0. The developed system uses graphical user interface (GUI), which is convenient to use, and user friendly. The proposed system has been tested on simple to complex objects.
Int J Adv Manuf Technol
References 1. Varady T, Martin RR, Cox J (1997) Reverse engineering of geometric models: an introduction. Comput Aided Des 29:255–268 2. Schoene C, Hofmann J (1997) Reverse engineering based on multi-axis digitized data. International Conference on Manufacturing Automation, pp 909–914 3. Vail NK, Wilke W, Bieder H, Junemann G (1996) Interfacing reverse engineering data to rapid prototyping. Solid Freeform Fabrication Proc, pp 481–490 4. Chen YH, Ng CT, Wang YZ (1999) Data reduction in integrated reverse engineering and rapid prototyping. Int J Comput Integr Manuf 12:97–103 5. Kai CC, Fai LK (1997) Rapid prototyping: principles and applications in manufacturing. Wiley, Singapore 6. Lee KH, Woo H (2000) Direct integration of reverse engineering and rapid prototyping. Comput Ind Eng 38:21–38 7. Lee KH, Woo H (1998) Use of reverse engineering method for rapid product development. Comput Ind Eng 35:21–24 8. Wu YF, Wong YS, Loh HT, Zhang YF (2004) Modeling cloud data using an adaptive slicing approach. Comput Aided Des 36:231–240
9. Zhang YF, Wong YS, Loh HT, Wu YF (2003) An adaptive slicing approach to modeling cloud data for rapid prototyping. J Mater Process technology 140:105–109 10. Zhongwei Y (2004) Direct integration of reverse engineering and rapid prototyping based on properties of NURBS or B-spline. Precis Eng 28:293–301 11. Kulkarni P, Dutta D (1996) An accurate slicing procedure for layered manufacturing. Comput Aided Des 28:683–697 12. Liu GH, Wong YS, Zhang YF, Loh HT (2003) Modeling cloud data for prototype manufacturing. J Mat Process Technol 138:53– 57 13. Liu GH, Wong YS, Zhang YF, Loh HT (2002) Error based segmentation of cloud data for direct rapid prototyping. Comput Aided Des 35:633–645 14. Pandey PM, Reddy NV, Dhande SG (2003) Slicing procedures in layered manufacturing: a review. Rapid Prototyp J 9(5):274– 288 15. Pandey PM, Reddy NV, Dhande SG (2003) Real time adaptive slicing for fused deposition modeling. Int J Mach Tools Manuf 43 (5):61–71 16. Choi SH, Samvedam S (2001) Visualization of rapid prototyping. Rapid Prototyp J 7(2):99–114