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
-
Thanks @eisen_montalvo for posting your custom feature - here is my unfinished attempt:
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!
Senior Director, Technical Services, EMEA2 -
Checkout std/cylinerCast.fs. This is the utility function used in our hole drilling. It has facilities to measure the starting point for the back side drilling. If you and questions, feel free to ask.1
-
Thank you @NeilCooke for sharing your code and showing me a different way of thinking and solving problems in FeatureScript.
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.
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.0 -
@eisen_montalvo - how do I access your code?
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."0 -
@lane_slabuagh
I think the latest version is here: https://cad.onshape.com/documents/5789a3c4e4b0e65410faa582/w/dc0aed9cbd48b77b511c6127/e/2e58c8f3f3e74edffd92ea75Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc1 -
I'm sorry Lane, I forgot to update the link after making some changes that Onshape requested. Thank you Ilya for replying with the correct link.
0 -
THIS DOESN'T WORK ON SHORT PARTS UNDER 4 INCHES.
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
-1 -
Agree with dave_odle, needs an option to control the distance between holes, inset from a second edge selection and finally a 'count' to control the no. of holes to cut starting from the inset edge.
These three options (together with your current 'auto mode') would make this feature script perfect.
Well done on the initial script though!
0


