calculate normal vector for BRepWire.offsetPlanarWire()

calculate normal vector for BRepWire.offsetPlanarWire()

Anonymous
Not applicable
483 Views
1 Reply
Message 1 of 2

calculate normal vector for BRepWire.offsetPlanarWire()

Anonymous
Not applicable

I have a planar BRepWire that I would like to offset, but I can't quite figure out the normal vector part.

If the vector  is pointing in the wrong direction the wire gets offset in the wrong direction, but it's not like the wire has a front or a back-side. How can I figure out to what side the vector should be pointing?

 

I have the normal vector for the plane the wire is on, but that has a 50/50 chance of being the right one.

 

I have tried turning the wire into a planar face and looking at its normal, but that isn't always right either.

 

0 Likes
Accepted solutions (1)
484 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Fixed it by sorting the edge loop and making it always clockwise in regard to the normal vector. Seems to produce consistent results now.