Parametric Adapter
Grok 4.5 · 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 7,013 bytes · SHA-256 4ac13ff2429e
// ============================================================================
// Adapter: 3/4" GHT Female → 1/2" NPT Male
// Units: millimeters
// Library: BOSL2 (https://github.com/BelfrySCAD/BOSL2)
// ============================================================================
// Install BOSL2 into your OpenSCAD libraries folder, then open this file.
// Preview with F5; render with F6. Enable "thrown-together" view to inspect
// internal threads and the gasket seat.
// ============================================================================
include <BOSL2/std.scad>
include <BOSL2/threading.scad>
$fn = $preview ? 72 : 144;
// ── Scale helpers ──────────────────────────────────────────────────────────
IN = 25.4;
// ─── 3/4" GHT (Garden Hose / 3/4-11.5 NH) ──────────────────────────────────
// Straight thread. Female receives a standard male garden-hose coupling
// and seals on a flat washer seat below the threads.
GHT_MAJOR = 1.0625 * IN; // 26.9875 mm – nominal major diameter
GHT_PITCH = IN / 11.5; // ≈ 2.209 mm (11.5 TPI)
GHT_THREAD_L = 12.5; // usable female thread depth
GHT_SEAT_H = 3.0; // solid washer-seat land under the threads
GHT_OD = 32.0; // outer diameter of the female socket
GHT_ENTRY_CH = 1.5; // lead-in chamfer depth at the open end
// ─── 1/2" NPT Male ─────────────────────────────────────────────────────────
// Tapered National Pipe Thread. BOSL2 encodes the 1:16 taper, TPI, and
// major diameter for standard pipe sizes.
NPT_SIZE = 1/2; // nominal size passed to npt_threaded_rod()
NPT_LEN = 15.0; // external thread length (typical engagement ≈ 13 mm)
// ─── Body / wrench flats ───────────────────────────────────────────────────
HEX_AF = 27.0; // hex across-flats (≈ 1-1/16")
HEX_H = 9.0; // hex section height
BORE = 15.5; // through-bore ≈ schedule-40 1/2" ID
BORE_CHAMFER = 1.2; // entry chamfer on both open ends
// ─── Derived layout (Z builds upward from the NPT tip) ─────────────────────
Z_NPT_TOP = NPT_LEN;
Z_HEX_TOP = Z_NPT_TOP + HEX_H;
Z_GHT_BOT = Z_HEX_TOP; // GHT body starts on top of hex
Z_SEAT = Z_GHT_BOT + GHT_SEAT_H; // washer-seat face (Z of seat plane)
Z_GHT_TOP = Z_SEAT + GHT_THREAD_L; // open mouth of female GHT
TOTAL_H = Z_GHT_TOP;
// ============================================================================
// Adapter
// ============================================================================
module ght_npt_adapter() {
difference() {
// ── Outer solid ────────────────────────────────────────────────────
union() {
// Male 1/2" NPT (tapered external threads, tip at Z=0)
npt_threaded_rod(
size = NPT_SIZE,
l = NPT_LEN,
bevel1 = true, // lead-in bevel at the tip
bevel2 = false,
anchor = BOTTOM
);
// Hex wrench section
up(Z_NPT_TOP)
linear_extrude(height = HEX_H)
hexagon(id = HEX_AF);
// Female socket cylinder (GHT outer body)
up(Z_GHT_BOT)
cyl(d = GHT_OD, h = GHT_SEAT_H + GHT_THREAD_L, anchor = BOTTOM);
// Small blend under the socket (helps print orientation / strength)
up(Z_HEX_TOP)
cyl(d1 = HEX_AF * cos(30) * 0.95, d2 = GHT_OD, h = 1.5, anchor = BOTTOM);
}
// ── Through-bore ───────────────────────────────────────────────────
cyl(d = BORE, h = TOTAL_H + 2, anchor = BOTTOM);
// Bore entry chamfer – NPT end
up(-0.01)
cyl(d1 = BORE + 2 * BORE_CHAMFER, d2 = BORE, h = BORE_CHAMFER + 0.01, anchor = BOTTOM);
// Bore exit chamfer – GHT seat (also helps define the washer ID)
up(Z_SEAT + 0.01)
cyl(d1 = BORE, d2 = BORE + 2 * BORE_CHAMFER, h = BORE_CHAMFER, anchor = TOP);
// ── Internal 3/4" GHT thread ───────────────────────────────────────
// Thread starts above the washer seat. A slight extra length guarantees
// a clean cut through the open end of the body.
up(Z_SEAT - 0.05)
threaded_rod(
d = GHT_MAJOR,
l = GHT_THREAD_L + 1.0,
pitch = GHT_PITCH,
internal = true,
blunt_start = true,
bevel = false,
anchor = BOTTOM
);
// ── Lead-in chamfer at the female mouth ────────────────────────────
up(Z_GHT_TOP + 0.01)
cyl(
d1 = GHT_MAJOR + 0.4,
d2 = GHT_MAJOR + 0.4 + 2 * GHT_ENTRY_CH,
h = GHT_ENTRY_CH + 0.01,
anchor = TOP
);
// Slight relief under the seat thread start so the first thread
// doesn't crash into a hard shoulder (helps mate with male GHT).
up(Z_SEAT)
cyl(d = GHT_MAJOR - 1.6, h = 0.8, anchor = BOTTOM);
}
}
// ============================================================================
// Optional dimensional tags (preview only)
// ============================================================================
module _label(txt, pos, ang = [90, 0, 0]) {
if ($preview)
translate(pos)
rotate(ang)
color("DarkSlateGray")
linear_extrude(0.3)
text(txt, size = 2.2, halign = "center", valign = "center");
}
// ============================================================================
// Build
// ============================================================================
ght_npt_adapter();
// Dimension callouts (visible in preview, ignored in STL)
_label("1/2\" NPT M", [0, -HEX_AF/2 - 3, NPT_LEN/2], [90, 0, 0]);
_label("3/4\" GHT F", [0, -GHT_OD/2 - 3, (Z_SEAT + Z_GHT_TOP)/2], [90, 0, 0]);
_label(str("H≈", TOTAL_H, " mm"), [HEX_AF/2 + 4, 0, HEX_H/2 + Z_NPT_TOP], [90, 0, 90]);