Re: 3d offset algorithm
hy mark, offseting requires a geometrical entity ( segment / arch / bezier / formula / 3d cloud ) and a direction
for example, offseting a circle :
... in plane : will result in a bigger or smaller circle, depending on direction
... in space : will result in a series of circles, that will all be among the surface of a donut ( this was a particular example, but i find it sugestive ... however, generaly speaking, is possible to offset a circle in space, and obtain a shape that is not circular ... maybe it does not make sense, but imagine that is possible to machine a circle, without using a circular toolpath inside the machine )
thus in a plane, offseting generates 2 results, while in space it generates an infinity of results
you have to define the direction among which the geometrical entity has to expand/shift
let's say that you wish to offset a 3d cloud in respect to a tree : you calculate for each point of the cloud the shortest distance to the tree, and voila, this will also give you the direction; each point of the cloud may have associated a different direction
let's say that you wish to offset a random 3d toolpath in respect to a solid : you discretizeze the 3d toolpath into segments, thus you obtain the cloud ... then you offset the cloud, and you may apply a smoothing algorithm among the final result
let's say that you wish to generate the toolpaths for a 2.5d axis cnc : you intersect the solid with a plane paralel to xy, and this will generate at least one closed 2d contour, and from here is basic planar offset
kindly
Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg