Okay, so you are looking at this challenge of finding the line orientations in 3d to give consistent offset distances. This does generally require numerical optimisation. See some of the examples I posted in this long thread which solve this using Kangaroo: