mirror of
https://github.com/adrianschlatter/threadlib.git
synced 2025-07-31 03:10:28 +02:00
Added nut_sides parameter to allow creation of non-cylinder nut
This commit is contained in:
committed by
Adrian Schlatter
parent
32c20eb982
commit
40c02e5ecb
@@ -48,7 +48,8 @@ module bolt(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE) {
|
||||
};
|
||||
};
|
||||
|
||||
module nut(designator, turns, Douter, higbee_arc=20, fn=120, table=THREAD_TABLE) {
|
||||
module nut(designator, turns, Douter, higbee_arc=20, fn=120, nut_sides=120, table=THREAD_TABLE) {
|
||||
nut_sides = nut_sides == 120 ? fn : nut_sides;
|
||||
union() {
|
||||
specs = thread_specs(str(designator, "-int"), table=table);
|
||||
P = specs[0]; Dsupport = specs[2];
|
||||
@@ -57,7 +58,7 @@ module nut(designator, turns, Douter, higbee_arc=20, fn=120, table=THREAD_TABLE)
|
||||
|
||||
translate([0, 0, -P / 2])
|
||||
difference() {
|
||||
cylinder(h=H, d=Douter, $fn=fn);
|
||||
cylinder(h=H, d=Douter, $fn=nut_sides);
|
||||
translate([0, 0, -0.1])
|
||||
cylinder(h=H+0.2, d=Dsupport, $fn=fn);
|
||||
};
|
||||
|
Reference in New Issue
Block a user