3Dプリンタでねじを作る
- 直径1cmのねじをよく使う
元ネタ
Public Domain
嵌め合わせ
- ボルト10、ナット10.5で一応よさげ
- もう少しきつくしても良いかもしれない
https://inline.inajob.tk/img/twitter-5643382/%E5%B8%82%E8%B2%A9%E3%81%AE%E5%B0%8F%E5%9E%8B%E3%82%AD%E3%83%BC%E3%83%9C%E3%83%BC%E3%83%89%E3%82%92%E6%B5%81%E7%94%A8%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E3%83%9E%E3%82%A6%E3%83%B3%E3%82%BF%E3%82%923D%E3%83%97%E3%83%AA%E3%83%B3%E3%82%BF%E3%81%A7%E4%BD%9C%E3%82%8B/5e1f67f9-3d79-11ee-b22c-1a5b080e3b9a#.png
code
> code
/*
* polyScrewThread_r1.scad by aubenc @ Thingiverse
*
* This script contains the library modules that can be used to generate
* threaded rods, screws and nuts.
*
*
* CC Public Domain
*/
module screw_thread(od,st,lf0,lt,rs,cs)
{
or=od/2;
ir=or-st/2*cos(lf0)/sin(lf0);
pf=2*PI*or;
sn=floor(pf/rs);
lfxy=360/sn;
ttn=round(lt/st+1);
zt=st/sn;
intersection()
{
if (cs >= -1)
{
thread_shape(cs,lt,or,ir,sn,st);
}
full_thread(ttn,st,sn,zt,lfxy,or,ir);
}
}
module hex_nut(df,hg,sth,clf,cod,crs)
{
difference()
{
hex_head(hg,df);
hex_countersink_ends(sth/2,cod,clf,crs,hg);
screw_thread(cod,sth,clf,hg,crs,-2);
}
}
module hex_screw(od,st,lf0,lt,rs,cs,df,hg,ntl,ntd)
{
ntr=od/2-(st/2)*cos(lf0)/sin(lf0);
union()
{
hex_head(hg,df);
if ( ntl == 0 )
{
cylinder(h=0.01, r=ntr, center=true);
}
else
{
if ( ntd == -1 )
{
cylinder(h=ntl+0.01, r=ntr, $fn=floor(od*PI/rs), center=false);
}
else if ( ntd == 0 )
{
union()
{
cylinder(h=ntl-st/2,
r=od/2, $fn=floor(od*PI/rs), center=false);
cylinder(h=st/2,
r1=od/2, r2=ntr,
$fn=floor(od*PI/rs), center=false);
}
}
else
{
cylinder(h=ntl, r=ntd/2, $fn=ntd*PI/rs, center=false);
}
}
translate(0,0,ntl+hg) screw_thread(od,st,lf0,lt,rs,cs); }
}
module hex_screw_0(od,st,lf0,lt,rs,cs,df,hg,ntl,ntd)
{
ntr=od/2-(st/2)*cos(lf0)/sin(lf0);
union()
{
hex_head_0(hg,df);
if ( ntl == 0 )
{
cylinder(h=0.01, r=ntr, center=true);
}
else
{
if ( ntd == -1 )
{
cylinder(h=ntl+0.01, r=ntr, $fn=floor(od*PI/rs), center=false);
}
else if ( ntd == 0 )
{
union()
{
cylinder(h=ntl-st/2,
r=od/2, $fn=floor(od*PI/rs), center=false);
cylinder(h=st/2,
r1=od/2, r2=ntr,
$fn=floor(od*PI/rs), center=false);
}
}
else
{
cylinder(h=ntl, r=ntd/2, $fn=ntd*PI/rs, center=false);
}
}
translate(0,0,ntl+hg) screw_thread(od,st,lf0,lt,rs,cs); }
}
module thread_shape(cs,lt,or,ir,sn,st)
{
if ( cs == 0 )
{
cylinder(h=lt, r=or, $fn=sn, center=false);
}
else
{
union()
{
cylinder(h=lt-st+0.005, r=or, $fn=sn, center=false);
if ( cs == -1 || cs == 2 )
{
cylinder(h=st/2, r1=ir, r2=or, $fn=sn, center=false);
}
else
{
cylinder(h=st/2, r=or, $fn=sn, center=false);
}
if ( cs == 1 || cs == 2 )
{
cylinder(h=st/2, r1=or, r2=ir, $fn=sn, center=false);
}
else
{
cylinder(h=st/2, r=or, $fn=sn, center=false);
}
}
}
}
module full_thread(ttn,st,sn,zt,lfxy,or,ir)
{
if(ir >= 0.2)
{
{
{
polyhedron(points=pt,
triangles=[ 1,0,3,1,3,6,6,3,8,1,6,4, 0,1,2,1,4,2,2,4,5,5,4,6,5,6,7,7,6,8, 7,8,3,0,2,3,3,2,7,7,2,5 ]); }
}
}
else
{
echo("Step Degrees too agresive, the thread will not be made!!");
echo("Try to increase de value for the degrees and/or...");
echo(" decrease the pitch value and/or...");
echo(" increase the outer diameter value.");
}
}
module hex_head(hg,df)
{
rd0=df/2/sin(60);
x0=0; x1=df/2; x2=x1+hg/2;
y0=0; y1=hg/2; y2=hg;
intersection()
{
cylinder(h=hg, r=rd0, $fn=6, center=false);
rotate_extrude(convexity=10, $fn=6*round(df*PI/6/0.5))
}
}
module hex_head_0(hg,df)
{
cylinder(h=hg, r=df/2/sin(60), $fn=6, center=false);
}
module hex_countersink_ends(chg,cod,clf,crs,hg)
{
cylinder(h=chg+0.01,
r1=cod/2,
r2=cod/2-(chg+0.1)*cos(clf)/sin(clf),
$fn=floor(cod*PI/crs), center=false);
cylinder(h=chg+0.01,
r1=cod/2-(chg+0.1)*cos(clf)/sin(clf),
r2=cod/2,
$fn=floor(cod*PI/crs), center=false);
}
hg = 8; // height
sth = 4; // step height
clf = 55; // degrees
screw_cod = 10; // outer diameter
crs = 1; // resolution
*hex_screw(screw_cod,sth,clf,50,1.5,2,15,5,3,0);
nut_cod = 10.5; // outer diameter
df = 10+5;
hg = 5;
hex_nut(df,hg,sth,clf,nut_cod,crs);
<<