Parametric Adapter
GPT 5.6 Luna · legacy
Reviews & generation details
Reviews
No human review yet. Unreviewed does not mean unsuccessful.
Generation context
Imported historical artifact. Its exact original instructions and lineage are not known.
Generation prompt · exact text unavailable
See the current prompt for reference. It may differ from the instructions used to generate this artifact.
Inspect original source 2,211 bytes · SHA-256 ee072d2981f5
// 3/4" GHT Female to 1/2" NPT Male adapter
// Dimensions are in millimeters.
// Requires the BOSL2 library in the OpenSCAD library path.
include <BOSL2/std.scad>
include <BOSL2/threading.scad>
$fn = 96;
// Thread standards
GHT_MAJOR = 26.44; // 3/4-11.5 NH/GHT nominal major diameter
GHT_PITCH = 25.4 / 11.5;
GHT_LENGTH = 18;
NPT_MAJOR = 21.34; // 1/2-14 NPT nominal major diameter
NPT_PITCH = 25.4 / 14;
NPT_LENGTH = 17;
NPT_TAPER = 1/16; // NPT taper, diameter change per unit length
BODY_TOP = GHT_LENGTH + 3;
TOTAL_LENGTH = BODY_TOP + NPT_LENGTH;
BORE = 12.7; // nominal 1/2 inch flow passage
module outer_body() {
// Broad hose-thread collar, with a short hex section for tightening.
union() {
cylinder(d=30, h=13, anchor=BOT);
up(10)
cylinder(d=32, h=8, $fn=6, anchor=BOT);
// Shoulder and the smaller pipe-thread boss.
up(GHT_LENGTH)
cylinder(d1=30, d2=23.5, h=3, anchor=BOT);
up(BODY_TOP)
cylinder(d=23.5, h=NPT_LENGTH, anchor=BOT);
}
}
module ght_female_thread_void() {
// BOSL2 produces the helical internal thread form when internal=true.
// The extra length at either end guarantees a clean through opening.
up(-1)
threaded_rod(
d=GHT_MAJOR,
l=GHT_LENGTH + 2,
pitch=GHT_PITCH,
internal=true,
bevel=false,
anchor=BOT
);
}
module npt_male_thread() {
// BOSL2's NPT primitive supplies the 1:16 tapered pipe thread.
npt_threaded_rod(
d=NPT_MAJOR,
l=NPT_LENGTH,
pitch=NPT_PITCH,
taper=NPT_TAPER,
bevel=false,
anchor=BOT
);
}
module adapter() {
difference() {
union() {
outer_body();
up(BODY_TOP)
npt_male_thread();
}
// Continuous fluid passage. It also removes the solid center of
// the threaded primitives while leaving their thread crests intact.
up(-1)
cylinder(d=BORE, h=TOTAL_LENGTH + 2, anchor=BOT);
// Female GHT thread cavity.
ght_female_thread_void();
}
}
adapter();