Research notes on modeling a thread in freeCad

A while back Makerbot sent me a sample of a knurled 3d printed bolt and nut.
http://www.thingiverse.com/thing:9095

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.

http://jreinhardt.github.io/BOLTS/index.html

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. http://www.freecadweb.org/wiki/index.php?title=Macro_screw_maker1_2#Script

I was having some issues understanding the script and Danielle Falck pointed me here:  http://forum.freecadweb.org/viewtopic.php?f=3&t=5198&hilit=screw+sweep&start=20

Googling or something led me to here which got me real close: http://www.freecadweb.org/tracker/view.php?id=444
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])
makeSolid=bool(1)
isFrenet=bool(1)
pipe = Part.Wire(helix).makePipeShell([section],makeSolid,isFrenet)
Part.show(pipe)
[/sourcecode]

Here are some of thhelixe results..

Ok… this is looking promising.

helixAndUnthreadedStudBoltCut

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 *