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.
New FeatureScript: Pocket Holes
eisen_montalvo
Member Posts: 3 ✭
Hi everybody,
I would like to share my first FeatureScript: Pocket Holes. The feature is very straight forward:
You can find the FeatureScript here: https://cad.onshape.com/documents/5c9f5a0c9e9568a64f8fce0f/w/5f5fb2a214796377ad0d8f98/e/6290b4d3ef8ef9df035b121a
Future improvements:
Let me know if you have any other ideas.
I would like to share my first FeatureScript: Pocket Holes. The feature is very straight forward:
- Choose entry face
- Choose exit face
- Select vertices where the pocket holes will be created
- Select thickness of part that will have the pocket holes
You can find the FeatureScript here: https://cad.onshape.com/documents/5c9f5a0c9e9568a64f8fce0f/w/5f5fb2a214796377ad0d8f98/e/6290b4d3ef8ef9df035b121a
Future improvements:
- Calculate thickness automatically from the part
- Add option to add mate connectors for screws
Let me know if you have any other ideas.
Tagged:
1
Comments
https://cad.onshape.com/documents/06fec7e8ca6ea0debc1b30cc/w/d458179d8dece090228faee2/e/7e02268cde3b2bc764d68f52
I was focused more on selection rather than correct hole sizing, but you will see that with a single edge selection it will work out which face is which and the thickness of the part and place a number of pocket holes. Please feel free to merge the two codes together to make a super custom pocket hole feature!
I went ahead and merged some of your code, added the mate connectors, and simplified the interface. Now there are only three options:
- Edge
- Application type (90 degrees or straight)
- Option to add the mate connector.
The thickness and the location of the pocket holes are calculated automatically using the suggested distances from Kreg. I'm pretty sure the code can be optimized quite a bit. But for now, it does the job. I will optimize the script another day.Thank you @bobt for sharing the code. I need to dedicate some time to go through it. When I have questions, I will sure to ask.
When I click it, it says the following: "Failed to load document for workspace. Resource does not exist, or you do not have permission to access it."
I think the latest version is here: https://cad.onshape.com/documents/5789a3c4e4b0e65410faa582/w/dc0aed9cbd48b77b511c6127/e/2e58c8f3f3e74edffd92ea75
IT LOCATES THE POCKET HOLES TOO FAR APART.
ALSO IS THERE A WAY TO HAVE AN INPUT FOR THE NUMBER OF HOLES WE NEED ON A EDGE
ALSO A DISTANCE WE CAN SET FROM THE OUTSIDE EDGE IN
These three options (together with your current 'auto mode') would make this feature script perfect.
Well done on the initial script though!