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.
Hex/square Nut hole-inset generation
Answers
-
This is really very awesome! Saves a ton of redious work.
Thanks a lot for sharing.
Would you consider adding a "flip direction" button so that it can work antinormal to the sketch?0 -
Hi, glad you like it.ulrich_petri said:This is really very awesome! Saves a ton of redious work.
Thanks a lot for sharing.
Would you consider adding a "flip direction" button so that it can work antinormal to the sketch?
I'm sure putting in the flip is a good idea. I'll have a look at that over the weekend. It might be possible to have the code work out the direction itself, if not I'll add the flip. Watch this space.
Thanks for the feedback.
Owen S.
Business Systems and Configuration Controller
HWM-Water Ltd0 -
Hi folks.
Small update for the issue described in previous posts whereby the feature will fail if a sketch is used that a body was extruded "up from" rather than "down into".
Example:-
The old version would work fine on left hand body, but fail on the right.
Features would be created below the sketch rather than above it! The through hole option would cause a complete failure as there is nothing to boolean into.
The updated version has a checkbox to "Flip Normal Direction", that will result in the features being generated above the sketch.
@ulrich_petri If you have a spare couple of minutes would you mind hitting the update feature option in your document and testing that the new version performs as you would wish?
As ever I hope this is useful, and if anyone has a problem or suggestion please don't hesitate to shout.
Cheers,
Owen S.
Business Systems and Configuration Controller
HWM-Water Ltd0 -
Link to file should any new user wish to use it:-
https://cad.onshape.com/documents/1f9c312c2a22b9c3e6d350d2/w/7ab9048aa3617d42e5d237f2/e/6b6a63443330063ffe9c9b25
Owen S.Business Systems and Configuration Controller
HWM-Water Ltd3 -
V10 has M3.5 option added.
Regards, OwS.
Business Systems and Configuration Controller
HWM-Water Ltd0 -
Thanks Owen - this will be handy for me down the road a bit.0
-
Hi everybody,
god features are helpful for the moment i am only using them but i hope one day doing them
a little question/request, is it possible to add the smart surface selection as the normal feature hole where it begins the hole when the surface begin as in this image.

