Research notes on modeling a thread in freeCad

A while back Makerbot sent me a sample of a knurled 3d printed bolt and nut.

Of course I wound up making one of my own on the rockbot and it came out pretty nice. (Although I like to get my print speed up (which is a different story))

So this is pretty cool and I wanted to if I could find some macros to hack that could give me what I want. So I ran across J. Reinharts “Bolts” project.

Holly cow. This isn’t wasn’t what I was looking for but it looks like a very interesting project none the less. Basically it’s a pull down menu of not only Bolts but all kinds of different forms a well. It’s a lot more than bolts. Unfortunately the down side is that the bolts that I see here don’t have the threads modeled which is what I happen to need… But.. I happen to to find something here.

I was having some issues understanding the script and Danielle Falck pointed me here:

Googling or something led me to here which got me real close:
So a nip and a tuck and this script seems to works.

[sourcecode language=”python” wraplines=”false” collapse=”false”]
import Part, FreeCAD, math
from FreeCAD import Base

helix = Part.makeHelix(1,12,3)
edge1 = Part.makeLine((2.5,0,-0.125), (2.5,0,0.125))
edge2 = Part.makeLine((2.5,0,0.125), (3.1,0,0.419))
edge3 = Part.makeLine((3.1,0,0.419), (3.1,0,-0.419))
edge4 = Part.makeLine((3.1,0,-0.419), (2.5,0,-0.125))
section = Part.Wire([edge1,edge2,edge3,edge4])
pipe = Part.Wire(helix).makePipeShell([section],makeSolid,isFrenet)

Here are some of thhelixe results..

Ok… this is looking promising.


So working my way through the macro.

helix = Part.makeHelix(1,12,3)

So variables here are pitch height radui

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *