fillet calculation in 2D

Fillets are commonly used in mechanical engineering in order to avoid singularities and then stress concentrations.

 

The goal is here to “put down in writing” methods I’ve been using to analytically  calculate fillets; these are one solution among others (and not necessary the best ones or the simplest ones), but I’m good with them and they answer to my needs (if some of you want to share other methods, I’ll be pleased to devote a specific section and the author will be cited).

 

There are different types of fillets; the simplest of them is the arc of a circle that answers to a practical need, the use of a ball-nose cutter. In the meantime I’ve discovered other methods for curves transition, notably used by topographers in the design of road networks or railway ones for example (it uses clothoids or Cornu’s spirals – the later ones are also called Euler’s spirals especially in the English speaking world).

 

 

1- Fillets using an arc of a circle

1-1 The basis

The figure here after presents a fillet in arc of a circle.

fillet

 

It be characterized by 2 straight lines \left[ BA \right] and \left[ BC \right], by its radius R, by its centre O and by the points of tangency D et F we have to calculate.

 

1-2 The principle

First property:

The centre of the arc of a circle is necessarily equidistant from the 2 lines \left[ BA \right] and \left[ BC \right] : it is mandatorily located on the internal bisector line of \widehat{ABC}

 

Second property:

Since the arc of a circle is tangent to the lines in D point and F one, then \widehat{ODA} and \widehat{OFC} are right angles; knowing that B is the intersecting point of the 2 lines then ODB and OFB form square triangles where the hypotenuse is none other than \left[ OB \right] : the points B, O, D and F are contained in a circle where diameter is \left[ OB \right] and the centre is O' middle of \left[ OB \right] (see figure bellow).

fillet_principle 

 

1-3 Initial check

Previously we verify than the 3 points A, B, and C are neither coincident nor aligned, and that they belong to the same plane (2D).

  • coincident points: \overrightarrow{BA} \ne \overrightarrow{0} and \overrightarrow{BC} \ne \overrightarrow{0} (assuming that B is the intersecting point of the 2 lines here),
  • aligned points: the vector product gives \overrightarrow{BA}  \wedge  \overrightarrow{BC}  = \overrightarrow{0}

 

 

1-3 Analytical development (general case)

Let us focusing first on the general case, I mean the one where B is not the intersecting point of the 2 lines (it’ll be just necessary to simplify after):

fillet_principle2

(Warning: for the general case, point labeling has been slightly modified compared to the previous schemes)

 

We need to calculate:

  • the linear equation of D_1 =\left( AB \right), D_2 =\left( DC \right) and D_3 = \left( AC \right),
  • the intersecting point E coordinates,
  • the linear equation of the bisector line to \widehat{AEC}  / \widehat{BED},
  • the coordinates of the O point, the centre the arc of a circle/fillet,
  • the coordinates of the O' point, middle of \left[ E O \right] segment,
  • the circle \mathcal{C} equation, its centre O' and its radius \left[ O' O \right],
  • the intersecting points T_i between D_i and \mathcal{C} where T_i are the ends of the arc of a circle (i=1,2).

 

 

Let A \left(x_A , y_A \right), B \left(x_B , y_B \right), C \left(x_C , y_C \right) and D \left(x_D , y_D \right).

 

Calculation of the linear equation of \left( D_1 \right) :

(1)   \begin{equation*}\fbox{$- \left( y_B - y_A \right) x + \left( x_B - x_A \right) y + \left[ x_A \left( y_B - y_A \right) - y_A \left( x_B - x_A \right) \right] = 0$}\end{equation*}

 

Ditto for the linear equation of \left( D_2 \right) :

(2)   \begin{equation*}\fbox{$- \left( y_D - y_C \right) x + \left( x_D - x_C \right) y + \left[ x_C \left( y_D - y_C \right) - y_C \left( x_D - x_C \right) \right] = 0$}\end{equation*}

 

D_1 \cap D_2 :

Let E(x_E,y_E) the point so that D_1 \cap D_2  ; writing m_1 = \left( \frac{y_B - y_A}{x_B - x_A} \right) and m_2 = \left( \frac{y_D - y_C}{x_D - x_C} \right), then :

(3)   \begin{equation*}\fbox{$E = \left[\begin{array}{l}\left( \frac{m_1 \cdot x_A + y_C - m_2 \cdot x_C - y_A}{m_1 - m_2} \right) \\y_A + m_1 \left( x_E - x_A \right)\end{array}\right]$}\end{equation*}

 

Linear equation calculation of (AC) line:

We need \left( D_3 \right) (\left[ AC \right]line) to calculate the bisector line:

(4)   \begin{equation*}- \left( y_C - y_A \right) x + \left( x_C - x_A \right) y + \left[ x_A \left( y_C - y_A \right) - y_A \left( x_C - x_A \right) \right] = 0\end{equation*}

 

 Calculation of the internal bisector line equation:

The equation system describing the triangle (ABC) is then :
\\\left\lbrace\begin{array}{rl}D_1(x,y) : & - \left( y_B - y_A \right) x + \left( x_B - x_A \right) y + \left[ x_A \left( y_B - y_A \right) - y_A \left( x_B - x_A \right) \right] = 0 \\D_2(x,y) : & - \left( y_D - y_C \right) x + \left( x_D - x_C \right) y + \left[ x_C \left( y_D - y_C \right) - y_C \left( x_D - x_C \right) \right] = 0 \\D_3(x,y) : & - \left( y_C - y_A \right) x + \left( x_C - x_A \right) y + \left[ x_A \left( y_C - y_A \right) - y_A \left( x_C - x_A \right) \right] = 0\end{array}\right.

 

Let:

\left\lbrace\begin{array}{l}a_1 = - \left( y_B - y_A \right) \\b_1 = \left( x_B - x_A \right) \\c_1 = x_A \left( y_B - y_A \right) - y_A \left( x_B - x_A \right)\end{array}\right.

\left\lbrace\begin{array}{l}a_2 = - \left( y_D - y_C \right) \\b_2 = \left( x_D - x_C \right) \\c_2 = x_C \left( y_D - y_C \right) - y_C \left( x_D - x_C \right)\end{array}\right.

\left\lbrace\begin{array}{l}a_3 = - \left( y_C - y_A \right) \\b_3 = \left( x_C - x_A \right) \\c_3 = x_A \left( y_C - y_A \right) - y_A \left( x_C - x_A \right)\end{array}\right.

 

The equation system is rewritten:
\\\left\lbrace\begin{array}{rl}D_1(x,y) : & a_1 x + b_1 y + c_1 = 0 \\D_2(x,y) : & a_2 x + b_2 y + c_2 = 0 \\D_3(x,y) : & a_3 x + b_3 y + c_3 = 0\end{array}\right.

 

The general equation of the internal bisector line in E to D_1(x,y) and D_2(x,y) is calculated as:

(5)   \begin{equation*}sgn \left|\begin{array}{cc}a_1 & b_1 \\a_3 & b_3\end{array}\right|\frac{D_1(x,y)}{\sqrt{a_1^2 + b_1^2}}+sgn \left|\begin{array}{cc}a_2 & b_2 \\a_3 & b_3\end{array}\right|\frac{D_2(x,y)}{\sqrt{a_2^2 + b_2^2}}=0\end{equation*}

 

Where sgn refers to the sign so that sgn \left|\begin{array}{cc}a_1 & b_1 \\a_3 & b_3\end{array}\right|= sgn \left( det\left[\begin{array}{cc}a_1 & b_1 \\a_3 & b_3\end{array}\right] \right)= sgn \left( a_1 a_3 - a_3 b_3 \right)

 

Writing k_1 = sgn \left( a_1 a_3 - a_3 b_3 \right), then if \left\lbrace\begin{array}{c}\left( a_1 a_3 - a_3 b_3 \right) > 0 \rightarrow k_1 = +1 \\\left( a_1 a_3 - a_3 b_3 \right) < 0 \rightarrow k_1 = -1\end{array}\right.

 

