Normally Svg is only defined for 2d. I don't know of any program that allows the definition of individual segments in 3d.
However, a model can be completely described by a few points. Most segments are already defined by points alone. The situation is different with elliptical arcs, however: it is a fiddle to convert the standard description into a point representation that can be handled sensibly.
But once you have the point description, it would be very easy to bring a path into the third dimension using rotations, reflections and displacements. As long as an entire path is in one (albeit inclined) plane, everything is fine. However, you could also assemble several segments into a path that no longer fits into any plane. But the calculations for the individual segments remain valid. We are talking here about “orthogonal" matrices, plus a shift.
In a few places (e.g. where the cross product occurs in the formulas), the jump to the third dimension also makes sense for very "flat" models.
The formulas used here apply to 2d and 3d paths.