Open Access
This article is

- freely available
- re-usable

*Educ. Sci.*
**2018**,
*8*(3),
151;
https://doi.org/10.3390/educsci8030151

Article

Tutorials for Integrating CAD/CAM in Engineering Curricula

^{1}

Faculty of Engineering, Kitami Institute of Technology, Kitami 090-8507, Japan

^{2}

College of Engineering, United Arab Emirates University, Al Ain 15551, UAE

^{*}

Authors to whom correspondence should be addressed.

Received: 23 August 2018 / Accepted: 14 September 2018 / Published: 19 September 2018

## Abstract

**:**

This article addresses the issue of educating engineering students with the knowledge and skills of Computer-Aided Design and Manufacturing (CAD/CAM). In particular, three carefully designed tutorials—cutting tool offsetting, tool-path generation for freeform surfaces, and the integration of advanced machine tools (e.g., hexapod-based machine tools) with solid modeling—are described. The tutorials help students gain an in-depth understanding of how the CAD/CAM-relevant hardware devices and software packages work in real-life settings. At the same time, the tutorials help students achieve the following educational outcomes: (1) an ability to apply the knowledge of mathematics, science, and engineering; (2) an ability to design a system, component, or process to meet the desired needs, (3) an ability to identify, formulate, and solve engineering problems; and (4) an ability to use the techniques, skills, and modern engineering tools that are necessary for engineering practice. The tutorials can be modified for incorporating other contemporary issues (e.g., additive manufacturing, reverse engineering, and sustainable manufacturing), which can be delved into as a natural extension of this study.

Keywords:

engineering education; CAD/CAM; digital engineering; accreditation## 1. Introduction

Manufacturing is a wealth-generating activity, and, thereby helps ensure the economic well-being of a country. Nowadays, computer-aided hardware devices (e.g., Computer Numerically Controlled (CNC) machine tools, three-dimensional (3D) printers, robots, programmable logic controller, 3D scanners, Coordinate Measuring Machines, computerized assembly lines, and alike) and software packages for solid modeling (e.g., 3D Computer-Aided Design (CAD) and Computer-Aided Manufacturing (CAM) packages) are extensively used to perform the activities related to product life cycle (conceptualize, design, manufacture, assemble, distribute, use, maintain, and recycle). Therefore, the individuals who can design, analyze, use, and maintain the hardware devices and software packages mentioned above are essential for the economic growth of a country (in this article, the above-mentioned devices and software packages are collectively referred to as CAD/CAM). As such, higher education institutes all over the world need to educate students with the knowledge and skills of CAD/CAM and other relevant issues for meeting industry needs [1,2,3]. Thus, engineering degree programs all over the world offer courses related to CAD/CAM [4]. Similar to the courses where the students learn engineering science (e.g., [5]), a technology-oriented course also needs customized methods and tools for the educational effectiveness and outcomes assessment (e.g., see the tools developed for the courses related to CAD [6] and courses related to the Internet of Things (IoT) [7]). This is true for the education of CAD/CAM in the academia. Some of the selected articles that deal with the educational aspects of CAD/CAM in academia are described below. Araki [8] and Zhao et al. [9] described the contents to educate learners to use the CAD/CAM packages, which are made available through the multimedia network. deWeck et al. [10] described the students’ activities and their performances while using commercially available CAD/CAM systems and other relevant software packages. The purpose is to provide students with the opportunity to materialize a conceptual design. Ishitsuka et al. [11] described the methodology to teach CAD/CAM using an exercise for creating the CNC program from a given solid model prepared by using the CAD system. Lin et al. [12] described the teaching methodology to integrate CAD with CAM for undergraduate students. Alemzadeh [13] described how to introduce CAD/CAM from the perspective of concurrent design for senior-level engineering students. Kaneko and Kashimoto [14] developed a customized computer-aided tool for educating students with the knowledge and skills of CAD/CAM. Abouelala et al. [15] described a methodology for selecting a CAM package for educating students with the knowledge and skills of CAD/CAM, considering the opinions of the stakeholders. Moschonissiotis and Vosniakos [16] developed a methodology to train individuals with the knowledge and skills of CAD/CAM where a set of structured rules and utilization of these rules in process planning are emphasized for achieving tangible results.

However, consider the issue of the assessment of students’ performance. In this regard, Main and Staines [17] reported that the practical examinations are a more informative and efficacious method for assessing the students’ performance in CAD/CAM. Hamade et al. [18] reported how to evaluate the skills of the senior-level students while building solid models using commercially available CAD packages. In both cases, the learners are the mere users of the available technology. Whether or not the students are aware of how the systems work and why the systems can produce the desired shape or product has not been the issue of the assessments mentioned above. This is perhaps not the goal of the outcomes-oriented education programs recommended by the accreditation bodies (e.g., ABET, http://www.abet.org). The reason is that the educational activities underlie three aspects: namely, idealism, realism, and pragmatism. The idealism and realism prepare an individual to be a “knower”, whereas pragmatism prepares an individual to be “doer” only. Therefore, several outcomes are set so that the student becomes a “knower” and “doer” simultaneously. As far as the ABET-recommended outcomes are concerned, the content of a course (or a series of courses) regarding CAD/CAM should help students attain at least the following four outcomes: (1) an ability to apply the knowledge of mathematics, science, and engineering; (2) an ability to design a system, component, or process to meet the desired needs; (3) an ability to identify, formulate, and solve engineering problems; and (4) an ability to use the techniques, skills, and modern engineering tools necessary for engineering practice. At the same time, the contents must be derived from the fundamental aspects of CAD/CAM, as schematically illustrated in Figure 1. In particular, the region defined by the dotted box in Figure 1 illustrates the central issues underlying CAM. As shown in Figure 1, in CAD/CAM, the CAD data of the object to be manufactured becomes the main input. Based on this input, the user sets the blank and the cutting tool to be used. The user then selects the appropriate tool-paths (morphing, zigzag, and/or contour parallel), the cutting tool parameters (number of cutting edges, tool nose radius, tool length, and/or tool diameter), and cutting operation (rough-cut and or finish cut). Based on the selections that the user made, the CAD/CAM package simulates the tool-paths, showing their effects on the blank. When the simulation result satisfies the user (i.e., a simulation result produces the desired shape), the CAD/CAM package creates the CNC program, i.e., it formats (i.e., post-processes) the cutter locations given by the tool-paths and the cutting conditions (feed rate, cutting velocity, depth of cut, and alike) in a way so that the controller of the CNC machine tool can understand and execute the program. Once the user is satisfied with the program, it can be executed to produce the desired shape or product, as schematically illustrated in Figure 1. The digital measurement technology can be used to report the dimensional and form accuracies, as well as the surface roughness for the sake of quality control.

Based on the above-mentioned description of the educational aspects of CAD/CAM, this article presents three tutorials. Thus, the remainder of this article is organized as follows: Section 2 describes the first tutorial for calculating the tool-path for machining a 2D shape given by a parametric curve. Section 3 describes the second tutorial for determining 3D tool-path for machining a freeform surface, which is given by a parametric surface. Section 4 describes the last tutorial, where one integrates the advanced machine tools (e.g., hexapod-based machine tools) and geometric modeling of freeform surfaces. Section 5 provides the concluding remarks of this study.

## 2. Tutorial for 2D Tool-Path Generation

As shown in Figure 1, one of the major tasks of CAD/CAM is to create the tool-paths. How do the CAD/CAM packages generate the tool-paths? The tutorial that helps a student understand the process of creating the tool-paths can also help achieve the outcomes (1)–(4) as mentioned above. According, this section describes a tutorial for generating a two-dimensional (2D) tool-path. For the sake of better understanding, the parametric curve-based tool offsetting method is used in the tutorial. The description is as follows:

Parametric curves are extensively used to represent a large variety of engineering shapes and parts [19,20]. The following equation defines a parametric curve denoted as C(t).

$$C\left(t\right)={{\displaystyle \sum}}_{i=1}^{n}{P}_{i}\times {B}_{i}\left(t\right)=\left[\mathit{t}\right]\left[\mathit{M}\right]\left[\mathit{G}\right]$$

In Equation (1), P

_{i}is the i-th control point, B_{i}(t) is the blending function associated with P_{i}, and t is the parameter so that $\forall $ t ∈ [0,1]. As such, the matrix that is denoted as [**t**], which is a row matrix, is called the parameter matrix. The matrix that is denoted as [**M**], which is an n × n matrix, is called the shape matrix. The matrix that is denoted as [**G**], which is a column matrix, is called the control point, vertex, or geometric matrix.When one models a shape using a parametric curve as defined in Equation (1), the user must decide the number of control points (n), the set of control points {P

_{i}| i = 1,...,n}, and the blending functions {B_{i}| i = 1,...,n}. The blending functions depend on both the number of control points and the type of parametric curve (e.g., Bezier curve, B-spline, and alike). The number of control points and the type of the parametric curve decide [**M**] and [**t**]. For example, consider the case of a parametric curve called the quadratic B-spline (C_{QB}(t)). The coordinates of the three arbitrary control points (P_{p}_{1}, P_{p}_{2}, and P_{p}_{3}) are needed to construct the [**G**] for C_{QB}(t). Here, the subscript “p” denotes one of the coordinates out of x, y, and z, i.e., p ∈ {x, y, z}. The equation of a coordinate of C_{QBp}(t) is as follows:
$${C}_{QBp}\left(t\right)=\left[\begin{array}{ccc}{t}^{2}& t& 1\end{array}\right]\left[\begin{array}{ccc}0.5& -1& 0.5\\ -1& 1& 0.5\\ 0.5& 0& 0\end{array}\right]\left[\begin{array}{c}{P}_{p1}\\ {P}_{p2}\\ {P}_{p3}\end{array}\right]$$

As such, for a quadratic B-spline, [

**t**] = [t^{2}t 1], [**G**] = [P_{p}_{1}P_{p}_{2}P_{p}_{3}]^{T}, and [**M**] is a 3 × 3 matrix, as shown in Equation (2) between [**t**] and [**G**].If one needs to find out the tangent of C

_{QBp}(t), denoted as C′_{QBp}(t), [**t**] is replaced by a matrix denoted as [**t**]′. The elements of [**t**]′ are the first derivative of the elements of [**t**]. Thus, C′_{QBp}(t) is given as follows:
$${C}_{QBp}^{\prime}\left(t\right)=\left[\begin{array}{ccc}2t& 1& 0\end{array}\right]\left[\begin{array}{ccc}0.5& -1& 0.5\\ -1& 1& 0.5\\ 0.5& 0& 0\end{array}\right]\left[\begin{array}{c}{P}_{p1}\\ {P}_{p2}\\ {P}_{p3}\end{array}\right]$$

An instructor can assign students to construct the equations of other B-spline curves using the concept of shape matrices as well as the tangent vectors. This way, the students learn more intensely how to apply the knowledge of mathematics and science to an engineering problem.

Sometimes, a single quadratic B-spline curve is not good enough to model the entire object (or any other parametric curves in this matter). In this case, the modeling is carried out by using several curves. Suppose that one models a shape using a finite set of B-spline curves that are denoted as ${C}_{j,QBp}\left(t\right)$, j = 1, 2, .... As such, all of the possible pairs of two consecutive curves denoted as ${C}_{j,QBp}\left(t\right)$ and ${C}_{j+1,QBp}\left(t\right)$ are connected in a piecewise manner, fulfilling the C

^{0}and C^{1}continuity [19,20]. This means that the last point of a curve is equal to the first point of the next curve (C^{0}continuity), and the slope at the last point of a curve equal to the slope at the last point of the next curve (C^{1}continuity). Thus, the following proposition must be true in the modeling process:
$$\left({C}_{j,QBp}\left(t=1\right)={C}_{j+1,QBp}\left(t=0\right)\right)\wedge \left({C}_{j,QBp}^{\prime}\left(t=1\right)={C}_{j+1,QBp}^{\prime}\left(t=0\right)\right)$$

The assignments based on the formulation defined in Equation (4) help students achieve the outcomes (2) and (3), i.e., an ability to design a system, component, or process to meet the desired need, and an ability to identify, formulate, and solve engineering problems. It is worth mentioning that the students have the choices of using other parametric curves (e.g., Bezier curves) to model the given object or shape. However, basic concept remains the same, as described above.

In addition, given a 2D parametric curve, as defined by Equation (1), the students can be assigned to derive an offset curve denoted as D(t), as schematically illustrated in Figure 2a. The offset curve becomes the tool-path for machining the shape (i.e., C(t)). The CNC program ensures that the center of the cutting tool follows D(t). Thus, this information is taken as the cutter locations for constructing a CNC program (Figure 1).

Now, for determining D(t), one first needs to determine the normal vector N(t) for each set of two consecutive points on C(t). The distance between C(t) and D(t) is equal to the radius of the cutting tool that is denoted as R. Thus, the expression of the offset curve D(t) is as follows:

$$D\left(t\right)=C\left(t\right)+R\frac{N\left(t\right)}{\Vert N\left(t\right)\Vert}$$

Figure 2b schematically illustrates how one can calculate a point denoted as D(t1) = (D

_{x}(t1), D_{y}(t1))) on the offset curve D(t) using two points denoted as C(t1) = (C_{x}(t1), C_{y}(t1)) and C(t2) = (C_{x}(t2), C_{y}(t2)) so that t1, t2 ∈ [0,1] and t2 = t1 +Δt, where Δt is a very small positive number (e.g., 0.01). Since the line passing through the points D(t1) and C(t1) and the line passing through the points C(t1) and C(t2) are orthogonal to each other, the coordinates of D(t1) can be calculated as follows:
$${D}_{x}\left(t1\right)={C}_{x}\left(t1\right)\pm R\frac{{C}_{y}\left(t2\right)-{C}_{y}\left(t1\right)}{d\left(t1\right)}\text{\hspace{1em}}{D}_{y}\left(t1\right)={C}_{y}\left(t1\right)\mp R\frac{{C}_{x}\left(t2\right)-{C}_{x}\left(t1\right)}{d\left(t1\right)}$$

In Equation (6), d(t1) denotes the distance between the points C(t1) and C(t2), which is calculated as follows:

$$d\left(t1\right)=\sqrt{{\left({C}_{x}\left(t2\right)-{C}_{x}\left(t1\right)\right)}^{2}+{\left({C}_{y}\left(t2\right)-{C}_{y}\left(t1\right)\right)}^{2}}$$

It is worth mentioning that the students need to decide the combinations of the signs (plus–minus or minus–plus) to use the Equation (6). The combination depends on the orientations of the points denoted as C(t1) and C(t2) (i.e., clockwise or anticlockwise direction). The case shown in Figure 2b results in a clockwise direction. For this case, the combination of signs is minus and plus for calculating D

_{x}(t1) and D_{y}(t1), respectively. At the same time, the student may recall the vector algebra while validating Equation (6), particularly the concepts of unit vector, vector dot product, direction cosine, and alike.As an exercise, the students can consider the airfoil shape shown in Figure 3. The instructor can introduce the shape to the students by plotting it on a graph paper, as shown in Figure 3. Later, the students can manufacture the part, as shown in Figure 4. In this case, the students first create the CNC program and use it for machining the part using a CNC machine tool (Figure 1). The students can be given two options to do this, as described below.

In the first option, the students reconstruct the shape shown in Figure 3 using a CAD software and input the CAD data to a CAD/CAM software for generating the CNC program. In this case, the performance of the students can be determined by an output, as shown in Figure 5. This is the screenprint of the tool-path generated by commercially available software (MasterCAM

^{TM}) from the CAD data of the shape that is shown in Figure 3. This type of learning ensures that the students can use the techniques, skills, and modern engineering tools that are necessary for engineering practice. However, the students’ ability to apply the mathematical and engineering science knowledge gained in other courses cannot be tested or enhanced by using such an exercise. Thus, the students should be given the other option to create the tool-path by applying Equations (1)–(7). The emphasis should be given to both how to model the shapes using some piecewise B-spline curves, and then to create the offset curve D(t). The students should create the CNC program, too, using the information of offset curve D(t). The screenprint shown in Figure 6 shows one of the expected achievements of the students. The CNC program can be observed in Figure 6. Comparing the results obtained from the commercial CAD/CAM package (Figure 5) and the spreadsheet-based analytical approach (Figure 6), the instructor can evaluate the performance of the students and explain other issues (e.g., how the tool should approach the blank for the first time, how the tool should exit once the countering is done, how to optimize the cutting conditions, how to select the optimal cutting tool, and alike).## 3. Tutorial for 3D Tool-Path Generation

