Digital Manufacturing
![]()
Università di Trento, Dipartimento di Ingegneria Industriale
Updated: 19/10/2026
A possible feature to implement for the personal project
G41, to the right with G42 and is disabled with G40G41/G42
We need to calculate the point \(D\):


Intersection \(D\) between
\(y = a_1 x + b_1 - v_1 = a_1 x + b_{o,1}\)
and
\(y = a_2 x + b_2 - v_2 = a_2 x + b_{o,2}\)
has coordinates:
\[(x_i, y_i) = \left(\frac{b_{o,2} - b_{o,1}}{a_1 - a_2}, \frac{b_{o,1}a_2 - b_{o,2}a_1}{a_2 - a_1}\right)\]

\[C = \begin{cases} (0, -r), & \text{when } a = 0 \\ r(s, -s/a) \text{ with } s = \frac{a}{|a|}\sqrt{\frac{a^2}{1 + a^2}}, & \text{otherwise} \end{cases}\]
Similar to line-line case, but with a caveat:

Similar to line-line case, but with a caveat:

Support for G40/G41/G42
enum class TRCType with NONE, LEFT, RIGHTTRCType _trc field in the BlockTRC classBlockTRC::parse()_trc shall be managed as a modal field (i.e. inherited from previous block)Support for tool radius
tools: [10.0, 8.0, 5.0, 2.5] giving the list of available tools and respective radiusesMachine class needs to properly load the tool list into a new field: vector<data_t> _toolsmachine::tool_radius(), which returns the radius of a given tool numberSupport for offset calculation
Block::parse() needs to change the target of the previous block if the previous block has _trc != TRCType::NONESupport for offset calculation
Block::angle_with_prev(): angle in radians with previous blockBlock::equation(): returns \(a\) and \(b\) as output parameters (refs); for an arc, parameters of the implicit equation \((x - x_c)^2 + (y - y_c)^2 = r^2\) are available alreadypaolo.bosetti@unitn.it — https://pbosetti.github.io/DigMan/