Align2line (Rhino)
Align block to vector in Rhino (20080909)
Trying to do the same with sketchup. A lot harder to get the input, quite a lot of different methods. but it has potential to deal with the geom.
50% done now, sorted out the vecs. need to focus on the inputs now.
have some problems with the angle rotate method, where I probably need another vec to define if it is a neg or pos rotation. but it is more or less working constrained to the X-axis implemented with reverse direction. Taken 100 more lines to do only 50% the same as the one I did for R. no wonder no one uses SU for geo generation. The better way to do it probably to do it in an external environment like what pcloud did.