The presented path planning for a multifaceted eyeglass frame consists of three major parts: surface division, path planning for each part surface, and stitching of all part surfaces in one trajectory.

#### 2.2.1. Surface Division

It is known that the robot reachability at a point with a particular orientation of the end effector or tool frame {

T} depends on its joint configuration

q = {

q_{j}, j ∈ [1 …

N]} ∈ ϐ, where

q_{j} the joint configuration,

N is the number of joints, and ϐ is configuration space. In three-dimensional space, minimum six joints are needed to position the {

T} because the object in space requires six parameters, three from

${\mathrm{\mathbb{R}}}^{3}$ (coordinates of the origin of the attached frame), and three from SO(3) (rotation matrices for frame orientation) such robots are said to have six degrees of freedom [

27]. The articulated robot with end effector poses

ξ_{E}~(

x,

y,

z,

θ_{r},

θ_{p},

θ_{y}) fulfills this demand.

However, maintaining the required position and orientation continuously normal to the surface may not be feasible due to the joints limit. To achieve the non-stop smooth trajectory for the entire polishing surface, it is often necessary to divide the polishing surface into several regions. It converts a complex surface into several simple curved surfaces, which is comparatively easier to polish. It also helps to provide better tool contact with the workpiece surface, which improves the polishing quality. Moreover, it offers a quick change in the tool path of the particular area when needed without disturbing the other part surfaces.

In this study, the symmetrical eyeglass frame is first divided virtually into two symmetrical parts A and B by the plane of symmetry as shown in

Figure 9a. The surface division in one part shall be followed in the other part by mirroring. Secondly, the surface is further divided into the top and side face by following the edges of the faces. Additionally, other multiple factors are considered including the variation in the orientation of surface normal vector (

**n**), the robot joints limit, the curvature of the part surface, the size, and complexity of the face. By taking these factors into account, the eyeglass frame is divided into 18 plain and simple curve part surfaces as in

Figure 9b. Most of the parts are simple in shape with less

**n** variation. Part surface 1–8 and 11–18 are symmetrical, therefore, the polishing tool will follow a similar tool path.

#### 2.2.2. Tool Path Generation for Individual Part Surfaces

Tool path pattern: the prime objective of path planning is the achievement of the required level of the surface finish on the entire area of the workpiece in the shortest time. Several scanning patterns and area filling curves have been implemented on the different shapes of the workpieces for the better path consistency, stock removal, surface texture, and quality [

5,

6,

28,

29].

Figure 10 presents some commonly used tool path patterns to cover the plain or simple curved surfaces. Each pattern has its advantages, disadvantages, and parameters that control its performances.

According to the literature, the scanning path is one of the most adopted tool path patterns in polishing [

5,

8,

9,

30,

31]. In this study, the scanning path pattern was selected for the eyeglass frame because mostly part surfaces were long stripes. Scanning path consists of a starting point, ending point, and the middle body. It can be classified into two categories, “S” pattern and “Z” pattern. Path density of the middle body is responsible for the quality and the productivity of the polishing process that can be controlled by the distance between two consecutive lines. In S scan, tool moves in an alternative direction, however, Z scan moves in the same direction all over the scans. In tangential polishing, tool feed direction had a significant impact on the resultant surface as discussed in

Section 2.1.2. The implementation of the scanning path patterns for the polishing curve surface utilizing adopted LCW can be seen in

Figure 8. High curvature surfaces demand high path densities because these provide less surface contact. Depending on the tool effective width (

${w}_{e}$), line spacing can vary from 0 to

W_{Tool}.

Tool compliance: the flexibility of the polishing tool is another important factor that offers smooth interaction, additional tool contact, and help to reach the difficult places of the workpiece. Examples of flexible tools include polishing belts, wool pad, and cloth wheels.

Figure 11 shows the impact of using different tool center point (TCP) at flexible LCW in polishing the plain and simply curved surface.

TCP defines the zero position of the tool coordinate system. All robots have predefined tool coordinates system and new tool coordinates are defined as an offset from this predefined location. TCP with

R–

h gives large surface contact compare to TCP at

R. However, it offers different effects on plain and curved surfaces (

${a}_{2}>{a}_{1}$) as shown in

Figure 11b,c. Smart surface division can convert the high curvature surfaces into nearly a plain or less curved surface that can provide approximately the same contact area as plain surface (i.e.,

${a}_{2}\cong {a}_{1}$). Equation (6) affirms that

${w}_{e}$ and

s controls the surface contact area (

${A}_{C}$) between the tool and plain surface. In our study, TCP is taken at

R–

h with a small value of

s because the compliance force of the tool can easily deform the frame for a larger value.

TCP or end effector velocity in polishing: the composite robot applications like painting, welding, and polishing require continuous path control with explicit orientation and uniform velocity. Within the working space of a robot, there are some spaces where the position and orientation of the end effector of the robot cannot be asserted. These locations are referred to as singularities in which robot displacements and velocities are volatile [

32]. For the six-axis robot, singularity can be mathematically described by the relation between the vector of joint velocities (

$\dot{q}$) and the Cartesian velocity vector (

v) of the end-effector [

27].

