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.

qAdjacent for finding the face a vertex touches?

Andre_ComellaAndre_Comella Member Posts: 61 PRO
Hi all,

I'm wondering if I'm missing something here. I'm working on a FeatureScript, where not for the first time, I want to get a query of the face of a body that is touching a given vertex. In this particular instance, I can't use evOwnerSketchPlane or the like, because I can't guarantee the vertex is actually from a sketch. It seems to me that qAdjacent should work, with the query for the vertex as the seed, but the query always returns nothing. 

I'm open to other suggestions as well. Right now I'm struggling through filtering out all the things I don't want from qClosestTo.

Best Answer

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,680
    Answer ✓
    For qAdjacent to work, the vertex must belong to the face you are looking for. I always use qWithinRadius(entities, point, TOLERANCE.booleanDefaultTolerance * meter) which will find everything that "touches" the vertex within a tiny sphere.
    Senior Director, Technical Services, EMEAI

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,680
    Answer ✓
    For qAdjacent to work, the vertex must belong to the face you are looking for. I always use qWithinRadius(entities, point, TOLERANCE.booleanDefaultTolerance * meter) which will find everything that "touches" the vertex within a tiny sphere.
    Senior Director, Technical Services, EMEAI
  • Andre_ComellaAndre_Comella Member Posts: 61 PRO
    NeilCooke said:
    For qAdjacent to work, the vertex must belong to the face you are looking for. I always use qWithinRadius(entities, point, TOLERANCE.booleanDefaultTolerance * meter) which will find everything that "touches" the vertex within a tiny sphere.
    Thank you! Honestly I think this comment should be part of the documentation for qAdjacent as it exactly explains the limitations and alternatives
Sign In or Register to comment.