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.
Custom Feature: Heat Set Insert (Threaded inserts for 3D Printed Parts)
brett_jaeger168
Member Posts: 5 ✭✭
Custom Feature: Heat Set Insert
I wanted to learn FeatureScript, so I created a new custom feature to place cavities for heat set inserts into 3d Printed parts quickly and easily. I have been really happy with it and have found that it really speeds up my designs, so I wanted to share it out!
Right now, it includes dimensions for 3 different brands of inserts: McMaster, CNC Kitchen, and Ktehloy on Amazon.
The featurescript creates a cavity that is the correct diameter for the insert selected from the drop down menu and the correct depth to allow the melted plastic to have somewhere to go when the insert melted in.
My preferred workflow is to use the normal Hole tool to make tapped holes and set the location of the heat set insert using mate connectors in the Heat Set Insert tool. Let me know if you want any features added to make it even better!

Comments
Amazing!
Don't know yet how to fork it from your file, but I created a copy and added a Lookup Table for Ruthex Inserts, which are very popular in europe/germany:
Wow! I made this same feature a few months ago and was just getting ready to officially "publish" it (once I made an icon and pdf and met all other requirements). I'm going to take a look at how you did it and see how close we were…
the copper coloring of the faces is a great bonus!
Awesome! I've made something similar for internal user before, but it's great to have a general purpose tool. thanks for sharing it!
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
Noice! 😎
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
Thanks @t_e652 ! I have added the Ruthex info into the official featurescript! You building that lookup table for me saved me a lot of time!
Perfect FeatureScript - this saved me thousands of hours. You're the best!
@brett_jaeger168 Very cool FeatureScript, almost what I was looking for. "I" (claude.ai and I) modified the script to be able to add chamfers and screw holes. I don't know how to fork off your script so I made a new one. I give full credit to you and @t_e652 at the start of the code and the guide. I hope that works out for you, feel free to use anything useful from "my" code.
Link to my script: https://cad.onshape.com/documents/9162edf9d20fe06a0aadc971/w/91214d4ca77def1b802fe98b/e/9f380e83ff4145f543e11fdf
could it be modified to also add an insert to the first hole so it can be replicated in the assembly?
Interesting thought and I can see some of the convenience here. I'd personally rather have a single source model in a part library though and only add that to assemblies. If the feature adds it, then it's equivalent to deriving it in. Onshape is going to see them as different parts every time you use it, or if you used the feature in 2 different places. You BoMs will get weird. Maybe that's not important for what you're working on and the convenience matters more, in which case, it's totally doable.
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
Great script, I would suggest you change your merge scope filter to mirror the one used for the hole feature:
annotation { "Name" : "Merge Scope", "Filter" : (EntityType.BODY && BodyType.SOLID && ModifiableEntityOnly.YES && AllowMeshGeometry.YES) } definition.mergeScope is Query;That way we can merge with meshes, great for putting heat set inserts on laser scanned parts for mounting.
Thanks for the suggestion Damian! I made the change.
Great script! However, I noticed small differences in the values you have for CNC kitchen inserts, and what I see on their site. I noticed this because I was troubleshooting why my printed holes were coming out too small. In part I needed to correct the printer (Bambu H2D) with an XY hole compensation, but this did not account for all of the difference. I checked your table, and it looks like M4, M5, M6 are not correct, as well as missing M10 (not that I need it).
Correct values from CNC kitchen documents:
M4 = 5.7
M5 = 6.5
M6 = 8.1
M10 (not on your list) = 12.0
Also I think the depths for M6 and M8 may be incorrect.
Possible to update?
Thanks again for a very handy script!
I’ve been looking into supporting inserts for an injection molded boss feature. It seems that there is a huge variety of inserts and hole sizes, much of which are specific to the brand and type of insert. Already, dialing in ID for thread forming screws is dependent on brand/type/material.
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
Each will probably have to measure the inserts they use and edit the presets. Mine (by Kerbkonus) do also not match precisely.
I've run into this as well where I actually started using softwood furniture inserts instead of the heat set ones for ease of installation, and didn't want to go through the trouble of forking the 3d printed insert feature and modifying it to have threaded insert options. Amalgamate lets me tweak and refine my insert geometry without getting my fingers into the code of a custom feature I didn't write. The worst is that McMaster sells these flanged softwood inserts from two different suppliers under the same label, and none of the thread pitches are consistent in the same vendor's stock let alone across the two vendors. They even have completely different finishes from each other.
If you're paying attention to my posts lately you might get the impression that Amalgamate is my first solution to every problem, and you'd be pretty much completely correct to assume so. It's just that versatile.
Derek Van Allen | Engineering Consultant | Meddler