Ditto for k_2 so that k_2 = sgn \left( a_2 b_3 - a_3 b_2 \right)

 

Equation (5) is rewritten as:
\frac{k_1}{\sqrt{a_1^2 + b_1^2}} \left( a_1 x + b_1 y + c_1 \right) + \frac{k_2}{\sqrt{a_2^2 + b_2^2}} \left( a_2 x + b_2 y + c_2 \right)

 

To facilitate reading, let \alpha = \frac{k_1}{\sqrt{a_1^2 + b_1^2}} and \beta = \frac{k_2}{\sqrt{a_2^2 + b_2^2}}, develop and then

\left( \alpha a_1 + \beta a_2 \right) x + \left( \alpha b_1 + \beta b_2 \right) y + \left[ \alpha c_1 + \beta c_2 \right] = 0

 

The previous equation is rewritten:

(6)   \begin{equation*}x = \frac{- \left( \alpha b_1 + \beta b_2 \right) y - \left( \alpha c_1 + \beta c_2 \right)}{\left( \alpha a_1 + \beta a_2 \right)}\end{equation*}

 

Calculation of the origin of the arc of a circle:

Knowing that the arc of a circle origin O(x_O,y_O) is on the bisector line i.e. at a distance equals to \pm R of D_1 (or D_2), then:

\pm R = \frac{a_1 x_O + b_1 y_O + c_1}{\sqrt{a_1^2 + b_1^2}}   or even

 

k_r R = \frac{a_1 x_O + b_1 y_O + c_1}{\sqrt{a_1^2 + b_1^2}}   writing k_r = \pm 1.

 

Then the system becomes:
\left\lbrace\begin{array}{c}k_r R = \frac{a_1 x_O + b_1 y_O + c_1}{\sqrt{a_1^2 + b_1^2}} \\x_O = \frac{- \left( \alpha b_1 + \beta b_2 \right) y_O - \left( \alpha c_1 + \beta c_2 \right)}{\left( \alpha a_1 + \beta a_2 \right)}\end{array}\right.

 

After solving we found:

(7)   \begin{equation*}\fbox{$\left\lbrace\begin{array}{l}y_O = \frac{ \left(\frac{\alpha c_1 + \beta c_2}{\alpha a_1 + \beta a_2} \right)a_1 - c_1 + R \frac{k_r k_1}{\alpha}}{ b_1 - \left( \frac{\alpha b_1 + \beta b_2}{\alpha a_1 + \beta a_2} \right) a_1} \\ \\x_O = \frac{- \left( \alpha b_1 + \beta b_2 \right) y_O - \left( \alpha c_1 + \beta c_2 \right)}{\left( \alpha a_1 + \beta a_2 \right)} \\ \\with \quad \alpha = \frac{k_1}{\sqrt{a_1^2 + b_1^2}} \quad et \quad \beta = \frac{k_2}{\sqrt{a_2^2 + b_2^2}}\end{array}\right.$}\end{equation*}

 

NB 1: the sign of k_r depends on the one of \sin\left( \widehat{AEC} \right) :

  • k_r = 1 if \sin\left( \widehat{AEC} \right) > 0
  • k_r = -1 if \sin\left( \widehat{AEC} \right) < 0
  • remember that k_r = 0 if \sin\left( \widehat{AEC} \right) = 0, i.e. the points are aligned.

 

 NB2 : calculation of \sin\left( \widehat{AEC} \right)

  • \left( \overrightarrow{EA}  \wedge \overrightarrow{EC} \right) = \left\| \overrightarrow{EA} \right\| \cdot \left\| \overrightarrow{EC} \right\| \cdot \sin \left( \overrightarrow{EA} , \overrightarrow{EC}\right) \cdot \overrightarrow{k},
  • multiplying by \overrightarrow{k}, it becomes \left( \overrightarrow{EA}  \wedge \overrightarrow{EC} \right) \cdot \overrightarrow{k} = \left\| \overrightarrow{EA} \right\| \cdot \left\| \overrightarrow{EC} \right\| \cdot \sin \left( \overrightarrow{EA} , \overrightarrow{EC}\right) \cdot \overrightarrow{k} \cdot \overrightarrow{k}
  • knowing that \overrightarrow{k} \cdot \overrightarrow{k} = 1, then the previous equation is rewritten \frac{\left( \overrightarrow{EA}  \wedge \overrightarrow{EC} \right) \cdot \overrightarrow{k} }{\left\| \overrightarrow{EA} \right\| \cdot \left\| \overrightarrow{EC} \right\|} = \sin \left( \overrightarrow{EA} , \overrightarrow{EC}\right)

 