where

J is a Jacobian matrix of order 6 × 6, which is a function of the joint positions (

q) and the robot geometry. This equation can calculate joint rates at every point on the path for the robot movement with some velocity vector in the Cartesian space. However, the robots have some values of

q for which Jacobians becomes singular. Those places are considered as singularities.

While using the robot in Cartesian mode, trajectories that instruct the robot to move close to a singularity must be avoided. Normally, robots are programmed to stop the movement near singularity to avoid any harm to the robot. Some robots are designed to move slowly near a singularity but lose constant speed in line and force the tool to linger on at the same point, which is damaging for the polishing surface. Sometimes to avoid the most commonly occurred wrist singularity, a small angle is added to the end effector, which reduces the chance of two links alignment.

Optimization of polishing parameters: optimized control of the polishing parameters can lead to the required surface quality (surface roughness

R_{a}) in a short time. However, it is difficult to optimize the input parameters due to the complexity of the polishing process. Additionally, the random effects of the flexible polishing tool on the polishing surface make this process difficult to represent by simple equations. Therefore, a full factorial DOE is used to investigate the effect of input factors (

SFPM, feed rate, and no. of the polishing cycle) on the surface roughness of the eyeglass frame in the polishing process. It can help to find the economical polishing parameters for the required surface finish. The full factorial design consists of all possible combinations of the input factors and their levels [

33,

34]. The number of the experimental run for a full factorial design is the product of the levels of each factor (

${F}_{n}$):

Using the above equation, thirty no. of experimental runs were designed with the various combinations of the process parameters. Besides the full factorial design, other methods under DOE can be used such as the fractional factorial design, Plackett–Burman design, and Taguchi method. However, depending on the required accuracy and process cost a full factorial design is used.

According to references [

29,

30], the best parameters can be selected by using the polishing efficiency (

PE) formula given in Equation (9). It is defined as the amount of roughness reduction (∆

${R}_{a}$) for the specified area (

A) in time (

T). A plot of the

PE against the

${R}_{a}$ can help to extract the best possible polishing parameters based on the highest polishing efficiency achieve.

After the surface division of the eyeglass frame, most of the part surfaces are strips. The maximum width (

${W}_{PS}$) of each part surface is less than the tool width (

${W}_{Tool}$). As a result, the polishing tool can cover the entire strip or part surface just in one pass starting from one point and ending at the opposite side. However, to achieve the required surface quality, multiple polishing passes are needed. The number of polishing passes, the starting, and ending points is dependent on the polishing parameters.

Figure 12 shows the polishing trajectory of the four part surfaces with the tool and robot target frames {

R}. Based on the optimized polishing parameters achieved by full factorial DOE from the part surface one (

${S}_{1}$), two polishing cycles are suggested for each part surface. In the first polishing cycle, the eyeglass frame will move against the wheel rotation and later in the direction of the wheel rotation for required gloss. {

T} will remain normal to the surface during the whole polishing process.

#### 2.2.3. Tool Path Stitching

The final step is to link all the part surfaces to achieve the shortest possible route, minimum joint angles, and jerk-free movement. Previously [

9], the shortest possible connecting route was achieved by using brute force search, nearest neighboring algorithm (NNA), and the greedy algorithm. These algorithms do not satisfy the target of achieving the smooth robot movement with minimum joint angles because they just focus to find the shortest connecting distance. Therefore, a new approach was used here, which satisfies all the mentioned objectives.

The proposed strategy avoids the hasty orientation shifts during the connecting path movement. It sorts part surfaces in different groups based on the orientation of the {

T} at the starting point in each part surface. Following the surface division previously as in

Figure 9, there are two face groups (top and side). The total 18 part surfaces of the eyeglass frame are mainly sorted into top and side face groups. Similarly, the top face group is further sorted into the X-axis and Y-axis categories. Later, the part surfaces in the X-axis group are linked based on minimum Euclidian distance

d(

p,

q) as express in Equation (10). The same action is performed on the other two sorted groups. Finally, all these three groups are connected to create one complete path based on the short distance covered.

Figure 13 compares the effect of using the NNA and proposed approach to connect the part surfaces by showing the complete joints angle movement (

${\theta}_{n}$:

n = 6) of the robot during the polishing of the eyeglass frame. Both methods utilized only an average of 32% of whole angles range available for the used robot because of the smart part division approach. However, the new proposed strategy allows the robot to maintain {

T} orientation normal to the surface during polishing by using very less joints movements. Additionally, it provides smooth robot movement because it avoids a jerk, which occurs due to the sudden tool orientation shift while moving from one part to another part surface and hence, allows the robot to move comparatively faster. Moreover, the Joint 4 (wrist) demonstrated a minimum and smooth angle transition that was significant in avoiding the mostly occurred wrist singularity.