Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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_sparksowen_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.


Business Systems and Configuration Controller
HWM-Water Ltd

Comments

  • mahirmahir Member, Developers Posts: 1,307 ✭✭✭✭✭
    Nice first steps! I had similar thoughts when I updated the Linear and Circular Pattern features to support seed location and radial direction.
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Please excuse the delay, I've been off work ill for far too long...  Decided to test renewed concentration by doing a bit more on this FS.

    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
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
    Not sure what the standard is... @gary_amadon ?  Also, I believe we'll be updating our builtin feature with a more complete set of sizes Real Soon Now (tm).
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Thanks @ilya_baran.

    Sods law dictates that you'd do a new one as soon as I finished my version  :'(  :p

    Cheers, Owen S,
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • PeteYodisPeteYodis Moderator, Onshape Employees Posts: 541
    @owen_sparks Yes, indeed we are adding the sizes you would expect...full with proper hole callouts in drawings.  
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    @PeteYodis with hole callouts on drawings is there going to be a way to edit, I had a Rectangular tube with a tapped hole on one side (thru 1 side only), all I could do was spec a depth, which wasn't quite right.
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • PeteYodisPeteYodis Moderator, Onshape Employees Posts: 541
    @brucebartlett We have plans to expand the editing/control of hole callouts.  Can you share your example via a ticket?  It sounds as if you want an end condition control in the hole feature that is not a depth, and you want the callout to match an appropriate end condition and not report a depth.  Correct?
Sign In or Register to comment.