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.
Looping sketch creation with Extrude Cut or Boolean
Nath_McC
Member Posts: 127 PRO
Hi All,
I have a feature script for crate a broached hex, and I have three main issues, which I'm hoping I can get help on.
The link to the document is here: https://cad.onshape.com/documents/143d97f968e97efe61cf1d4f/w/86344877e8b059d820b296f3/e/7dd59a453a901190faf0a82a
I have a feature script for crate a broached hex, and I have three main issues, which I'm hoping I can get help on.
The link to the document is here: https://cad.onshape.com/documents/143d97f968e97efe61cf1d4f/w/86344877e8b059d820b296f3/e/7dd59a453a901190faf0a82a
- I am trying to have the extrude cut feature remove the hex, but it does not seem to work when using "operationType" : NewBodyOperationType.REMOVE: I'm unsure if this is correct or if I need to include a boolean subtraction operation. What is the best way to achieve the cut operation?
- If I select multiple points, I get an error; from troubleshooting, I think this is due to some issue with the //Create hex sketch. If I // out that section, the hole itself generates. Could somebody please look at my code and see where I am going wrong?
- The code below is on line 189 and removed the sketch for the drill hole, but if I copy it and replace id + "sketch" with id + "Hsketch", I hope to remove the hex/polygon sketch. Can I remove all the sketches in one operation at the end?
opDeleteBodies(context, id + "delete_sketch", { "entities" : qCreatedBy(id + "sketch", EntityType.BODY) });
Some of my code was taken from the ports feature script, but I can't figure out the last parts.
Any help would be greatly appreciated.
0
Comments