Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

inside vs outside of face edge

adamohernadamohern Member, OS Professional Posts: 216 PRO
If I query a face's edges, how do I figure out which side of the edge is inside (i.e. toward the face) and which is outside (away from the face)?

My initial thought was to extrude the edges normal to the face and work it out using the resultant face normals. Is there a better way?

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
    I think what you're asking for is a function that given a face and adjacent edge tells you whether the edge direction is clockwise or counterclockwise about the face nromal.

    I don't expect extruding the sketch edge and using the normal to be too robust -- for the time being (until we have a proper test) for a planar face (which it sounds like you're working with), making a slight offset from a point in the middle of the edge in the (edge tangent) cross (face normal) direction and seeing if qContainsPoint filters out the face or not is likely to work better.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • adamohernadamohern Member, OS Professional Posts: 216 PRO
    Right, okay. That makes sense. I'll give that a try.
Sign In or Register to comment.