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.
Tangent connected query of a face using only the faces from another query
Raphael_Massicotte
Member Posts: 8 PRO
Hi,
I am writing a featurescript that will allow me to move (moveFace) a particular tab geometry only by clicking one of the face of the tab. The tab in question looks like this:
Now you might not be able to see it but there is a relief in the corner of the tab with fileted edges. What I want to achieve is clicking on the top face of the tab as such:
and making a code that will select all of the faces of that tab for the move face operation like this:
Now as you can see, I managed to make it work. I am using qTangentConnectedFaces which gives me all of the top faces since I have fillets everywhere. Then I use qSubtraction to remove the faces that are parallel to the original face. This works really well. However, if the corner of my plates are filleted I end up with this query:
Which is the real problem. I feel like I'm almost there. If I could add something that would take all the tangent connected faces to the top face but only within the faces of that query it would work since the tab is already isolated from the rest. How would you guys go on about this problem? If there is a better solution, I would like to know it but I would also like to know if what I'm thinking is doable for learning purposes.
Thanks
I am writing a featurescript that will allow me to move (moveFace) a particular tab geometry only by clicking one of the face of the tab. The tab in question looks like this:
Now you might not be able to see it but there is a relief in the corner of the tab with fileted edges. What I want to achieve is clicking on the top face of the tab as such:
and making a code that will select all of the faces of that tab for the move face operation like this:
Now as you can see, I managed to make it work. I am using qTangentConnectedFaces which gives me all of the top faces since I have fillets everywhere. Then I use qSubtraction to remove the faces that are parallel to the original face. This works really well. However, if the corner of my plates are filleted I end up with this query:
Which is the real problem. I feel like I'm almost there. If I could add something that would take all the tangent connected faces to the top face but only within the faces of that query it would work since the tab is already isolated from the rest. How would you guys go on about this problem? If there is a better solution, I would like to know it but I would also like to know if what I'm thinking is doable for learning purposes.
Thanks
0
Comments
EDIT: sorry I missed the small fillet. Not easy to do unless you are certain the geometry is the same each time. Move face will move the fillets with just that single top face selection though.
IR for AS/NZS 1100
Or this simpler code (it should support non-tangent edges)
IR for AS/NZS 1100
I don't think the second would work in every cases because of the qLargest query. But the first one is perfect. My code was exactly the same as yours apart from the qFaceOrEdgeBoundedFaces.