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.

New Featurescript: Captive Nut

2»

Comments

  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    rashuge said:
    @Evan_Reese
    I tried the Bridge Counterbore but it doesn't actually work (that I can make happen) when you use yours to embed the nut inside of an object.  I then cannot get the Counterbore to allow the selection of the face of the captured nut.  Any thoughts?
    Will you share a link to what you're trying to do?
    Evan Reese
  • brad_simmonsbrad_simmons Member Posts: 8 PRO
    edited August 2023
    @Evan_Reese Not sure if my other message will appear but I am experiencing the same thing that Jesse_Starr reported with the script not working completely and the dialog not showing some of the options. I can get V21 to make the cutout for the nut but it does not generate the through hole for the bolt and a lot of that other stuff.

    Playing around with older versions, it appears that V18 is that latest one where everything available in that version appears to work.


  • brad_simmonsbrad_simmons Member Posts: 8 PRO
    Just came across this FS and it is a godsend.  Thank you so much.  I am having one issue and have one request. 

    For the request, could we have countersink along with counterbore?

    Now, maybe this countersink is there now but I'm having an issue seeing all of the options in the Nut Spec portion of the dialog box.  I an only see the first three options down to nut clearance.  This is with V21.  I had played with some previous versions and that's where I could see some other options like the counterbore but now with this one I am having this issue.  Still a relative novice to Onshape so maybe I'm doing something wrong.


  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    @brad_simmons
    The latest version is actually a scratch re-write from the original and I intentionally removed the hole options to make the feature more focused instead of trying to do it all in one go. After using the old one for a while I kept hitting points of frustration. I feel that it's easier to just use this feature in conjunction with the native hole feature to produce the result you need (use hole first, and this one second usually). I should make a new video though showing the workflow as you aren't the only confused person.
    Evan Reese
  • brad_simmonsbrad_simmons Member Posts: 8 PRO
    @brad_simmons
    The latest version is actually a scratch re-write from the original and I intentionally removed the hole options to make the feature more focused instead of trying to do it all in one go. After using the old one for a while I kept hitting points of frustration. I feel that it's easier to just use this feature in conjunction with the native hole feature to produce the result you need (use hole first, and this one second usually). I should make a new video though showing the workflow as you aren't the only confused person.

    Thanks @Evan_Reese.  I'll give the latest version another look then.  I will say that in the limited use I've had, having all of the options in one tool was quite handy.  Keep up the great work!

  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭

    Thanks @Evan_Reese.  I'll give the latest version another look then.  I will say that in the limited use I've had, having all of the options in one tool was quite handy.  Keep up the great work!

    I appreciate the feedback for sure! As of now, I don't expect to, but If I end up deciding to add it back in I'll be implementing it completely differently. I've gotten a lot better at code since the first one, and there was much to improve on.
    Evan Reese
  • petr_škaloudpetr_škaloud Member Posts: 2
    Hi @Evan_Reese , thanks for the great feature. As an RC modeler, I often design parts that need to be connected with a screw and a nut. This feature will help me, I don't have to have several nuts and a gauge on my desk all the time.
    I shared the links to your script and YouTube video in our Facebook community, and from that came the idea that you partially tried here, which is to add another type of nuts to the shape options in the pocket variant, namely heat-set inserts.
    I use metric threads and I know that they exist in several sizes, both thread and size in terms of nut height. Depending on the needs of the application, I choose nuts of different heights.
    It would be great if you extended the script with these options as well.
    Do you think it would be possible?
  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    @petr_škaloud
    I use heat set inserts too, but I'm not sure how I might accommodate them in this feature. My understanding is that heat set inserts are going to differ manufacturer to manufacturer, unless there's a standard I'm not aware of for the OD, hole size, and depth. It might make sense as its own feature instead of adding it to this one. Can you share some examples of where you're using heat set inserts, and which hardware you're using? Even better if you have a source for the sizes that should be supported (i.e. some kind of table).
    Evan Reese
  • michael3424michael3424 Member Posts: 688 ✭✭✭✭
    @Evan_Reese - you probably already know this, but looks like McMaster-Carr has dimensional data for both Imperial and metric heat set inserts and at least some of them have ASTM standard designations:

    https://www.mcmaster.com/products/inserts/?fbclid=IwAR1gYnzREUfz01CtLkuEZPpCdzcG0IDjxgds6U9zttBYY-kd2crYYDM44t4

  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    @Evan_Reese - you probably already know this, but looks like McMaster-Carr has dimensional data for both Imperial and metric heat set inserts and at least some of them have ASTM standard designations:

    https://www.mcmaster.com/products/inserts/?fbclid=IwAR1gYnzREUfz01CtLkuEZPpCdzcG0IDjxgds6U9zttBYY-kd2crYYDM44t4

    Yep, I order mine from there. I'd assume the ASTM standards pertain to the threads of the inserts, not the exterior dimensions of the inserts (which is what we'd need), but I could be wrong. 
    Evan Reese
  • michael3424michael3424 Member Posts: 688 ✭✭✭✭


    Yep, I order mine from there. I'd assume the ASTM standards pertain to the threads of the inserts, not the exterior dimensions of the inserts (which is what we'd need), but I could be wrong. 
    ASTM applying only to the threads hadn't occurred to me, but that makes sense.
  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    To be clear, that's my assumption, but I'm not positive. 
    Evan Reese
  • glen_dewsburyglen_dewsbury Member Posts: 769 ✭✭✭✭
    edited September 2023
    You are correct Evan. The insert listing is by internal thread dimensions. I was designing around them recently for a particular company. They had their own hole size to suit their use in plastic but not very different than install hole sizes listed in McMaster catalog or manufacturer list. Use case being 3d printed parts. I also looked up the manufacturer of the inserts to review their hole table but don't remember manufacture's name off hand.

  • glen_dewsburyglen_dewsbury Member Posts: 769 ✭✭✭✭
    I went back and looked through the rest of this thread after commenting and realized I was thinking of something else and spoke too quick. I'm thinking of a variation of captive nuts. The one I just listed would be a nice option for future if you get a chance.
  • armandoRRarmandoRR Member Posts: 14 PRO
    edited November 2023
    @Evan_Reese Thank you for all the work you've put into these featurescripts, they've been great additions to my workflow.

    On V21, embedded nut on a plane perpendicular to the print axis generates a support piece. I watched your YouTube video on this and even played with the examples in your document, but couldn't get it to not generate that support piece. Is there something I'm doing wrong here?

    Edit: I rolled back to V18, and the support piece is not generated (intended behavior)

  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    @armandoRR Thanks for pointing this out. I'll be honest, this project has taught me a lot of what not to do in a feature roll out, and I didn't really expect it to be linked over 2k times (as of now). That's a lot of use. In particular, I've not spent the time needed to communicate changes. For example, I re-wrote it from scratch at one point, but haven't updated the video, and that's confusing people. On the other hand I'm going it in spare time for free so I'm not going to be too hard on myself.

    All that said, I did get in there and dig around to get it to not create the support when the angle is 0. Give V22 a try and let me know if it works for ya.
    Evan Reese
  • armandoRRarmandoRR Member Posts: 14 PRO
    @Evan_Reese All good now on V22!

    Definitely don't feel bad about any of this. Maintaining open source projects is act of passion and simultaneously a chore. I would gladly help out maintaining the featurescripts I use of yours, but I'm not sure the best way to do that.

    I've seen some people use GitHub and the OnShape API to push document changes. If your featurescripts were hosted there, I could make changes and submit a pull request to you. Bug tracking and ReadMe could be on GitHub as well to always have the most up to date explanation.

     I'm not sure there is a native OnShape way to allow branching and pulling without giving everyone edit access to your documents.

  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    armandoRR said:
    ... I would gladly help out maintaining the featurescripts I use of yours, but I'm not sure the best way to do that.

    Thanks for the offer! I may take you up at some point, but I'm also not sure of the best way to do it at the community level. At the document level I suppose anyone could be added with edit access, then could branch and make updates. No need for now though.
    Evan Reese
  • matti_suuronenmatti_suuronen Member Posts: 19 ✭✭
    Tried the v22, and it seems I cannot get the offset to work with pocket nuts: https://cad.onshape.com/documents/c27d7aa4c7f3aabc59276920/w/10694608d59946802743e7bf/e/e0a78f69b29d807df9d72d47?renderMode=0&uiState=65586c7249be7029bc0ea382. If I add a hole first, it sort of works, but the nut gets totally enclosed. And it seems like the "pocket end bound" has no effect, but that might be quite well just because I do not quite understand what it should be supposed to do. 
    This would seem like a great addition to the 3d print design toolset, once I just understand how to make it work :)
  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    @matti_suuronen Thanks for pinging me about it. At it turns out, I've got a lot on my plate these days and don't expect to be able to review it anytime soon.

    @armandoRR since you mentioned it, maybe this is  a good example of one you could help on?
    Evan Reese
  • armandoRRarmandoRR Member Posts: 14 PRO
    Just got back from holiday travel. I'll take a look at this and see what's going on.
  • armandoRRarmandoRR Member Posts: 14 PRO
    edited December 2023
    Here you go. Relatively light bug fix that I actually caused when I asked @Evan_Reese to fix the support generation on embedded nuts that don't need support.

    Pockets and slots need the nut support bodies to be created as it is then used by the boolean operator to create the subtracted space. The only one that doesn't need the nut support is the [embedded AND (normal OR negative normal)]. Later on, the nut support bodies are deleted for the pocket and slot (non-embedded type)

                    //START MOD
                    // const createNutSupport = !tolerantEquals(nutPlane.normal, pocketDirection)
                    //     && !tolerantEquals(nutPlane.normal, -pocketDirection)
                    //     && isEmbeddedType;
                        
                    const embeddedAndNormalToPrintDirection = 
                        isEmbeddedType
                        && (tolerantEquals(nutPlane.normal, pocketDirection)
                        || tolerantEquals(nutPlane.normal, -pocketDirection));
                    
                    const createNutSupport = !embeddedAndNormalToPrintDirection;
                    //END MOD

  • armandoRRarmandoRR Member Posts: 14 PRO
    edited December 2023
    @matti_suuronen
    I just pushed V23 to the main featurescript. Please test and let me know if there are any issues!
  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    @armandoRR
    I'm grateful for the help!
    Evan Reese
  • matti_suuronenmatti_suuronen Member Posts: 19 ✭✭
    @armandoRR, sorry for missing your update, but thanks, it works! Now it is also easy to understand what the different parameters are there for :smile:
  • ryan_angus231ryan_angus231 Member Posts: 2
    I'm an Onshape newby, and not sure what I'm doing wrong.  Just trying to add some simple captive nuts to my model, but I'm getting the error in the screenshot.  Anyone able to help?
  • EvanReeseEvanReese Member, Mentor Posts: 2,096 ✭✭✭✭✭
    hmm. Mouse over the red letters of the feature name and let me know what the message says.
    Evan Reese
Sign In or Register to comment.