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
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
-
for verteces of the face of the body you can use qVertexAdjacent(face, EntityType.VERTEX)
6
Answers
-
for verteces of the face of the body you can use qVertexAdjacent(face, EntityType.VERTEX)
6 -
@Aaron_Hoover did you take a look at my lap joint? https://cad.onshape.com/documents/578ce95de4b0e425c1f00cda/w/cbc0b1ab48f411a4675afae1/e/6dbd408b8dc213a84767ec69Senior Director, Technical Services, EMEA0
-
@NeilCooke No, I hadn't seen your lap (I'm still trying to figure out how to find all the best/most relevant FeatureScripts to refer to for my project). It looks like this one will be super helpful. The base of many of the digital frame joints is a lap (and then some added extruded/Boolean'ed geometry). Thanks!
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.0 -
There is a list of features here: onshape.com/featurescript
Plus @mbartlett21 maintains his own, more comprehensive listSenior Director, Technical Services, EMEA0 -
0



