Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Select adjacent ends given two faces
Lee_Hesketh
Member, Developers Posts: 148 ✭✭✭
Hi everyone. I need to query for the ends of a rectangle given the user selects two adjacent faces. How could I do this?
Thanks
Lee Hesketh
Thanks
Lee Hesketh
There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
Tagged:
0
Best Answer
-
ilya_baran Onshape Employees, Developers, HDM Posts: 1,210The queries to use are qEdgeAdjacent (which means query-for-things-that-share-an-edge). In this case, to get the two end faces, you'd do:
qIntersection([qEdgeAdjacent(face1, EntityType.FACE), qEdgeAdjacent(face2, EntityType.FACE)])
where face1 and face2 are your two adjacent yellow faces. The query reads "give me all faces that share an edge with face1 and share an edge with face2"Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
where face1 and face2 are your two adjacent yellow faces. The query reads "give me all faces that share an edge with face1 and share an edge with face2"