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.
Messing with Onshape's native features. (M2 Hole)
owen_sparks
Member, Developers Posts: 2,660 PRO
Hi folks.
I just attended @cody_armstrong 's "Customize & Create Your Own CAD Features". He was kind enough to give me a pointer to to editing the native OS features.
M3 is currently the smallest metric thread supported in the hole feature. A few people have asked for M2 holes to be added to the native feature. Now we as users can't do that, but we can copy native features (they're all open source, thanks for that BTW) then mess with them as we like and then have our own "tweaked" version.
So, as a test I thought I'd try to work out how to do it before the webinar ended. (I have very limited coding experience, so please don't laugh at that.)
So here we are:-
https://cad.onshape.com/documents/f10fbfcf5afbbef5d733ded5/w/14b03c0880f56001851ef3dc/e/a7a87475b52c2573d7ac5014
It's public so if it's any use to you please feel free to give it a try.
Please note:-
(1) I've only updated the "Clearance Option", not tapped. I'll stick that in tomorrow.
(2) This is built on a snapshot of the native feature. When OS update the original they will not show here, so I'd only recommend it is used in addition to the native one and is then deleted when OS release a hole.fs that has M2 built in.
I post this not as a "look at me isn't this clever", but as a gentle nudge to anyone who would like to make a very small change to how a feature works, but feels Featurescript is beyond them. You'll be working in a copy so nothing bad can happen.
The world needs more featurescripters. And a better term for those who write FS.
Cheers,
Owen S.
I just attended @cody_armstrong 's "Customize & Create Your Own CAD Features". He was kind enough to give me a pointer to to editing the native OS features.
M3 is currently the smallest metric thread supported in the hole feature. A few people have asked for M2 holes to be added to the native feature. Now we as users can't do that, but we can copy native features (they're all open source, thanks for that BTW) then mess with them as we like and then have our own "tweaked" version.
So, as a test I thought I'd try to work out how to do it before the webinar ended. (I have very limited coding experience, so please don't laugh at that.)
So here we are:-
https://cad.onshape.com/documents/f10fbfcf5afbbef5d733ded5/w/14b03c0880f56001851ef3dc/e/a7a87475b52c2573d7ac5014
It's public so if it's any use to you please feel free to give it a try.
Please note:-
(1) I've only updated the "Clearance Option", not tapped. I'll stick that in tomorrow.
(2) This is built on a snapshot of the native feature. When OS update the original they will not show here, so I'd only recommend it is used in addition to the native one and is then deleted when OS release a hole.fs that has M2 built in.
I post this not as a "look at me isn't this clever", but as a gentle nudge to anyone who would like to make a very small change to how a feature works, but feels Featurescript is beyond them. You'll be working in a copy so nothing bad can happen.
The world needs more featurescripters. And a better term for those who write FS.
Cheers,
Owen S.
Business Systems and Configuration Controller
HWM-Water Ltd
HWM-Water Ltd
3
Comments
Now updated for the following counterbores:- M2, M2.5, M24, M30, M36, M42 and M48.
One nice thing is the way OS handle this data. Even though it's just my lash-up data transfers properly to drawings:-
Please bear with me on the countersinks, I'm not sure what standard OS have used... It might be BS EN ISO 10642:1998, @kevin_o_toole_1 or @ilya_baran is that the case please?
Cheers, Owen S
HWM-Water Ltd
Sods law dictates that you'd do a new one as soon as I finished my version
Cheers, Owen S,
HWM-Water Ltd
Twitter: @onshapetricks & @babart1977