Arc of a circle ends calculation – linking points with the D_1 line and D_2 one:

We calculate the coordinates of the tangent points between the arc of a circle and the 2 lines: \mathcal{C} \cap D_1 and \mathcal{C} \cap D_2.

 

First point T_1 :
\left\lbrace\begin{array}{ll}D_1 : & a_1 x + b_1 y + c_1 = 0 \\\mathcal{C} : & \left( x - x_O \right)^2 + \left( y - y_O \right)^2 = R^2\end{array}\right.

 

By incorporating y = - \left[ \frac{a_1}{b_1}x + \frac{c_1}{b_1} \right] in the circle equation and by developing it leads to:

 

\left[ 1 + \left( \frac{a_1}{b_1} \right)^2 \right] x^2 + 2 \left[ \left( \frac{a_1 c_1}{b_1^2}  \right)+ y_O \left( \frac{a_1}{b_1} \right) -y_O \right] x + \left[ x_O^2 + \left( \frac{c_1}{b_1} \right)^2 + 2y_O \left( \frac{c_1}{b_1}  \right) + y_O^2 - R^2 \right]=0

 

Equivalent to A x^2 + B x + C = 0

writing

\left\lbrace\begin{array}{l}A = \left[ 1 + \left( \frac{a_1}{b_1} \right)^2 \right] \\B =2 \left[ \left( \frac{a_1 c_1}{b_1^2} \right)+ y_O \left( \frac{a_1}{b_1} \right) -y_O \right] \\C =\left[ x_O^2 + \left( \frac{c_1}{b_1} \right)^2 + 2y_O \left( \frac{c_1}{b_1} \right) + y_O^2 - R^2 \right]\end{array}\right.

 

Tangency condition, in a single point implies that the equation has a unique root (\Delta = 0); the solution is like x_{T_1} = - \frac{B}{2A}.

 

Then

(8)   \begin{equation*}\fbox{$T_1 = \left\lbrace\begin{array}{l}\left( \frac{y_O - \left(\frac{a_1}{b_1}\right)y_O - \left(\frac{a_1 c_1}{b_1^2}\right) }{1 + \left(\frac{a_1}{b_1}\right)^2} \right) \\- \left[ \left(\frac{a_1}{b_1}\right) x_{T_1} + \left(\frac{c_1}{b_1} \right)\right]\end{array}\right\rbrace$}\end{equation*}

 

Second point T_2 :

We proceed in the same way  for T_2 :

(9)   \begin{equation*}\fbox{$T_2 = \left\lbrace\begin{array}{l}\left( \frac{y_O - \left(\frac{a_2}{b_2}\right)y_O - \left(\frac{a_2 c_2}{b_1^2}\right) }{1 + \left(\frac{a_2}{b_2}\right)^2} \right) \\- \left[ \left(\frac{a_2}{b_2}\right) x_{T_2} + \left(\frac{c_2}{b_2} \right)\right]\end{array}\right\rbrace$}\end{equation*}

 

 

In a general way, the 2 ends of the arc of a circle have the following form:

(10)   \begin{equation*}\fbox{$T_i = \left\lbrace\begin{array}{l}\left( \frac{y_O - \left(\frac{a_i}{b_i}y_O - \frac{a_i c_i}{b_i^2}\right) }{1 + \left(\frac{a_i}{b_i}\right)^2} \right) \\- \left[ \left(\frac{a_i}{b_i} \right)x_{T_i} + \left(\frac{c_i}{b_i} \right)\right]\end{array}\right\rbrace_{i=1,2}$}\end{equation*}

 