This section describes a tutorial for 3D tool-path generation. This is an advanced topic compared to the previous one. The 3D tool-paths are an integral part of modern manufacturing, because freeform parametric surfaces are extensively used to model a large variety of shapes [19,20]. For constructing a freeform surface, a surface patch is generated from the product of two sets of parametric curves for two parameters, u and v. Therefore, the equation of a freeform parametric surface denoted as C(u,v) is as follows:

$$C\left(u,v\right)={{\displaystyle \sum}}_{i=1}^{n}{{\displaystyle \sum}}_{k=1}^{m}{P}_{ik}\text{}{B}_{ik}\left(u\right){B}_{ik}\left(v\right)\text{\hspace{1em}}u,v\in \left[0,1\right]$$

In Equation (8), P

_{ik}are the control points or vertices, and B_{ik}(u) and B_{ik}(v) are the blending functions. The expression of C(u,v) in matrix form is as follows:
$$C\left(u,v\right)=\left[\mathit{u}\right]\left[\mathit{M}\right]\left[\mathit{P}\right]{\left[\mathit{M}\right]}^{T}\left[\mathit{v}\right]$$

In Equation (9), [

**u**] is a row vector having n elements, [**M**] is an n × m shape vector, [**P**] is an n × m vector of one of the coordinates of the control points, and [**v**] is a column vector having m elements.For a cubic Bezier surface [19,20], the freeform surface denoted as ${C}_{CB}\left(u,v\right)$ is given by the following equation:

$${C}_{CB}\left(u,v\right)=\left[{u}^{3}\text{}{u}^{2}\text{}u\text{}1\right]{\left[\mathit{M}\right]}_{CB}{\left[\mathit{P}\right]}_{CB}{\left[\mathit{M}\right]}_{CB}^{T}{\left[{v}^{3}\text{}{v}^{2}\text{}v\text{}1\right]}^{T}$$

In Equation (10), the shape matrix ${\left[\mathit{M}\right]}_{CB}$ is given as follows:

$${\left[\mathit{M}\right]}_{CB}=\left[\begin{array}{cccc}-1& 3& -3& 1\\ 3& -6& 3& 0\\ -3& 3& 0& 0\\ 1& 0& 0& 0\end{array}\right]$$

Now, the question is: how to create the tool-path to machine a surface similar to the one defined in Equation (10)? The machining of the surfaces similar to the one defined in Equation (10) is often done by using a ball-nose end-mill cutter, as schematically illustrated in Figure 7. The center of the ball-nose moves along an offset surface denoted as D(u,v) (Figure 7). As shown in Figure 7, generating the offset surface D(u,v) means that each point on C(u,v) is mapped into its corresponding point on D(u,v) by shifting it along the normal direction of N(u,v). This requires two tangential vectors that intersect at the point, as shown in Figure 7. Thus, the expressions of the tangent vectors in the u and v directions, respectively, are as follows:

$${C}_{u}^{\prime}\left(u,v\right)=\frac{\partial C\left(u,v\right)}{\partial u}$$

$${C}_{v}^{\prime}\left(u,v\right)=\frac{\partial C\left(u,v\right)}{\partial v}$$

The normal vector N(u,v) is thus obtained from the cross-product of the two tangential vectors resulting in the following expression:

$$N\left(u,v\right)={C}_{v}^{\prime}\left(u,v\right)\times {C}_{u}^{\prime}\left(u,v\right)$$

Once the normal direction is determined, the offset surface is determined similarly to the previous case, which is as follows:

$$D\left(u,v\right)=C\left(u,v\right)+R\text{\hspace{0.17em}}\frac{N\left(u,v\right)}{\Vert N\left(u,v\right)\Vert}$$

In Equation (15), R is the radius of the ball-nose of the end-mill cutter.

To exercise the above-mentioned offsetting technique for freeform surfaces, the students can use a programming tool to generate the codes required for the CNC program. Appendix A shows the required program written in MATLAB

^{TM}in terms of two functions. The function shown in Figure A1 creates the offset surface from the given Bezier surface in accordance with Equations (10)–(15). It also plots the Bezier and offset surfaces. On the other hand, the function shown in Figure A2 is used for generating the codes (G-codes) for the CNC programming. It writes the code to a text file, which can be edited based on the requirement of the given CNC controller. Needless to say, the function shown in Figure A2 takes the necessary outputs from the function shown in Figure A1.Figure 8 and Figure 9 show the expected outcomes of the tutorial. In particular, Figure 8 shows the given and offset surfaces, which is the output of the function shown in Figure A1. For this case, the coordinates of the control points are shown below in the form of matrices.

$$\left[{P}_{x}\right]=\left[\begin{array}{cccc}0& 20& 40& 60\\ 0& 20& 40& 60\\ 0& 20& 40& 60\\ 0& 20& 40& 60\end{array}\right]\text{}\mathrm{mm},\text{}\left[{P}_{y}\right]=\left[\begin{array}{cccc}0& 0& 0& 0\\ 20& 20& 20& 20\\ 40& 40& 40& 40\\ 60& 60& 60& 60\end{array}\right]\text{}\mathrm{mm},\text{}\left[{P}_{z}\right]=\left[\begin{array}{cccc}0& -15& -15& 0\\ 0& 0& 0& 0\\ -10& 0& 0& -10\\ -10& 10& -10& 0\end{array}\right]\text{}\mathrm{mm}$$

Figure 9 shows the freeform surface manufactured by using a three-axis CNC machine tool (Figure 1). The sharp marks seen on the manufactured freeform surface are the tool-path marks. This is due to the coarseness of the increment of u and v (the increment was 0.05) and tool diameter (offsetting for a 4-mm radius of the ball-nose end-mill cutter). The students can be assigned to make necessary changes in the formulation to reduce the sharpness of the marks. Similar to the previous tutorial, the students can achieve all of the outcomes (the outcomes denoted as (1)–(4)) mentioned above by solving the problems underlying this assignment.

## 4. Programming Advanced Machine Tools

The previous two tutorials are meant for educating students with the knowledge and skills of CAD/CAM technology using conventional machine tools with a serial kinematics structure. This is not the end. The field is evolving very fast. From this perspective, the advances in the CNC machine tools can be considered. In particular, as a replacement of the conventional CNC machine tools (having a serial kinematics structure), researchers have been studying the CNC machine tools that have parallel and hybrid kinematics structures [21,22]. These machine tools are more economical, light, and functional compared to the conventional ones. Moreover, in the near future, these machine tools are expected to play their role in manufacturing.

The previous two tutorials are meant for educating students with the knowledge and skills of CAD/CAM technology that can be implemented using the conventional machine tools. Note that the conventional machine tools have a serial kinematics structure. These machine tools are by nature heavy and less economical. However, researchers have been studying a new type of CNC machine tools that have parallel or hybrid kinematics structures [21,22]. These machine tools are more economical, light (portable), and functional compared to the conventional ones, and thereby are expected to play their roles in the near future. Therefore, the students majoring in manufacturing, mechatronics, and robotics are likely to engage in scholarly activities where the parallel and hybrid kinematics’ structure-driven machine tools are conceptualized, analyzed, designed, and implemented. As a result, the relevant senior-level undergraduate and graduate-level courses must prepare the students with the knowledge and skills of parallel and hybrid kinematics structures. Based on this contemplation, this section presents a tutorial that is meant for educating interested students with the knowledge of how to program a parallel kinematics machine tools for machining a 3D shape. The description of the tutorial is as follows:

Consider CNC machine tools [21] that have parallel kinematics structures, as shown in Figure 10. As seen in Figure 10, the cutting motion is controlled by six extendable linear actuators that carry the cutting tool platform. See Harib et al. [21] for more detail on the kinematics analysis and the trajectory planning. However, for the i-th actuator, the extension l

_{i}is computed as follows:
$${l}_{i}=\Vert \left[\begin{array}{c}X\\ Y\\ Z\end{array}\right]+\left[\begin{array}{ccc}{c}^{2}A+cB\text{\hspace{0.17em}}{s}^{2}A& sA\text{\hspace{0.17em}}cA-cB\text{\hspace{0.17em}}sA\text{\hspace{0.17em}}cA& sB\text{\hspace{0.17em}}sA\\ cA\text{\hspace{0.17em}}sA-cB\text{\hspace{0.17em}}cA\text{\hspace{0.17em}}sA& {s}^{2}A+cB\text{\hspace{0.17em}}{c}^{2}A& -sB\text{\hspace{0.17em}}cA\\ -sA\text{\hspace{0.17em}}sB& cA\text{\hspace{0.17em}}sB& cB\end{array}\right]\text{\hspace{0.17em}}\left[\begin{array}{c}{x}_{ai}\\ {y}_{ai}\\ {z}_{ai}\end{array}\right]-\left[\begin{array}{c}{X}_{bi}\\ {Y}_{bi}\\ {Z}_{bi}\end{array}\right]\Vert $$

In Equation (16), s and c denote the sine and cosine functions, respectively; (X

_{bi}, Y_{bi}, Z_{bi})^{T}is the constant position vector of the i-th attachment point b_{i}with respect to the world coordinate frame W; (x_{ai}, y_{ai}, z_{ai})^{T}is the constant position vector of the i-th attachment point a_{i}with respect to the cutting tool coordinate frame C; (X, Y, Z)^{T}is the position vector of the tip of the cutting tool with respect to W; and A and B are the angles that define the orientation of the cutting tool with respect to W; A is the horizontal rotation of the vertical plane that contains the cutting tool axis, and B is the tilting angle of the cutting tool inside that plane.To machine a freeform surface similar to the one described in the previous section, the following procedure can be used.

Step 1: Calculate X, Y, and Z from the three coordinates of the parametric surface C(u,v).

Step 2: Calculate the normal vector N(u,v) according to Equation (14).

Step 3: Calculate the unit vector along the cutting tool n(u,v) as follows:

$$n(u,v)=\frac{N(u,v)}{\Vert N(u,v)\Vert}$$

The third column of the rotation matrix in Equation (16) is the unit vector along the axis of the cutting tool. This means that:

$$n(u,v)={\left[\begin{array}{ccc}{n}_{x}& {n}_{y}& {n}_{z}\end{array}\right]}^{T}={\left[\begin{array}{ccc}sBsA& -sBcA& cB\end{array}\right]}^{T}$$

Step 4: Determine A and B, as follows:

$$A={\mathrm{tan}}^{-1}\left(\frac{{n}_{x}}{\sqrt{{n}_{x}^{2}+{n}_{y}^{2}}},\text{\hspace{0.17em}}\frac{-{n}_{u}}{\sqrt{{n}_{x}^{2}+{n}_{y}^{2}}}\right)$$

$$B={\mathrm{tan}}^{-1}\left(\sqrt{{n}_{x}^{2}+{n}_{y}^{2}},\text{\hspace{0.17em}}{n}_{z}\right)$$

It is worth mentioning that if the students use a package of five-axis milling, they will be able to determine (X,Y,Z,A,B) without any effort provided that a flat-end mill is used in the programming. However, if the students follow the above steps, they realize the whole process without any support of a commercial package. This way, the students having more advanced analytical abilities in CAD/CAM can be nurtured.

## 5. Concluding Remarks

The authors have been offering CAD/CAM and related courses for a long time for both undergraduate and graduate students of engineering degree programs. The authors have been observing that if the commercial packages are used for creating the tool-paths automatically, the students can gain the application ability, but they fail to gain the analytical ability, i.e., they become doers, but not knowers. On the contrary, the students can achieve the same using the presented tutorials where they do not need to use any dedicated CAD/CAM packages. This means that the presented tutorials contribute positively to the objective of strengthening students’ ability to apply the knowledge of mathematics and engineering science, making students both doers and knowers together. Students also learn that designing a shape using CAD software is not everything. If the design is not converged to a CNC program, the materialization of the shape does not occur. This way, the students become aware of the activities of a product life cycle more intensely, which should be the case from the perspective of their future employers. In the presented tutorials, the students are introduced to the concept of parametric curves and surfaces. This improves their knowledge of dealing with the shapes having complex geometry. In addition, the students are exposed to hexapod-based machine tools. This makes the students aware of the CNC technology advancing rapidly. Therefore, it is essential for the students to understand which module of a system of CAM (or CAD) affects the operations of such machine tools from the perspective of the structure of a machine tool, as well as from the perspective of the shapes of the parts to be manufactured. Moreover, in the presented tutorials, the students get the opportunity to use standard computing and visualizing tools (e.g., Excel

^{TM}and MATLAB^{TM}). This makes them competent enough while using these tools in other courses, too. However, the instructors or the students have the freedom to use any computing platform and programming languages they prefer, although the descriptions here show the usages of spreadsheet and MATLAB^{TM}coding. Having said that, it is not meant that the mathematical formulations presented in this article should not be obeyed. The first two tutorials can be offered to the senior-level undergraduate students enrolled in mechanical, manufacturing, and industrial engineering degree programs, whereas the other tutorial is recommended for the students who want to design mechatronics devices. While offering the tutorials, the authors recommend the approach called thematic integration or problem-based learning (PBL). In the case of thematic integration, the instructor may offer the tutorial in line with the contents of other courses (e.g., engineering design or mechanics course), so that the geometric shapes used in the other relevant course can be used in the proposed tutorials. While offering the tutorials as PBL, the students should be given a chance to form a team. The team then sets the objectives and outcomes based on the contents of the tutorials. Finally, the students present their teamwork for the evaluation.Nevertheless, the presented tutorials can be modified by incorporating more outcomes (e.g., contemporary issues, teamwork, ethics, and alike) and the contents that are needed for mastering the digital manufacturing technology. Particularly, the issue of functioning effectively in a multidisciplinary team, and being aware of the professional and ethical responsibility, can also easily be accommodated more explicitly with the presented tutorials if the relevant degree program needs it. Similarly, the tutorials can easily be modified to accommodate the issues of sustainability and sustainable manufacturing [23], reverse engineering [24], design for additive manufacturing of complex shapes [25], and e-making [26]. At the same time, the issues of meaningful learning using a set of concept maps [27] can be considered. It is worth mentioning that concept maps [27] can represent the contents of the tutorials described in the article, and the students can even access them using their cell phones [4]. Since the concepts underlying any topic of manufacturing are ultimately linked to the universal concept maps, namely, the sustainability universe, the control universe, the material universe, the precision universe, and the process universe [4], one must be careful about this linkage while representing the tutorials using a set of concept maps. Otherwise, the desired learning objectives may not be materialized.

## Author Contributions

Both authors, A.S.U. and K.H.H., equally contributed in all sections of this article.

## Funding

This research received no external funding.

## Conflicts of Interest

The authors declare no conflict of interest.

## Appendix A

This Appendix shows the MATLAB

^{TM}codes needed for creating the offset surface from a cubic Bezier surface as defined in Section 3 and the relevant CNC programming. In particular, Figure A1 shows the MATLAB^{TM}codes for tool offsetting of a Bezier freeform surface, whereas Figure A2 shows the MATLAB^{TM}codes for CNC programming for machining the Bezier freeform surface.**Figure A2.**The MATLAB

^{TM}codes for generating the CNC program for machining a Bezier freeform surface.

## References

