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.

Recommended approach for finding which face of a solid a sketch was created on?

nick_dombroskinick_dombroski Member Posts: 2

Hello,

In my use of FeatureScript, I have a fairly common need to do the following: given an edge and a solid object, identify which face of the solid the edge lies on (if any). I'm wondering generally what is the best approach to take for this.

This has come up in several contexts, but to come up with a simplified scenario to better illustrate what I mean: let's say my feature takes Part 1 as an EntityType.BODY input, and the highlighted edge of Sketch 2 as an EntityType.EDGE input. I want to do something to the face of Part 1 on which Sketch 2 lies. What is considered best practice for obtaining a query that selects that face?

Screenshot 2026-01-06 at 2.54.35 PM.png

Comments

  • lanalana Onshape Employees Posts: 751 image

    You can use evOwnerSketchPlane to get sketchPlane and then selectedBody→qOwnedByBody(EntityType.FACE)->qCoincidesWithPlane(thePlane); to find same plane faces.

Sign In or Register to comment.