We can already notice a specific case i.e. when 2 points are vertical  (indeed variables b_i become equal to zero whereas it can be met on the denominator). It’ll be taken into account in a next section.

 

 

1-4 Case where B, D and then E are coincident

 When the lines D_1 and D_2 are crossing in B, point E calculation becomes useless; only the a_i, b_i and c_i (i=1,2,3) constant values are affected:

\left\lbrace\begin{array}{l}a_1 = - \left( y_B - y_A \right) \\b_1 = \left( x_B - x_A \right) \\c_1 = x_A \left( y_B - y_A \right) - y_A \left( x_B - x_A \right)\end{array}\right.

\left\lbrace\begin{array}{l}a_2 = - \left( y_B - y_C \right) \\b_2 = \left( x_B - x_C \right) \\c_2 = x_C \left( y_B - y_C \right) - y_C \left( x_B - x_C \right)\end{array}\right.

\left\lbrace\begin{array}{l}a_3 = - \left( y_C - y_A \right) \\b_3 = \left( x_C - x_A \right) \\c_3 = x_A \left( y_C - y_A \right) - y_A \left( x_C - x_A \right)\end{array}\right.

 

 The rest remains unchanged.

 

 

1-5 Specific case of 2 vertical points

Previous equations remain unchanged up to point O calculation (including the later one). Only point T_1 calculation requires a specific treatment.

fillet_3points - verif6

Let us consider the case of the previous figure; constants are expressed as:

\left\lbrace\begin{array}{l}a_1 = - \left( y_B - y_A \right) \\b_1 = 0 \\c_1 = x_A \left( y_B - y_A \right) - y_A \left( x_B - x_A \right)\end{array}\right.

\left\lbrace\begin{array}{l}a_2 = - \left( y_B - y_C \right) \\b_2 = \left( x_B - x_C \right) \\c_2 = x_C \left( y_B - y_C \right) - y_C \left( x_B - x_C \right)\end{array}\right.

\left\lbrace\begin{array}{l}a_3 = - \left( y_C - y_A \right) \\b_3 = \left( x_C - x_A \right) \\c_3 = x_A \left( y_C - y_A \right) - y_A \left( x_C - x_A \right)\end{array}\right.

 

The linear equations system becomes:

\\\left\lbrace\begin{array}{rl}D_1(x,y) : & a_1 x + c_1 = 0 \\D_2(x,y) : & a_2 x + b_2 y + c_2 = 0 \\D_3(x,y) : & a_3 x + b_3 y + c_3 = 0\end{array}\right.

 

Basically for T_1 we can note that is has the same abscissa than the point A (or B), and the ordinate of the point O.

Then

(11)   \begin{equation*} \fbox{$T_1 = \left\lbrace\begin{array}{l} x_A = x_B \\y_O\end{array}\right\rbrace$}\end{equation*}

 

  T_2 point calculation remains unchanged compared to the previous cases.

 

In a same way for the following example: the calculation of the point T_1 remains unchanged and the one of T_2 becomes:

(12)   \begin{equation*} \fbox{$T_2 = \left\lbrace\begin{array}{l} x_B = x_C \\y_O\end{array}\right\rbrace$}\end{equation*}

fillet_3points - verif6ter

 

 

 

1-6 Last specific case : all the lines are horizontal and vertical and form a right angle

This case is the simplest one; it’s not necessary the use the above equations.

 

 

1-7 Checks

 hereafter some examples of case studies that have been tested; an Excel file (compressed using 7zip) can be downloaded (fillet) and it includes all the tests.

fillet_3points fillet_3points - verif10 fillet_3points - verif9
fillet_3points - verif8 fillet_3points - verif7 fillet_3points - verif5
fillet_3points - verif6 fillet_3points - verif4 fillet_3points - verif3
fillet_3points - verif2 fillet_3points - verif1 fillet_generality_screenshot

 

Curves were plotted using geogebra; note that:

  • the blue points were manually implemented,
  • the grey points were calculated by geogebra and they are the result of the intersection of \mathca{C} circle (centre O' and radius