- Melkanoff, M.A.; Puhl, F.; Langer, V.; Greenberg, D.P.; Shepard, M.S.; Voelcker, H. The challenge of CAD/CAM education. SIGGRAPH Comput. Graph.
**1982**, 16, 209–211. [Google Scholar] [CrossRef] - Lamancusa, J.S.; Zayas, J.L.; Soyster, A.L.; Morell, L.; Jorgensen, J. 2006 Bernard M. Gordon Prize Lecture*: The Learning Factory: Industry-Partnered Active Learning. J. Eng. Educ.
**2008**, 97, 5–11. [Google Scholar] [CrossRef] - Abele, E.; Chryssolouris, G.; Sihn, W.; Metternich, J.; ElMaraghy, H.; Seliger, G.; Sivard, G.; ElMaraghy, W.; Hummel, V.; Tisch, M.; et al. Learning factories for future oriented research and education in manufacturing. CIRP Ann.
**2017**, 66, 803–826. [Google Scholar] [CrossRef] - Ullah, A.M.M.S. On the interplay of manufacturing engineering education and e-learning. Int. J. Mech. Eng. Educ.
**2016**, 44, 233–254. [Google Scholar] [CrossRef] - Gómez-Galán, M.; Carreño-Ortega, Á.; López-Martínez, J.; Callejón-Ferre, Á.-J. Solving Power Balance Problems in Single-Traction Tractors Using PTractor Plus 1.1, a Possible Learning Aid for Students of Agricultural Engineering. Educ. Sci.
**2018**, 8, 68. [Google Scholar][Green Version] - García, R.R.; Quirós, J.S.; Santos, R.G.; Peñín, P.I.Á. Teaching CAD at the university: Specifically written or commercial software? Comput. Educ.
**2007**, 49, 763–780. [Google Scholar] [CrossRef] - Tan, P.; Wu, H.; Li, P.; Xu, H. Teaching Management System with Applications of RFID and IoT Technology. Educ. Sci.
**2018**, 8, 26. [Google Scholar] [CrossRef] - Araki, T. Basic Education of CAD/CAM Through Multimedia and Network Aid. J. Geom. Graph.
**1999**, 2, 055–064. [Google Scholar] - Zhao, J.; Zhang, H.; Ma, L.; Chen, J.; Wen, Q.; Yin, S.; Wu, X. Basic CAD/CAM Engineering Education through Multimedia and Network Aid. In Frontiers in Computer Education; Sambath, S., Zhu, E., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 33–37. [Google Scholar]
- De Weck, O.L.; Kim, I.Y.; Graff, C.; Nadir, W.; Bell, A. A Rewarding CAD/CAE/CAM and CDIO Experience for Undergraduates. In Proceedings of the First Annual Conceive-Design-Implement-Operate (CDIO) Conference, Kingston, ON, Canada, 7–8 June 2005. [Google Scholar]
- Ishitsuka, K.; Arai, M.; Chida, K.; Koshimizu, M. 9-102 Practice of CAD/CAM Education using 3D-CAD Systems: Second Report: Development of Teaching-Materials for NC Machining by CAM Function. JSEE Annu. Conf.
**2005**, 53, 132–133. [Google Scholar] - Lin, T.; Ullah, A.M.M.S.; Harib, K.H. On the effective teaching of CAD/CAM at the undergraduate level. Comput.-Aided Des. Appl.
**2006**, 3, 331–339. [Google Scholar] [CrossRef] - Alemzadeh, K. A Team-Based CAM Project Utilising the Latest CAD/CAM and Web-Based Technologies in the Concurrent Engineering Environment. Int. J. Mech. Eng. Educ.
**2006**, 34, 48–70. [Google Scholar] [CrossRef] - Kaneko, T.; Kashimoto, H. Development of Assistant Teaching Materials in CAD/CAM Education (Part II): Preparing CAM learning environments by LinuxCNC. Gunma-Kohsen Rev.
**2012**, 31, 5–10. [Google Scholar] - Abouelala, M.; Janan, M.T.; Brandt-Pomares, P. Methodology of selecting CAM software package for education based on a questionnaire. Int. J. Mech. Eng. Educ.
**2015**, 43, 77–93. [Google Scholar] [CrossRef] - Moschonissiotis, S.; Vosniakos, G.-C. Analysis and structuring of process planning logic for CNC machining: An education and training perspective. Int. J. Mech. Eng. Educ.
**2018**, 46, 97–117. [Google Scholar] [CrossRef] - Main, D.; Staines, H.J. An empirical approach to the assessment of cadcam. Comput. Educ.
**1995**, 25, 53–57. [Google Scholar] [CrossRef] - Hamade, R.F.; Artail, H.A.; Jaber, M.Y. Evaluating the learning process of mechanical CAD students. Comput. Educ.
**2007**, 49, 640–661. [Google Scholar] [CrossRef] - Anand, V.B. Computer Graphics and Geometric Modeling for Engineers; Wiley: New York, NY, USA, 1993. [Google Scholar]
- Piegl, L.; Tiller, W. The NURBS Book; Springer: Berlin/Heidelberg, Germany; New York, NY, USA, 1997. [Google Scholar]
- Harib, K.H.; Sharif Ullah, A.M.; Hammami, A. A hexapod-based machine tool with hybrid structure: Kinematic analysis and trajectory planning. Int. J. Mach. Tools Manuf.
**2007**, 47, 1426–1432. [Google Scholar] [CrossRef] - Harib, K.H.; Kamal, A.F.M.; Ullah, A.M.M.S.; Salah, Z. Parallel, Serial and Hybrid Machine Tools and Robotics Structures: Comparative Study on Optimum Kinematic Designs. In Serial and Parallel Robot Manipulators—Kinematics, Dynamics, Control and Optimization; Kucuk, S., Ed.; INTECH Open Access Publisher: London, UK, 2012; pp. 109–124. [Google Scholar]
- Ullah, A.M.M.S.; Takeshi, A.; Masahiro, F.; Chowdhury, M.A.K.; Akihiko, K. Strategies for Developing Milling Tools from the Viewpoint of Sustainable Manufacturing. Int. J. Autom. Technol.
**2016**, 10, 727–736. [Google Scholar] [CrossRef] - Ullah, A.M.M.; Watanabe, M.; Kubo, A. Analytical Point-Cloud Based Geometric Modeling for Additive Manufacturing and Its Application to Cultural Heritage Preservation. Appl. Sci.
**2018**, 8, 656. [Google Scholar][Green Version] - Sharif Ullah, A.M.M. Design for additive manufacturing of porous structures using stochastic point-cloud: A pragmatic approach. Comput.-Aided Des. Appl.
**2018**, 15, 138–146. [Google Scholar] [CrossRef] - Loy, J. eLearning and eMaking: 3D printing blurring the digital and the physical. Educ. Sci.
**2014**, 4, 108–121. [Google Scholar] [CrossRef] - Novak, J.D. Learning, Creating, and Using Knowledge: Concept Maps as Facilitative Tools in Schools and Corporations; Routledge: New York, NY, USA, 2012. [Google Scholar]

**Figure 2.**The concept of two-dimensional (2D) tool offsetting. (

**a**) The concept of offset; (

**b**) calculating a point on the offset curve.

**Figure 10.**A parallel kinematics-driven machine tool structure [21]. (

**a**) prototype; (

**b**) operational parameter.

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).