Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

CurveLoop offset - CurveLoop normal vector?

Anonymous

CurveLoop offset - CurveLoop normal vector?

Anonymous
Not applicable

Hi All, 

 

I'm struggling with this for a while. I need to offset a CurveLoop always to the "outside" of it. I'm using the CreateViaOffset(CurveLoop, Double, Vector) where the vector is normal to the curve.

 

If I have the original CurveLoop, How do I get the normal vector?

 

Thanks in advance!

0 Likes
Reply
1,452 Views
5 Replies
Replies (5)

Anonymous
Not applicable
0 Likes

RPTHOMAS108
Mentor
Mentor

Paraphrasing:

 

If you are walking along the direction of the curve then a normal in the direction from your feet to your head offsets right (for positive offset value), opposite normal from head to feet offsets left. Right hand rule is it?

 

Not sure what happens when some of your curves are reversed in the loop, I know for example that the curve loop isn't considered closed if all of the curve segments are not in the same direction. Knowing this could be a valid curveloop configuration leads me to wonder how that would offset i.e. which segment it would pick to define the global orientation of the offset?

0 Likes

BardiaJahan
Advocate
Advocate

If you would like to offset the curveloop to the 'outside':

 

 

if (curveLoop.IsCounterClockwise(normal))
   CurveLoop.CreateViaOffset(curveLoop, distance, normal));

else 
   CurveLoop.CreateViaOffset(curveLoop, - distance, normal));

and what I usually use as normal is the the normal of the same face I retrieve my CurveLoop from.

 

Anonymous
Not applicable

As far as I know, it's not possible for a line to have a normal in 3 space. It has an infinite number of "normals". If you're referring to the normal of the face you get the curve from, that certainly has a normal, and is probably the reference for which the method would be looking.

0 Likes

BardiaJahan
Advocate
Advocate

Yes, a line does not have a normal. And the normal of the face used to retrieve the CurveLoop is what needs to be passed to the CreateFromOffset method.

0 Likes