where i can make a long distance plane and project the point where i want the hole and the feature "knows" where to begin the hole for the head of the screw0 -
Hi @franco_otaola
That is a great idea, I've got a few changes I want to make so I'll look at that too.
Thanks for the suggestion.
Owen S.
Business Systems and Configuration Controller
HWM-Water Ltd1 -
@owen_sparks
Just wanted to drop in to say great job! I got a 3D printer for Christmas and have been adding these nut holes manually - your tool makes it so much easier.
Cheers!
-David2 -
@david_riedell, welcome to the forums and thanks for letting me know it's of use to you 😀
If you have any problems or suggestions please shout.
Cheers, Owen S.Business Systems and Configuration Controller
HWM-Water Ltd2 -
@owen_sparks Thank you so much for putting this together! It's going to save me a huge effort!
1 issue and 1 feature request.
Issue:
Even though I defined the target as the yellow part (wire box - front) the remove for the nut still targets the other parts there in blue (m3 bolts) when it shouldn't. Not a huge deal, but doesn't seem like this should be happening.
Feature Request:
my designs are generally for 3d printing, so when I create my "nut pockets" I'll chamfer the edges by .4-.8 like the image below. This helps ensure the nut insertion is easy and centered on the hole. Could you add this "chamfer edges" as an option?
0 -
Thanks for the feedback.(1) With regards to the "issue", yup, that's a fault. I've fixed it this evening and will push an update in the morning after giving it a bit of a test.(2) For the chamfer I see your point. (The Nut pocket is a really old FS, I more recently did one for heatserts that is coded in a more sensible way and has chamfers...)Would you want to set tour own chamfer size or would you want it to be set for you by the feature? If set by the feature then the same size for all nuts or would it scale as the nut size goes up?Cheers, Owen S.Business Systems and Configuration Controller
HWM-Water Ltd0 -
I'd have a text field just like the sub flush. default it to .4 since that's a common size and the users can change it from there.owen_sparks said:Would you want to set tour own chamfer size or would you want it to be set for you by the feature? If set by the feature then the same size for all nuts or would it scale as the nut size goes up?0 -
Hi Owen, I was wondering can you add more sizes to this FS. I need a pocket for a 17" locking nut. Want to make a T-handle for holding the adjustment lock not on my belt sander. Not sure if there is a way I can copy the script and just add the need info to a list of how it work.. Not an advance user yet.. just a hobbyist.
Thanks0 -
Hi @doug_probst . Sorry for the slow response. I'm happy to add other sizes of explain how you could add them to a personal copy of the feature if you'd prefer. Just checking do you really have a belt sander that has a 17 inch nut? If so I want one of those sanders.Cheers, Owen S.Business Systems and Configuration Controller
HWM-Water Ltd0 -
I believe that was 17mm. I'm not "Norm" who probably does have a belt sander that big... I watched that episode where he was making a custom dining room table out of a tree in the yard, and I was wondering how he would get it super smooth, and of course puts the entire table into his sander...owen_sparks said:Hi @doug_probst . Sorry for the slow response. I'm happy to add other sizes of explain how you could add them to a personal copy of the feature if you'd prefer. Just checking do you really have a belt sander that has a 17 inch nut? If so I want one of those sanders.Cheers, Owen S.0 -
Hi @henry_feldman Thanks, that makes more sense. "Norm" is awesome. I especially liked the way he touched his safety glasses at the end of his safety spiel so those of us who could recite it word for word would know when to stop fast forwarding!
Business Systems and Configuration Controller
HWM-Water Ltd0 -
Thinking about it M17 is a pretty rare size... M16 and M18 are common. @Doug_Jones, assuming we are on the right track thinking about metric 17mm is it 17 mm wrench size or a 17mm thread? If it's the wrench size I believe that would make it an M10 thread which the feature will already accommodate :-)Cheers, Owen S.Business Systems and Configuration Controller
HWM-Water Ltd1 -
Hmm, I will have to check (it's been a while)owen_sparks said:Thinking about it M17 is a pretty rare size... M16 and M18 are common. @Doug_Jones, assuming we are on the right track thinking about metric 17mm is it 17 mm wrench size or a 17mm thread? If it's the wrench size I believe that would make it an M10 thread which the feature will already accommodate :-)Cheers, Owen S.0 -
hi owen, following romans post, the possibility to add the pocket to non planar faces would be great!owen_sparks said:Hi @romans_medvedevs .
Thanks for the kind words and sorry I missed your post.
The nut pockets are automatically set to the thickness of the nut. You can make them deeper with the "sub-flush" option if you wish, but there is not an option to set them to an explicit depth.
You can also make use of the "move face" option (regular Onshape Icon, not part of the featurescript) to move the pocket face up or down if that helps.
Cheers,
Owen S.
something like when you select hole with counterbored head and you select a point outside of the part and unselect the option beging from the sketch plane in 3D half of the time, at least myself i finish putting nuts in some weird surfaces, it could be really functional to add this option in the same way as is used with hole.
an image to show what i mean (for example for an sqaure nut):
0 -
@owen_sparks just wanted to leave a note here thanking you for your awesome work!
0 -
How do you actually use this?0
-
@owen_sparks
Just needed to join to say thank you for this. This is my first FS script I've used, and this is simply fantastic, Great work!0 -
Thanks a million Owen, That's exactly what I was looking for.
For the model I'm working on, I don't care if the hex nut is prostruding out of the piece, and as my (plastic) piece is thin, I need to ensure that there is a sufficient thickness of plastic below the hex nut to old the piece in place, without breaking the part.
The "sub flush" option seemed to be my go-to … but it does not accept negative values.
Would it be possible for you to enable negative values for "sub flush" ?
Thanks a lot Owen for this great feature
0 -
@owen_sparks Such an awesome FeatureScript — huge thanks for making it public!
I made a small improvement to add mate-connector alignment support.
Hard to believe it’s been about 10 years; it’s still super valuable and going strong.0





