From 18bcf8677702e754b1ab34d0eed213e517ce9d48 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Mon, 24 Mar 2025 22:06:49 -0400 Subject: [PATCH] Define shared variables --- scad/bolex_base_plate.scad | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scad/bolex_base_plate.scad b/scad/bolex_base_plate.scad index 70a53d9..6ee6049 100644 --- a/scad/bolex_base_plate.scad +++ b/scad/bolex_base_plate.scad @@ -3,6 +3,8 @@ use <./common/common.scad> PLATE_X = -6; PLATE_Y = 25; +RAIL_SPACING_HALF_IN = 30; +HALF_IN_RAIL_D = 13; module bolex_debug (pad = 0) { cylinder(r = R(29) + pad, h = 10, center = true, $fn = 80); @@ -94,8 +96,8 @@ module base_plate (pos = [0, 0, 0], rot = [0, 0, 0], rails = "15mm") { } } } else if (rails == "1/2in") { - translate([15, -50, 0]) rotate([90, 0, 0]) cylinder(r = R(13), h = 100, center = true, $fn = 50); - translate([-15, -50, 0]) rotate([90, 0, 0]) cylinder(r = R(13), h = 100, center = true, $fn = 50); + translate([RAIL_SPACING_HALF_IN / 2, -50, 0]) rotate([90, 0, 0]) cylinder(r = R(HALF_IN_RAIL_D), h = 100, center = true, $fn = 50); + translate([-RAIL_SPACING_HALF_IN / 2, -50, 0]) rotate([90, 0, 0]) cylinder(r = R(HALF_IN_RAIL_D), h = 100, center = true, $fn = 50); } }