Which side of a WIRE is the material ?

Hi,

I'm working on a CAM System. In order to make a contouring, the user must select a profile. I can get the wire selected by the user but how can I know on which side(of this wire) the material is ?

Thanks

Kreshnik's picture

Nobody has the answer ?

Kreshnik's picture

Nobody has the answer ?

Bearloga's picture

The material is always on the left of the contour.

Kreshnik's picture

That's what I supposed too. But when I select edges corresponding to the contour,sometimes the material is not on the left ! (For me the orientation of the edge is : First point to Last point)

Bearloga's picture

If the edge has REVERSED orientation then you should revert first and last points of the curve.

Kreshnik's picture

OK, thank you. I'll try it, and I'll give you news.

Rob Bachrach's picture

I guess I am unsure what you really mean by "which side". If the wire is connected to one or more faces, you can get the faces that connect that wire. If the wire is just out in space, you can find the nearest face. I suppose you could find a point inside the face and get the vector between that point and the closest point on the wire.

If none of this helps, please clarify your question.

Kreshnik's picture

I tryed the solutions mentionned before and I found this result :

When you select a Wire and you get its corresponding edges, you obtain the edges in a given order. This order indicates you the direction of the wire. If the orientation of the wire is FORWARD, then the material is on the left. Else if the orientaion is REVERSED then the material is on the right.

Thanks to everybody for helping me.

Kreshnik