FreeCAD Hack (turn that Hole inside out)

A place to share learning material: written tutorials, videos, etc.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

FreeCAD Hack (turn that Hole inside out)

Post by TheMarkster »

FreeCAD has threaded Holes in 0.20, but still no threaded rod in Part Design. (Fasteners workbench can be used, as can ThreadProfile workbench.)

With this hack we can convert a Hole into a threaded rod. Steps:

Create a Hole as you normally would, enabling the Threaded and Model Thread properties, and selected the desired profile -- e.g. M6 coarse.
Select the Hole in the tree and press Ctrl+Shift+P. This sends the Hole as variable "obj" to the python console.
In the python console enter:

Code: Select all

Part.show(obj.AddSubShape)
Boom! Threaded rods. You can drag the Shape object into a Part Design body where it can be used as a BaseFeature for further (non-parametric) modeling if you like.
Snip macro screenshot-9f92c9.png
Snip macro screenshot-9f92c9.png (30.56 KiB) Viewed 3038 times
Note: You will want your rods slightly smaller than the threaded holes to allow for some clearance, so you'll want to adjust the offset properties to account for this with some trial and error if 3D printing.

You can also use my macro PDWrapper (available in the Addon Manager) to convert Holes into additive features for a more parametric way of doing this.

I had to remove the Shape object for the file to be small enough for the forum.
Attachments
hole_inside_out.FCStd
(870.18 KiB) Downloaded 60 times
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD Hack (turn that Hole inside out)

Post by chrisb »

Thanks for sharing. You can try to switch off ModelThread for the full upload.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply