I am looking for the right method to orient a profile curve perpendicular to the rail curve for making a sweep1, any pointers?
Hi Gijs,
Just off the top of my head, if the curve profile is planar, get the curve plane, then figure out where on the curve you want to touch the profile and set the plane origin to thatā¦
Once thatās done you need to get the rail curveās perpendicular frame (plane) at the start point, and create a transformation from the profile curve plane to the rail curve frame. then you can transform the profile curve.
The problem is the orientation of the profile curve. It can still rotate 360° in its own plane, so it will end up perpendicular to the rail, but you canāt predict the orientation in the āaroundā direction.
The only way I know of to nail this absolutely is to enforce the creation of the profile curve relative to WorldXY so that say the world Y axis will always be mapped to the Y axis of the rail curveās frame (which should be vertical)ā¦
thanks,
that makes sense. I can find the Curve.GetCurvePlane() method, but whatās the method for finding the perpendicular plane at the start of a curve?
In the meantime I found another way because I wanted to sweep along a helix, so I simply calculate the angle of the āslopeā and rotate the profile, since starting direction and start position of a helix are known.