mirror of
https://github.com/adrianschlatter/threadlib.git
synced 2025-08-10 04:16:49 +02:00
In trying to convert some of my existing openscad projects over to this module
I ran across the mental block of adding interior threads to a pre-cut hollow, which broke my brain a bit. I find it more natural to think of adding a threaded hole to a solid as a 'tap' or difference() operation, rather than differencing a hollow and then adding interior threads to it. For this reason I've created the, `tap(...)` module, which creates a positive of the internal threads suitable for differencing to produce a threaded tap hole.
This commit is contained in:
@@ -62,3 +62,17 @@ module nut(designator, turns, Douter, higbee_arc=20, fn=120, table=THREAD_TABLE)
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module tap(designator, turns, higbee_arc=20, fn=120, table=THREAD_TABLE) {
|
||||||
|
difference() {
|
||||||
|
specs = thread_specs(str(designator, "-int"), table=table);
|
||||||
|
P = specs[0]; Dsupport = specs[2];
|
||||||
|
H = (turns + 1) * P;
|
||||||
|
|
||||||
|
translate([0, 0, -P / 2]) {
|
||||||
|
cylinder(h=H, d=Dsupport, $fn=fn);
|
||||||
|
};
|
||||||
|
|
||||||
|
thread(str(designator, "-int"), turns=turns, higbee_arc=higbee_arc, fn=fn, table=table);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user