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 to make extrude solid not surfaces?
Lee_Hesketh
Member, Developers Posts: 148 ✭✭✭
Hi, what I need help with is I have performed an opExtrude() function and then used qCapEntity() to get the end face. I then have another opExtrude() to extrude the whole face another 3mm. However, the resulting geometry is a surface not a solid and I don't know why. Also if this wont work, how could I use the offset face feature like @NeilCooke's mortise and tenon script?
What I need is to extrude a user selected distance, which I have done, and then extrude again to perform a boolean subtraction, creating a mortise 3mm longer than the length of the tenon. Any ideas?
Thanks
Lee Hesketh
What I need is to extrude a user selected distance, which I have done, and then extrude again to perform a boolean subtraction, creating a mortise 3mm longer than the length of the tenon. Any ideas?
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,210A couple of things to keep in mind:
1. If you pass edges to opExtrude, you'll get a surface; if you pass faces, you'll get a solid. In this case, qCapEntity returns both edges and faces. You can do qEntityFilter(qCapEntity(...), EntityType.FACE) to get just the faces. (If you look at the debug output, it tells you that it resolved 4 edges, 1 face, and 4 vertices).
2. evaluateQuery returns an array of queries, not a query (and you can't usually pass an array of queries to an operation, like opOffsetFace, that expects one query) -- you can always pass the array to a qUnion to turn it into a single query, but in this case, it's better to just not evaluate the query in the first place (you probably tried that first and opOffsetFace probably failed because it was getting edges -- see point #1 above).
Hope this helps.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
1. If you pass edges to opExtrude, you'll get a surface; if you pass faces, you'll get a solid. In this case, qCapEntity returns both edges and faces. You can do qEntityFilter(qCapEntity(...), EntityType.FACE) to get just the faces. (If you look at the debug output, it tells you that it resolved 4 edges, 1 face, and 4 vertices).
2. evaluateQuery returns an array of queries, not a query (and you can't usually pass an array of queries to an operation, like opOffsetFace, that expects one query) -- you can always pass the array to a qUnion to turn it into a single query, but in this case, it's better to just not evaluate the query in the first place (you probably tried that first and opOffsetFace probably failed because it was getting edges -- see point #1 above).
Hope this helps.