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.
How do I get the vertices at the corners of a planar face?
Aaron_Hoover
Member Posts: 35 EDU
I'm creating a FeatureScript that generates a half lap joint between two rectangular solids that are overlapped. (One half of the joint is shown below.)
I'd like to be able to generate a sketch on the plane that results from the Boolean (the "check" of the half lap) and position the sketch with respect to the resulting geometry. I'm able to get that face using qCreatedBy, qOwnedByBody, and qLargest on the Boolean tool I used to generate the geometry.
After that, I thought I could pass the query for the face to qOwnedByBody and specify EntityType.VERTEX to get the vertices, but that query resolves to nothing. Are vertices (and edges, for that matter) not owned by faces? If not, what is the proper way to query for the vertex positions for just this face?
I'd like to be able to generate a sketch on the plane that results from the Boolean (the "check" of the half lap) and position the sketch with respect to the resulting geometry. I'm able to get that face using qCreatedBy, qOwnedByBody, and qLargest on the Boolean tool I used to generate the geometry.
After that, I thought I could pass the query for the face to qOwnedByBody and specify EntityType.VERTEX to get the vertices, but that query resolves to nothing. Are vertices (and edges, for that matter) not owned by faces? If not, what is the proper way to query for the vertex positions for just this face?
1
Best Answer
-
konstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭for verteces of the face of the body you can use qVertexAdjacent(face, EntityType.VERTEX)
6
Answers
EDIT: I just checked out your lap. I use basically the exact same logic (Boolean intersection, split, subtraction, etc.) just without as much checking for special cases. Good to know I'm on the right track.
Plus @mbartlett21 maintains his own, more comprehensive list
@NeilCooke
Here: https://featurescripts.bubbleapps.io
IR for AS/NZS 1100