mirror of
https://github.com/adrianschlatter/threadlib.git
synced 2025-08-02 04:40:18 +02:00
Simplified code by including the radius of rotation in the section
profile. Rotation to extrude thread is now always =0.
This commit is contained in:
@@ -29,7 +29,6 @@ in practice!
|
|||||||
|
|
||||||
use <thread_profile.scad>
|
use <thread_profile.scad>
|
||||||
|
|
||||||
phi = 55;
|
|
||||||
|
|
||||||
module BSPP_external_thread(pitch=2.309, turns=3, dpitch=31.68, higbee_arc=45, fn=120)
|
module BSPP_external_thread(pitch=2.309, turns=3, dpitch=31.68, higbee_arc=45, fn=120)
|
||||||
{
|
{
|
||||||
@@ -41,14 +40,14 @@ module BSPP_external_thread(pitch=2.309, turns=3, dpitch=31.68, higbee_arc=45, f
|
|||||||
zvalley = 0.03125 * P;
|
zvalley = 0.03125 * P;
|
||||||
zcrest = 0.13701 * P;
|
zcrest = 0.13701 * P;
|
||||||
|
|
||||||
section_profile = [[0, -P / 2 + zvalley], [0, +P / 2 - zvalley],
|
section_profile = [[rvalley, -P / 2 + zvalley], [rvalley, +P / 2 - zvalley],
|
||||||
[rcrest - rvalley, +zcrest],
|
[rcrest, +zcrest],
|
||||||
[rcrest - rvalley, -zcrest]];
|
[rcrest, -zcrest]];
|
||||||
|
|
||||||
straight_thread(
|
straight_thread(
|
||||||
section_profile=section_profile,
|
section_profile=section_profile,
|
||||||
higbee_arc=higbee_arc,
|
higbee_arc=higbee_arc,
|
||||||
r=rvalley,
|
r=0,
|
||||||
turns=turns,
|
turns=turns,
|
||||||
pitch=pitch,
|
pitch=pitch,
|
||||||
fn=fn);
|
fn=fn);
|
||||||
@@ -64,14 +63,14 @@ module BSPP_internal_thread(pitch=2.309, turns=3, dpitch=31.86, higbee_arc=45, f
|
|||||||
zvalley = 0.03125 * P;
|
zvalley = 0.03125 * P;
|
||||||
zcrest = 0.13701 * P;
|
zcrest = 0.13701 * P;
|
||||||
|
|
||||||
section_profile = [[0, P / 2 - zvalley], [0, -P / 2 + zvalley],
|
section_profile = [[rvalley, P / 2 - zvalley], [rvalley, -P / 2 + zvalley],
|
||||||
[rcrest - rvalley, -zcrest], [rcrest - rvalley, +zcrest]];
|
[rcrest, -zcrest], [rcrest, +zcrest]];
|
||||||
|
|
||||||
rotate(180) // rotate by half a turn to fit external thread
|
rotate(180) // rotate by half a turn to fit external thread
|
||||||
straight_thread(
|
straight_thread(
|
||||||
section_profile=section_profile,
|
section_profile=section_profile,
|
||||||
higbee_arc=higbee_arc,
|
higbee_arc=higbee_arc,
|
||||||
r=rvalley,
|
r=0,
|
||||||
turns=turns,
|
turns=turns,
|
||||||
pitch=pitch,
|
pitch=pitch,
|
||||||
fn=fn);
|
fn=fn);
|
||||||
|
Reference in New Issue
Block a user