2019-03-24 22:58:45 +01:00
|
|
|
/*
|
|
|
|
Britisch Standard Pipe Thread
|
|
|
|
++++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
British Standard Pipe Thread is based on a triangular profile. The angle between flanks
|
|
|
|
is 55 deg (symmetrical). We use the following nomenclature:
|
|
|
|
|
|
|
|
- crest: The "summit" of a thread
|
2019-04-03 21:59:33 +02:00
|
|
|
- valley: The lowest point in the valley of a thread
|
|
|
|
- rcrest, rvalley: Radii of crest and groove, respectively
|
|
|
|
- rpitch = the mean radius of the original triangular profile
|
2019-03-24 22:58:45 +01:00
|
|
|
|
|
|
|
The crest and groove are both truncated by t/6. The radii at these flats are called
|
|
|
|
rmajor and rminor.
|
|
|
|
|
|
|
|
Note 1:
|
|
|
|
|
|
|
|
The specification requires that the flats are smoothed by circles that tangentially
|
|
|
|
match the flanks. We use a simpler version here: We create a triangular profile
|
|
|
|
and truncate the crests but not the grooves.
|
|
|
|
|
|
|
|
Note 2:
|
|
|
|
|
|
|
|
The specification requires allowances. This module creates threads with the ideal
|
|
|
|
rpitch for both external and internal threads (i.e., they just touch each other).
|
|
|
|
This is exactly at the edges of the given allowances and will not reliably work
|
|
|
|
in practice!
|
|
|
|
*/
|
|
|
|
|
|
|
|
use <thread_profile.scad>
|
2019-04-06 18:29:25 +02:00
|
|
|
include <THREAD_TABLE.scad>
|
2019-03-24 22:58:45 +01:00
|
|
|
|
2019-04-06 18:29:25 +02:00
|
|
|
function thread_specs(designator) =
|
|
|
|
/* Returns thread specs of thread-type 'designator' as a vector of
|
|
|
|
[pitch, Rrotation, Dsupport, section_profile] */
|
|
|
|
|
|
|
|
THREAD_TABLE[search([designator], THREAD_TABLE, num_returns_per_match=1,
|
|
|
|
index_col_num=0)[0]][1];
|
2019-03-24 22:58:45 +01:00
|
|
|
|
2019-04-06 18:29:25 +02:00
|
|
|
module thread(designator, turns, higbee_arc=45, fn=120)
|
2019-03-24 22:58:45 +01:00
|
|
|
{
|
2019-04-06 18:29:25 +02:00
|
|
|
specs = thread_specs(designator);
|
|
|
|
P = specs[0]; Rrotation = specs[1]; section_profile = specs[3];
|
|
|
|
echo(designator, "Rrotation", Rrotation);
|
2019-04-03 21:59:33 +02:00
|
|
|
straight_thread(
|
|
|
|
section_profile=section_profile,
|
|
|
|
higbee_arc=higbee_arc,
|
2019-04-06 18:29:25 +02:00
|
|
|
r=Rrotation,
|
2019-04-03 21:59:33 +02:00
|
|
|
turns=turns,
|
2019-04-06 18:29:25 +02:00
|
|
|
pitch=P);
|
2019-04-03 21:59:33 +02:00
|
|
|
}
|
|
|
|
|
2019-03-24 22:58:45 +01:00
|
|
|
|
|
|
|
// testing:
|
|
|
|
|
2019-04-06 18:29:25 +02:00
|
|
|
type = "G1";
|
2019-03-24 22:58:45 +01:00
|
|
|
intersection() {
|
|
|
|
color("Green")
|
2019-04-06 18:29:25 +02:00
|
|
|
translate([-100, 0, -100])
|
|
|
|
cube(200, 200, 200);
|
2019-03-24 22:58:45 +01:00
|
|
|
union() {
|
2019-04-06 18:29:25 +02:00
|
|
|
echo("Dsupport", thread_specs(str(type, "-ext"))[2]);
|
|
|
|
thread(str(type, "-ext"), turns=3, higbee_arc=20, fn=120);
|
2019-04-03 21:59:33 +02:00
|
|
|
translate([0, 0, -1.2])
|
2019-04-06 18:29:25 +02:00
|
|
|
cylinder(h=9, d=thread_specs(str(type, "-ext"))[2], $fn=120);
|
|
|
|
|
|
|
|
rotate(180)
|
|
|
|
thread(str(type, "-int"), turns=3, higbee_arc=20, fn=120);
|
2019-04-03 21:59:33 +02:00
|
|
|
translate([0, 0, -0.9])
|
|
|
|
difference() {
|
2019-04-06 18:29:25 +02:00
|
|
|
cylinder(h=9, r=200, $fn=120);
|
2019-04-03 21:59:33 +02:00
|
|
|
translate([0, 0, -0.1])
|
2019-04-06 18:29:25 +02:00
|
|
|
cylinder(h=10, d=thread_specs(str(type, "-int"))[2], $fn=120);
|
2019-04-03 21:59:33 +02:00
|
|
|
};
|
2019-03-24 22:58:45 +01:00
|
|
|
};
|
|
|
|
};
|