feat: RPLIDAR A1 mount bracket (Issue #596) #604

Merged
sl-jetson merged 1 commits from sl-mechanical/issue-596-rplidar-mount into main 2026-03-14 15:54:41 -04:00

View File

@ -1,502 +1,343 @@
// ============================================================ // ============================================================
// rplidar_mount.scad RPLIDAR A1 Elevated Bracket for 2020 T-Slot Rail // RPLIDAR A1 Mount Bracket Issue #596
// Issue: #561 Agent: sl-mechanical Date: 2026-03-14 // Agent : sl-mechanical
// (supersedes Rev A anti-vibration ring ring integrated as Part 4) // Date : 2026-03-14
// ============================================================
//
// Complete elevated mount system for RPLIDAR A1 on 2020 aluminium T-slot
// rail. Scanner raised ELEV_H mm above rail attachment point so the
// 360° laser scan plane clears the rover/tank chassis body.
//
// Architecture:
// T-nut base clamps to 2020 rail (standard thumbscrew interface)
// Column parametric-height hollow mast; USB cable routed inside
// Platform disc receives RPLIDAR via 4× M3 on Ø40 mm bolt circle
// Vibe ring anti-vibration isolation ring with silicone grommet seats
// Cable guide snap-on clips along column for USB cable management
//
// Part catalogue: // Part catalogue:
// Part 1 tnut_base() 2020 T-nut rail base + column stub socket // 1. tnut_base 2020 T-slot rail interface plate with M5 T-nut captive pockets
// Part 2 column() Hollow elevation mast (parametric ELEV_H) // 2. column hollow elevation column, 120 mm tall, 3 stiffening ribs, cable bore
// Part 3 scan_platform() RPLIDAR mounting disc + motor connector slot // 3. scan_platform top plate with Ø40 mm BC M3 mounting pattern, vibration seats
// Part 4 vibe_ring() Anti-vibration isolation ring (grommet seats) // 4. vibe_ring silicone FC-grommet isolation ring for scan_platform bolts
// Part 5 cable_guide() Snap-on cable management clip for column // 5. cable_guide snap-on cable management clip for column body
// Part 6 assembly_preview()
// //
// Hardware BOM (per mount): // BOM:
// 1× M3 × 16 mm SHCS + M3 hex nut rail clamp thumbscrew // 2 × M5×10 BHCS + M5 T-nuts (tnut_base to rail)
// 4× M3 × 30 mm SHCS RPLIDAR vibe_ring platform // 4 × M3×8 SHCS (scan_platform to RPLIDAR A1)
// 4× M3 silicone grommets (Ø6 mm) anti-vibration isolators // 4 × M3 silicone FC grommets Ø8.5 OD / Ø3.2 bore (anti-vibe)
// 4× M3 hex nuts captured in platform underside // 4 × M3 hex nuts (captured in scan_platform)
// 2× M4 × 12 mm SHCS column base socket bolts
// 2× M4 hex nuts captured in base socket
// 1× USB-A cable (RPLIDAR Jetson) routed through column bore
// //
// RPLIDAR A1 interface (caliper-verified Slamtec RPLIDAR A1): // Print settings (PETG):
// Body diameter : Ø70 mm // tnut_base / column / scan_platform : 5 perimeters, 40 % gyroid, no supports
// Bolt circle : Ø40 mm, 4× M3, at 45°/135°/225°/315° // vibe_ring : 3 perimeters, 20 % gyroid, no supports
// USB connector : micro-USB, right-rear quadrant, exits at 0° (front) // cable_guide : 3 perimeters, 30 % gyroid, no supports
// Motor connector : JST 2-pin, rear centreline
// Scan plane height : 19 mm above bolt mounting face
// Min clearance : Ø80 mm cylinder around body for 360° scan
//
// Parametric constants (override for variants):
// ELEV_H scan elevation above rail face (default 120 mm)
// COL_OD column outer diameter (default 25 mm)
// RAIL choice RAIL_W = 20 for 2020, = 40 for 4040 extrusion
//
// Print settings:
// Material : PETG (all parts); vibe_ring optionally in TPU 95A
// Perimeters : 5 (tnut_base, column, platform), 3 (vibe_ring, cable_guide)
// Infill : 40 % gyroid (structural), 20 % (vibe_ring, guide)
// Orientation:
// tnut_base face-plate flat on bed (no supports)
// column standing upright (no supports; hollow bore bridgeable)
// scan_platform disc face down (no supports)
// vibe_ring flat on bed (no supports)
// cable_guide clip-open face down (no supports)
// //
// Export commands: // Export commands:
// openscad rplidar_mount.scad -D 'RENDER="tnut_base_stl"' -o rpm_tnut_base.stl // openscad -D 'RENDER="tnut_base"' -o tnut_base.stl rplidar_mount.scad
// openscad rplidar_mount.scad -D 'RENDER="column_stl"' -o rpm_column.stl // openscad -D 'RENDER="column"' -o column.stl rplidar_mount.scad
// openscad rplidar_mount.scad -D 'RENDER="platform_stl"' -o rpm_platform.stl // openscad -D 'RENDER="scan_platform"' -o scan_platform.stl rplidar_mount.scad
// openscad rplidar_mount.scad -D 'RENDER="vibe_ring_stl"' -o rpm_vibe_ring.stl // openscad -D 'RENDER="vibe_ring"' -o vibe_ring.stl rplidar_mount.scad
// openscad rplidar_mount.scad -D 'RENDER="cable_guide_stl"' -o rpm_cable_guide.stl // openscad -D 'RENDER="cable_guide"' -o cable_guide.stl rplidar_mount.scad
// openscad -D 'RENDER="assembly"' -o assembly.png rplidar_mount.scad
// ============================================================ // ============================================================
// Render selector
RENDER = "assembly"; // tnut_base | column | scan_platform | vibe_ring | cable_guide | assembly
// Global constants
$fn = 64; $fn = 64;
e = 0.01; EPS = 0.01;
// Parametric elevation // 2020 rail
ELEV_H = 120.0; // scan plane elevation above rail face (mm) RAIL_W = 20.0; // extrusion cross-section
// increase for taller chassis; min ~60 mm recommended RAIL_H = 20.0;
SLOT_NECK_H = 3.2; // T-slot opening width
TNUT_W = 9.8; // M5 T-nut width
TNUT_H = 5.5; // T-nut height (depth into slot)
TNUT_L = 12.0; // T-nut body length
M5_D = 5.2; // M5 clearance bore
M5_HEAD_D = 9.5; // M5 BHCS head diameter
M5_HEAD_H = 4.0; // M5 BHCS head height
// RPLIDAR A1 interface constants // Base plate
RPL_BODY_D = 70.0; // scanner body outer diameter BASE_L = 60.0; // length along rail axis
RPL_BC_D = 40.0; // mounting bolt circle diameter (4× M3 at 45° offsets) BASE_W = 30.0; // width across rail
RPL_BOLT_D = 3.3; // M3 clearance bore BASE_T = 8.0; // plate thickness
RPL_SCAN_Z = 19.0; // scan plane height above mount face BOLT_PITCH = 40.0; // M5 bolt pitch along rail (centre-to-centre)
RPL_CLEAR_D = 82.0; // minimum radial clearance diameter for 360° scan
// Rail geometry (matches sensor_rail.scad) // Elevation column
RAIL_W = 20.0; COL_OD = 25.0; // column outer diameter
SLOT_OPEN = 6.0; COL_ID = 17.0; // inner bore (cable routing)
SLOT_INNER_W = 10.2; ELEV_H = 120.0; // scan plane above rail top face
SLOT_INNER_H = 5.8; COL_WALL = (COL_OD - COL_ID) / 2;
SLOT_NECK_H = 3.2; RIB_W = 3.0; // stiffening rib width
RIB_H = 3.5; // rib radial height
CABLE_SLOT_W = 8.0; // cable entry slot width
CABLE_SLOT_H = 5.0; // cable entry slot height
// T-nut geometry (matches sensor_rail_brackets.scad) // Scan platform
TNUT_W = 9.8; PLAT_D = 60.0; // platform disc diameter (clears RPLIDAR body Ø100 mm well)
TNUT_H = 5.5; PLAT_T = 6.0; // platform thickness
TNUT_L = 12.0; RPL_BC_D = 40.0; // RPLIDAR M3 bolt circle diameter (4 bolts at 45 °)
TNUT_M3_NUT_AF = 5.5; RPL_BORE_D = 36.0; // central pass-through for scan motor cable
TNUT_M3_NUT_H = 2.5; M3_D = 3.2; // M3 clearance bore
TNUT_BOLT_D = 3.3; M3_NUT_W = 5.5; // M3 hex nut across-flats
M3_NUT_H = 2.4; // M3 hex nut height
GROM_OD = 8.5; // FC silicone grommet OD
GROM_ID = 3.2; // grommet bore
GROM_H = 3.0; // grommet seat depth
CONN_SLOT_W = 12.0; // connector side-exit slot width
CONN_SLOT_H = 5.0; // connector slot height
// Base plate geometry // Vibe ring
BASE_FACE_W = 38.0; // wider than rail, provides column socket footprint VRING_OD = GROM_OD + 1.6; // printed retainer OD
BASE_FACE_H = 38.0; // height along rail Z VRING_ID = GROM_ID + 0.3; // pass-through with grommet seated
BASE_FACE_T = SLOT_NECK_H + 2.0; // plate depth (Y) VRING_T = 2.0; // ring flange thickness
// Column geometry // Cable guide clip
COL_OD = 25.0; // column outer diameter CLIP_W = 14.0;
COL_ID = 17.0; // column inner bore (cable routing + weight saving) CLIP_T = 3.5;
COL_SOCKET_D = COL_OD + 6.0; // socket boss OD (column inserts into base) CLIP_GAP = COL_OD + 0.4; // snap-fit gap (slight interference)
COL_SOCKET_L = 14.0; // socket depth in base (14 mm engagement) SNAP_T = 1.8;
COL_BOLT_BC = COL_OD + 4.0; // M4 column-lock bolt span (centre-to-centre) CABLE_CH_W = 8.0;
COL_SLOT_W = 5.0; // cable exit slot width in column base CABLE_CH_H = 5.0;
COL_SLOT_H = 8.0; // cable exit slot height
// Platform geometry // Utility modules
PLAT_OD = RPL_CLEAR_D + 4.0; // platform disc OD (covers scan clear zone) module chamfer_cube(size, ch=1.0) {
PLAT_T = 5.0; // platform disc thickness // simple chamfered box (bottom edge only for printability)
PLAT_SOCKET_D = COL_OD + 0.3; // column-top socket ID (slip fit) hull() {
PLAT_SOCKET_L = 12.0; // socket depth on platform underside translate([ch, ch, 0])
PLAT_RIM_T = 3.5; // rim wall thickness around RPLIDAR body cube([size[0]-2*ch, size[1]-2*ch, EPS]);
translate([0, 0, ch])
// Anti-vibration ring geometry cube(size - [0, 0, ch]);
RING_OD = RPL_BODY_D + 12.0; // 82 mm (body + 6 mm rim) }
RING_ID = 28.0; // central bore (connector/cable access)
RING_H = 4.0; // ring thickness
GROMMET_D = 7.0; // silicone grommet OD pocket
GROMMET_RECESS = 1.5; // grommet seating recess depth (bottom face)
// Cable guide clip geometry
GUIDE_CABLE_D = 6.0; // max cable OD (USB-A cable)
GUIDE_T = 2.0; // clip wall thickness
GUIDE_BODY_W = 20.0; // clip body width
GUIDE_BODY_H = 12.0; // clip body height
// Fastener sizes
M3_D = 3.3;
M4_D = 4.3;
M3_NUT_AF = 5.5;
M3_NUT_H = 2.4;
M4_NUT_AF = 7.0;
M4_NUT_H = 3.2;
// ============================================================
// RENDER DISPATCH
// ============================================================
RENDER = "assembly";
if (RENDER == "assembly") assembly_preview();
else if (RENDER == "tnut_base_stl") tnut_base();
else if (RENDER == "column_stl") column();
else if (RENDER == "platform_stl") scan_platform();
else if (RENDER == "vibe_ring_stl") vibe_ring();
else if (RENDER == "cable_guide_stl") cable_guide();
// ============================================================
// ASSEMBLY PREVIEW
// ============================================================
module assembly_preview() {
// Ghost 2020 rail section (250 mm)
%color("Silver", 0.28)
translate([-RAIL_W/2, -RAIL_W/2, 0])
cube([RAIL_W, RAIL_W, 250]);
// T-nut base at Z=60 on rail
color("OliveDrab", 0.85)
translate([0, 0, 60])
tnut_base();
// Column rising from base
color("SteelBlue", 0.85)
translate([0, BASE_FACE_T + COL_OD/2, 60 + BASE_FACE_H/2])
column();
// Vibe ring on top of platform
color("Teal", 0.85)
translate([0, BASE_FACE_T + COL_OD/2,
60 + BASE_FACE_H/2 + ELEV_H + PLAT_T])
vibe_ring();
// Scan platform at column top
color("DarkSlateGray", 0.85)
translate([0, BASE_FACE_T + COL_OD/2,
60 + BASE_FACE_H/2 + ELEV_H])
scan_platform();
// RPLIDAR body ghost
%color("Black", 0.35)
translate([0, BASE_FACE_T + COL_OD/2,
60 + BASE_FACE_H/2 + ELEV_H + PLAT_T + RING_H + 1])
cylinder(d = RPL_BODY_D, h = 30);
// Cable guides at 30 mm intervals along column
for (gz = [20, 50, 80])
color("DimGray", 0.75)
translate([COL_OD/2,
BASE_FACE_T + COL_OD/2,
60 + BASE_FACE_H/2 + gz])
rotate([0, -90, 0])
cable_guide();
} }
// ============================================================ module hex_pocket(af, depth) {
// PART 1 T-NUT RAIL BASE // hex nut pocket (flat-to-flat af)
// ============================================================ cylinder(d = af / cos(30), h = depth, $fn = 6);
// Standard 2020 rail T-nut attachment, matching interface used across }
// all SaltyLab sensor brackets (sensor_rail_brackets.scad convention).
// Column socket boss on front face (+Y) receives column bottom. // Part 1: tnut_base
// Column locked with 2× M4 cross-bolts through socket boss.
//
// Cable exit slot at base of socket directs RPLIDAR USB cable
// downward and rearward toward Jetson USB port.
//
// Print: face-plate flat on bed, PETG, 5 perims, 50 % gyroid.
module tnut_base() { module tnut_base() {
difference() { difference() {
// Body
union() { union() {
// Face plate (flush against rail outer face, -Y) chamfer_cube([BASE_L, BASE_W, BASE_T], ch=1.5);
translate([-BASE_FACE_W/2, -BASE_FACE_T, 0]) // Column socket boss centred on plate top face
cube([BASE_FACE_W, BASE_FACE_T, BASE_FACE_H]); translate([BASE_L/2, BASE_W/2, BASE_T])
cylinder(d=COL_OD + 4.0, h=8.0);
// T-nut neck (enters rail slot)
translate([-TNUT_W/2, 0, (BASE_FACE_H - TNUT_L)/2])
cube([TNUT_W, SLOT_NECK_H + e, TNUT_L]);
// T-nut body (wider, locks in T-groove)
translate([-TNUT_W/2, SLOT_NECK_H - e, (BASE_FACE_H - TNUT_L)/2])
cube([TNUT_W, TNUT_H - SLOT_NECK_H + e, TNUT_L]);
// Column socket boss (front face, centred)
translate([0, -BASE_FACE_T, BASE_FACE_H/2])
rotate([-90, 0, 0])
cylinder(d = COL_SOCKET_D, h = BASE_FACE_T + COL_SOCKET_L);
} }
// Rail clamp bolt bore (M3, centre of face plate) // M5 bolt holes (counterbored for BHCS heads from underneath)
translate([0, -BASE_FACE_T - e, BASE_FACE_H/2]) for (x = [BASE_L/2 - BOLT_PITCH/2, BASE_L/2 + BOLT_PITCH/2])
rotate([-90, 0, 0]) translate([x, BASE_W/2, -EPS]) {
cylinder(d = TNUT_BOLT_D, h = BASE_FACE_T + TNUT_H + 2*e); cylinder(d=M5_D, h=BASE_T + 8.0 + 2*EPS);
// counterbore from bottom
cylinder(d=M5_HEAD_D, h=M5_HEAD_H + EPS);
}
// M3 hex nut pocket (inside T-nut body) // T-nut captive pockets (accessible from bottom)
translate([0, SLOT_NECK_H + 0.3, BASE_FACE_H/2]) for (x = [BASE_L/2 - BOLT_PITCH/2, BASE_L/2 + BOLT_PITCH/2])
rotate([-90, 0, 0]) translate([x - TNUT_L/2, BASE_W/2 - TNUT_W/2, BASE_T - TNUT_H])
cylinder(d = TNUT_M3_NUT_AF / cos(30), cube([TNUT_L, TNUT_W, TNUT_H + EPS]);
h = TNUT_M3_NUT_H + 0.3, $fn = 6);
// Column socket bore (column inserts from +Y side) // Column bore into boss
translate([0, -BASE_FACE_T, BASE_FACE_H/2]) translate([BASE_L/2, BASE_W/2, BASE_T - EPS])
rotate([-90, 0, 0]) cylinder(d=COL_OD + 0.3, h=8.0 + 2*EPS);
cylinder(d = COL_OD + 0.3, h = BASE_FACE_T + COL_SOCKET_L + e);
// Column lock bolt bores (2× M4, horizontal through socket boss) // Cable exit slot through base (offset 5 mm from column centre)
// One bolt from +X, one from -X, on COL_SOCKET_L/2 depth translate([BASE_L/2 - CABLE_SLOT_W/2, BASE_W/2 + COL_OD/4, -EPS])
for (lx = [-1, 1]) cube([CABLE_SLOT_W, CABLE_SLOT_H, BASE_T + 8.0 + 2*EPS]);
translate([lx * (COL_SOCKET_D/2 + e), COL_SOCKET_L/2, BASE_FACE_H/2])
rotate([0, 90, 0])
cylinder(d = M4_D, h = COL_SOCKET_D + 2*e,
center = true);
// M4 nut pockets (one side of socket boss for each bolt) // Weight relief pockets on underside
for (lx = [-1, 1]) for (x = [BASE_L/2 - BOLT_PITCH/2 + 10, BASE_L/2 + BOLT_PITCH/2 - 10])
translate([lx * (COL_SOCKET_D/2 - M4_NUT_H - 1), for (y = [7, BASE_W - 7])
COL_SOCKET_L/2, translate([x - 5, y - 5, -EPS])
BASE_FACE_H/2]) cube([10, 10, BASE_T/2]);
rotate([0, 90, 0])
cylinder(d = M4_NUT_AF / cos(30),
h = M4_NUT_H + 0.5, $fn = 6);
// Cable exit slot (bottom of socket, cable exits downward)
translate([0, COL_SOCKET_L * 0.6, BASE_FACE_H/2 - COL_SOCKET_D/2])
cube([COL_SLOT_W, COL_SOCKET_D + e, COL_SLOT_H], center = [true, false, false]);
// Lightening pockets in face plate
translate([0, -BASE_FACE_T/2, BASE_FACE_H/2])
cube([BASE_FACE_W - 12, BASE_FACE_T - 2, BASE_FACE_H - 16],
center = true);
} }
} }
// ============================================================ // Part 2: column
// PART 2 ELEVATION COLUMN
// ============================================================
// Hollow cylindrical mast (ELEV_H tall) raising the RPLIDAR scan
// plane above the chassis body for unobstructed 360° coverage.
// Inner bore routes USB cable from scanner to base exit slot.
// Bottom peg inserts into tnut_base socket; top peg inserts into
// scan_platform socket. Both ends are plain Ø(COL_OD) cylinders,
// interference-free slip fit into Ø(COL_OD+0.3) sockets.
//
// Three longitudinal ribs on outer surface add torsional stiffness
// without added diameter. Cable slot on one rib for cable retention.
//
// Print: standing upright, PETG, 5 perims, 20 % gyroid (hollow).
module column() { module column() {
rib_w = 3.0; // Actual column height: ELEV_H minus base boss engagement (8 mm) and platform seating (6 mm)
rib_h = 2.0; // rib protrusion from column OD col_h = ELEV_H - 8.0 - PLAT_T;
difference() { difference() {
union() { union() {
// Hollow cylinder // Hollow tube
cylinder(d = COL_OD, h = ELEV_H + COL_SOCKET_L); cylinder(d=COL_OD, h=col_h);
// Three stiffening ribs (120° apart) // Three 120°-spaced stiffening ribs along full height
for (ra = [0, 120, 240]) for (a = [0, 120, 240])
rotate([0, 0, ra]) rotate([0, 0, a])
translate([COL_OD/2 - e, -rib_w/2, 0]) translate([COL_OD/2 - EPS, -RIB_W/2, 0])
cube([rib_h + e, rib_w, ELEV_H + COL_SOCKET_L]); cube([RIB_H, RIB_W, col_h]);
// Bottom spigot (fits into base boss bore)
translate([0, 0, -6.0])
cylinder(d=COL_OD - 0.4, h=6.0 + EPS);
// Top spigot (seats into scan_platform recess)
translate([0, 0, col_h - EPS])
cylinder(d=COL_OD - 0.4, h=6.0);
} }
// Central cable bore (full length) // Inner cable bore
translate([0, 0, -e]) translate([0, 0, -6.0 - EPS])
cylinder(d = COL_ID, h = ELEV_H + COL_SOCKET_L + 2*e); cylinder(d=COL_ID, h=col_h + 12.0 + 2*EPS);
// Cable entry slot at column base (aligns with base exit slot) // Cable entry slot at bottom (aligns with base slot)
translate([-COL_SLOT_W/2, COL_OD/2 - e, -e]) translate([-CABLE_SLOT_W/2, -COL_OD/2 - EPS, 2.0])
cube([COL_SLOT_W, COL_ID/2 + rib_h + 2, COL_SLOT_H + 2]); cube([CABLE_SLOT_W, CABLE_SLOT_H + EPS, CABLE_SLOT_H]);
// Cable exit slot at column top (USB exits to scanner) // Cable exit slot at top (90° rotated for tidy routing)
translate([-COL_SLOT_W/2, COL_OD/2 - e, rotate([0, 0, 90])
ELEV_H + COL_SOCKET_L - COL_SLOT_H - 2]) translate([-CABLE_SLOT_W/2, -COL_OD/2 - EPS, col_h - CABLE_SLOT_H - 4.0])
cube([COL_SLOT_W, COL_ID/2 + rib_h + 2, COL_SLOT_H + 2]); cube([CABLE_SLOT_W, CABLE_SLOT_H + EPS, CABLE_SLOT_H]);
// Column lock flat (prevents rotation in socket) // Cable clip snap groove (at mid-height)
// Two opposed flats at column base & top socket peg translate([0, 0, col_h / 2])
for (peg_z = [0, ELEV_H]) { difference() {
translate([-COL_OD/2 - e, COL_OD/2 - 2.0, peg_z]) cylinder(d=COL_OD + 2*RIB_H + 0.8, h=4.0, center=true);
cube([COL_OD + 2*e, 2.5, COL_SOCKET_L]); cylinder(d=COL_OD - 0.2, h=4.0 + 2*EPS, center=true);
} }
} }
} }
// ============================================================ // Part 3: scan_platform
// PART 3 SCAN PLATFORM
// ============================================================
// Disc that RPLIDAR A1 mounts to. Matches RPLIDAR A1 bolt pattern:
// 4× M3 on Ø40 mm bolt circle at 45°/135°/225°/315°.
// M3 hex nuts captured in underside pockets (blind, tool-free install).
// Column-top socket on underside receives column top peg (Ø25 slip fit).
// Motor connector slot on rear edge for JST cable exit.
// Vibe ring sits on top face between platform and RPLIDAR (separate part).
//
// Scan plane (19 mm above mount face) clears platform top by design;
// minimum platform OD = RPL_CLEAR_D (82 mm) leaves scan plane open.
//
// Print: disc face down, PETG, 5 perims, 40 % gyroid.
module scan_platform() { module scan_platform() {
difference() { difference() {
union() { union() {
// Platform disc // Main disc
cylinder(d = PLAT_OD, h = PLAT_T); cylinder(d=PLAT_D, h=PLAT_T);
// Column socket boss (underside, -Z) // Rim lip for stiffness
translate([0, 0, -PLAT_SOCKET_L]) translate([0, 0, PLAT_T])
cylinder(d = COL_SOCKET_D, h = PLAT_SOCKET_L + e); difference() {
cylinder(d=PLAT_D, h=2.0);
cylinder(d=PLAT_D - 4.0, h=2.0 + EPS);
}
} }
// Column socket bore (column top peg inserts from below) // Central cable pass-through
translate([0, 0, -PLAT_SOCKET_L - e]) translate([0, 0, -EPS])
cylinder(d = PLAT_SOCKET_D, h = PLAT_SOCKET_L + e + 1); cylinder(d=RPL_BORE_D, h=PLAT_T + 4.0);
// Column lock bores (2× M4 through socket boss) // Column spigot socket (bottom recess)
for (lx = [-1, 1]) translate([0, 0, -EPS])
translate([lx * (COL_SOCKET_D/2 + e), 0, -PLAT_SOCKET_L/2]) cylinder(d=COL_OD - 0.4 + 0.4, h=6.0);
rotate([0, 90, 0])
cylinder(d = M4_D, h = COL_SOCKET_D + 2*e, center = true);
// M4 nut pockets (one side socket boss) // RPLIDAR M3 mounting holes 4× on Ø40 BC at 45°/135°/225°/315°
translate([COL_SOCKET_D/2 - M4_NUT_H - 1, 0, -PLAT_SOCKET_L/2])
rotate([0, 90, 0])
cylinder(d = M4_NUT_AF / cos(30), h = M4_NUT_H + 0.5,
$fn = 6);
// 4× RPLIDAR mounting bolt holes (M3, Ø40 mm BC at 45°)
for (a = [45, 135, 225, 315]) for (a = [45, 135, 225, 315])
translate([RPL_BC_D/2 * cos(a), rotate([0, 0, a])
RPL_BC_D/2 * sin(a), -e]) translate([RPL_BC_D/2, 0, -EPS]) {
cylinder(d = RPL_BOLT_D, h = PLAT_T + 2*e); // Through bore
cylinder(d=M3_D, h=PLAT_T + 2*EPS);
// Grommet seat (countersunk from top)
translate([0, 0, PLAT_T - GROM_H])
cylinder(d=GROM_OD + 0.3, h=GROM_H + EPS);
// Captured M3 hex nut pocket (from bottom)
translate([0, 0, 1.5])
hex_pocket(M3_NUT_W + 0.3, M3_NUT_H + 0.2);
}
// M3 hex nut pockets on underside (captured, tool-free) // Connector side-exit slots (2× opposing, at 0° and 180°)
for (a = [45, 135, 225, 315]) for (a = [0, 180])
translate([RPL_BC_D/2 * cos(a), rotate([0, 0, a])
RPL_BC_D/2 * sin(a), -e]) translate([-CONN_SLOT_W/2, PLAT_D/2 - CONN_SLOT_H, -EPS])
cylinder(d = M3_NUT_AF / cos(30), cube([CONN_SLOT_W, CONN_SLOT_H + EPS, PLAT_T + 2*EPS]);
h = M3_NUT_H + 0.5, $fn = 6);
// Motor connector slot (JST rear centreline, 10×6 mm) // Weight relief pockets (2× lateral)
translate([0, PLAT_OD/2 - 8, -e]) for (a = [90, 270])
cube([10, 10, PLAT_T + 2*e], center = [true, false, false]); rotate([0, 0, a])
translate([-10, 15, 1.5])
// USB connector slot (micro-USB, right-rear, 12×6 mm) cube([20, 8, PLAT_T - 3.0]);
translate([PLAT_OD/4, PLAT_OD/2 - 8, -e])
cube([12, 10, PLAT_T + 2*e], center = [true, false, false]);
// Lightening pockets (between bolt holes)
for (a = [0, 90, 180, 270])
translate([(RPL_BC_D/2 + 10) * cos(a),
(RPL_BC_D/2 + 10) * sin(a), -e])
cylinder(d = 8, h = PLAT_T + 2*e);
// Central cable bore (USB from scanner routes down column)
translate([0, 0, -e])
cylinder(d = COL_ID - 2, h = PLAT_T + 2*e);
} }
} }
// ============================================================ // Part 4: vibe_ring
// PART 4 VIBRATION ISOLATION RING // Printed silicone-grommet retainer ring press-fits over M3 bolt with grommet seated
// ============================================================
// Flat ring sits between scan_platform top face and RPLIDAR bottom.
// Anti-vibration isolation via 4× M3 silicone FC-style grommets
// (Ø6 mm silicone, M3 bore same type used on flight controllers).
//
// Bolt stack (bottom top):
// M3 × 30 SHCS platform (countersunk) grommet (Ø7 seat)
// ring (4 mm) RPLIDAR threaded boss (~6 mm engagement)
//
// Grommet seats are recessed 1.5 mm into ring bottom face so grommets
// are captured and self-locating. Ring top face is flat for RPLIDAR.
//
// Print: flat on bed, PETG or TPU 95A, 3 perims, 20 % infill.
// TPU 95A provides additional compliance in axial direction.
module vibe_ring() { module vibe_ring() {
difference() { difference() {
// Ring body union() {
cylinder(d = RING_OD, h = RING_H); cylinder(d=VRING_OD, h=VRING_T + GROM_H);
// Flange
// Central bore (cable / connector access) cylinder(d=VRING_OD + 2.0, h=VRING_T);
translate([0, 0, -e]) }
cylinder(d = RING_ID, h = RING_H + 2*e); // Bore
translate([0, 0, -EPS])
// 4× M3 clearance bores on Ø40 mm bolt circle cylinder(d=VRING_ID, h=VRING_T + GROM_H + 2*EPS);
for (a = [45, 135, 225, 315])
translate([RPL_BC_D/2 * cos(a),
RPL_BC_D/2 * sin(a), -e])
cylinder(d = RPL_BOLT_D, h = RING_H + 2*e);
// Grommet seating recesses (bottom face, Ø7 mm × 1.5 mm deep)
for (a = [45, 135, 225, 315])
translate([RPL_BC_D/2 * cos(a),
RPL_BC_D/2 * sin(a), -e])
cylinder(d = GROMMET_D, h = GROMMET_RECESS + e);
// Motor connector notch (rear centreline, passes through ring)
translate([0, RING_OD/2 - 6, -e])
cube([10, 8, RING_H + 2*e], center = [true, false, false]);
// Lightening arcs
for (a = [0, 90, 180, 270])
translate([(RPL_BC_D/2 + 9) * cos(a),
(RPL_BC_D/2 + 9) * sin(a), -e])
cylinder(d = 7, h = RING_H + 2*e);
} }
} }
// ============================================================ // Part 5: cable_guide
// PART 5 CABLE GUIDE CLIP // Snap-on cable clip for column mid-section
// ============================================================
// Snap-on C-clip that presses onto column ribs to retain USB cable
// along column exterior. Cable sits in a semicircular channel;
// snap tongue grips the rib. No fasteners push-fit on rib.
// Print multiples: one every ~30 mm along column for clean routing.
//
// Print: clip-opening face down, PETG, 3 perims, 20 % infill.
// Orientation matters clip opening (-Y face) must face down for bridging.
module cable_guide() { module cable_guide() {
snap_t = 1.8; // snap tongue thickness (springy PETG) arm_t = SNAP_T;
snap_oc = GUIDE_CABLE_D + 2*GUIDE_T; // channel outer cylinder OD gap = CLIP_GAP;
body_h = GUIDE_BODY_H;
difference() { difference() {
union() { union() {
// Clip body (flat plate on column face) // Saddle body (U-shape wrapping column)
translate([-GUIDE_BODY_W/2, 0, 0]) difference() {
cube([GUIDE_BODY_W, GUIDE_T, body_h]); cylinder(d=gap + 2*CLIP_T, h=CLIP_W);
translate([0, 0, -EPS])
cylinder(d=gap, h=CLIP_W + 2*EPS);
// Open front slot for snap insertion
translate([-gap/2, 0, -EPS])
cube([gap, gap/2 + CLIP_T + EPS, CLIP_W + 2*EPS]);
}
// Cable channel (C-shape, opens toward +Y) // Snap arms
translate([0, GUIDE_T + snap_oc/2, body_h/2]) for (s = [-1, 1])
rotate([0, 90, 0]) translate([s*(gap/2 - arm_t), 0, 0])
difference() { mirror([s < 0 ? 1 : 0, 0, 0])
cylinder(d = snap_oc, h = GUIDE_BODY_W, translate([0, -arm_t/2, 0])
center = true); cube([arm_t + 1.5, arm_t, CLIP_W]);
cylinder(d = GUIDE_CABLE_D, h = GUIDE_BODY_W + 2*e,
center = true);
// Open front slot for cable insertion
translate([0, snap_oc/2 + e, 0])
cube([GUIDE_CABLE_D * 0.85,
snap_oc + 2*e,
GUIDE_BODY_W + 2*e], center = true);
}
// Snap-fit tongue (grips column rib, -Y side of body) // Cable channel bracket (side-mounted)
// Two flexible tabs that straddle column rib translate([gap/2 + CLIP_T, -(CABLE_CH_W/2 + CLIP_T), 0])
for (tx = [-GUIDE_BODY_W/2 + 2, GUIDE_BODY_W/2 - 2 - snap_t]) cube([CLIP_T + CABLE_CH_H, CABLE_CH_W + 2*CLIP_T, CLIP_W]);
translate([tx, -4, 0])
cube([snap_t, 4 + GUIDE_T, body_h]);
// Snap barbs (slight overhang engages rib back edge)
for (tx = [-GUIDE_BODY_W/2 + 2, GUIDE_BODY_W/2 - 2 - snap_t])
translate([tx + snap_t/2, -4, body_h/2])
rotate([0, 90, 0])
cylinder(d = 2, h = snap_t, center = true);
} }
// Rib slot (column rib passes through clip body) // Cable channel cutout
translate([0, -2, body_h/2]) translate([gap/2 + CLIP_T + CLIP_T - EPS, -CABLE_CH_W/2, -EPS])
cube([3.5, GUIDE_T + 4 + e, body_h - 4], center = true); cube([CABLE_CH_H + EPS, CABLE_CH_W, CLIP_W + 2*EPS]);
// Snap tip undercut (both arms)
for (s = [-1, 1])
translate([s*(gap/2 + CLIP_T + 1.0), -arm_t, -EPS])
rotate([0, 0, s*30])
cube([2, arm_t*2, CLIP_W + 2*EPS]);
} }
} }
// Assembly / render dispatch
module assembly() {
// tnut_base at origin
color("SteelBlue")
tnut_base();
// column rising from base boss
color("DodgerBlue")
translate([BASE_L/2, BASE_W/2, BASE_T + 8.0 - 6.0])
column();
// scan_platform at top of column
col_h_actual = ELEV_H - 8.0 - PLAT_T;
color("CornflowerBlue")
translate([BASE_L/2, BASE_W/2, BASE_T + 8.0 - 6.0 + col_h_actual + 6.0 - EPS])
scan_platform();
// vibe rings (4×) seated in platform holes
for (a = [45, 135, 225, 315])
color("Gray", 0.7)
translate([BASE_L/2, BASE_W/2,
BASE_T + 8.0 - 6.0 + col_h_actual + 6.0 + PLAT_T - GROM_H])
rotate([0, 0, a])
translate([RPL_BC_D/2, 0, 0])
vibe_ring();
// cable_guide clipped at column mid-height
color("LightSteelBlue")
translate([BASE_L/2, BASE_W/2,
BASE_T + 8.0 - 6.0 + (ELEV_H - 8.0 - PLAT_T)/2 - CLIP_W/2])
cable_guide();
}
// Dispatch
if (RENDER == "tnut_base") tnut_base();
else if (RENDER == "column") column();
else if (RENDER == "scan_platform") scan_platform();
else if (RENDER == "vibe_ring") vibe_ring();
else if (RENDER == "cable_guide") cable_guide();
else assembly();