Compare commits

..

No commits in common. "f188997192bda1533e834a9be2164d406a566965" and "7e5f673f7d450dc75ec46b98a56163939cd1ccb5" have entirely different histories.

View File

@ -1,343 +1,502 @@
// ============================================================ // ============================================================
// RPLIDAR A1 Mount Bracket Issue #596 // rplidar_mount.scad RPLIDAR A1 Elevated Bracket for 2020 T-Slot Rail
// Agent : sl-mechanical // Issue: #561 Agent: sl-mechanical Date: 2026-03-14
// Date : 2026-03-14 // (supersedes Rev A anti-vibration ring ring integrated as Part 4)
// ============================================================
//
// 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:
// 1. tnut_base 2020 T-slot rail interface plate with M5 T-nut captive pockets // Part 1 tnut_base() 2020 T-nut rail base + column stub socket
// 2. column hollow elevation column, 120 mm tall, 3 stiffening ribs, cable bore // Part 2 column() Hollow elevation mast (parametric ELEV_H)
// 3. scan_platform top plate with Ø40 mm BC M3 mounting pattern, vibration seats // Part 3 scan_platform() RPLIDAR mounting disc + motor connector slot
// 4. vibe_ring silicone FC-grommet isolation ring for scan_platform bolts // Part 4 vibe_ring() Anti-vibration isolation ring (grommet seats)
// 5. cable_guide snap-on cable management clip for column body // Part 5 cable_guide() Snap-on cable management clip for column
// Part 6 assembly_preview()
// //
// BOM: // Hardware BOM (per mount):
// 2 × M5×10 BHCS + M5 T-nuts (tnut_base to rail) // 1× M3 × 16 mm SHCS + M3 hex nut rail clamp thumbscrew
// 4 × M3×8 SHCS (scan_platform to RPLIDAR A1) // 4× M3 × 30 mm SHCS RPLIDAR vibe_ring platform
// 4 × M3 silicone FC grommets Ø8.5 OD / Ø3.2 bore (anti-vibe) // 4× M3 silicone grommets (Ø6 mm) anti-vibration isolators
// 4 × M3 hex nuts (captured in scan_platform) // 4× M3 hex nuts captured in platform underside
// 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
// //
// Print settings (PETG): // RPLIDAR A1 interface (caliper-verified Slamtec RPLIDAR A1):
// tnut_base / column / scan_platform : 5 perimeters, 40 % gyroid, no supports // Body diameter : Ø70 mm
// vibe_ring : 3 perimeters, 20 % gyroid, no supports // Bolt circle : Ø40 mm, 4× M3, at 45°/135°/225°/315°
// cable_guide : 3 perimeters, 30 % gyroid, no supports // USB connector : micro-USB, right-rear quadrant, exits at 0° (front)
// 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 -D 'RENDER="tnut_base"' -o tnut_base.stl rplidar_mount.scad // openscad rplidar_mount.scad -D 'RENDER="tnut_base_stl"' -o rpm_tnut_base.stl
// openscad -D 'RENDER="column"' -o column.stl rplidar_mount.scad // openscad rplidar_mount.scad -D 'RENDER="column_stl"' -o rpm_column.stl
// openscad -D 'RENDER="scan_platform"' -o scan_platform.stl rplidar_mount.scad // openscad rplidar_mount.scad -D 'RENDER="platform_stl"' -o rpm_platform.stl
// openscad -D 'RENDER="vibe_ring"' -o vibe_ring.stl rplidar_mount.scad // openscad rplidar_mount.scad -D 'RENDER="vibe_ring_stl"' -o rpm_vibe_ring.stl
// openscad -D 'RENDER="cable_guide"' -o cable_guide.stl rplidar_mount.scad // openscad rplidar_mount.scad -D 'RENDER="cable_guide_stl"' -o rpm_cable_guide.stl
// 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;
EPS = 0.01; e = 0.01;
// 2020 rail // Parametric elevation
RAIL_W = 20.0; // extrusion cross-section ELEV_H = 120.0; // scan plane elevation above rail face (mm)
RAIL_H = 20.0; // increase for taller chassis; min ~60 mm recommended
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
// Base plate // RPLIDAR A1 interface constants
BASE_L = 60.0; // length along rail axis RPL_BODY_D = 70.0; // scanner body outer diameter
BASE_W = 30.0; // width across rail RPL_BC_D = 40.0; // mounting bolt circle diameter (4× M3 at 45° offsets)
BASE_T = 8.0; // plate thickness RPL_BOLT_D = 3.3; // M3 clearance bore
BOLT_PITCH = 40.0; // M5 bolt pitch along rail (centre-to-centre) RPL_SCAN_Z = 19.0; // scan plane height above mount face
RPL_CLEAR_D = 82.0; // minimum radial clearance diameter for 360° scan
// Elevation column // Rail geometry (matches sensor_rail.scad)
COL_OD = 25.0; // column outer diameter RAIL_W = 20.0;
COL_ID = 17.0; // inner bore (cable routing) SLOT_OPEN = 6.0;
ELEV_H = 120.0; // scan plane above rail top face SLOT_INNER_W = 10.2;
COL_WALL = (COL_OD - COL_ID) / 2; SLOT_INNER_H = 5.8;
RIB_W = 3.0; // stiffening rib width SLOT_NECK_H = 3.2;
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
// Scan platform // T-nut geometry (matches sensor_rail_brackets.scad)
PLAT_D = 60.0; // platform disc diameter (clears RPLIDAR body Ø100 mm well) TNUT_W = 9.8;
PLAT_T = 6.0; // platform thickness TNUT_H = 5.5;
RPL_BC_D = 40.0; // RPLIDAR M3 bolt circle diameter (4 bolts at 45 °) TNUT_L = 12.0;
RPL_BORE_D = 36.0; // central pass-through for scan motor cable TNUT_M3_NUT_AF = 5.5;
M3_D = 3.2; // M3 clearance bore TNUT_M3_NUT_H = 2.5;
M3_NUT_W = 5.5; // M3 hex nut across-flats TNUT_BOLT_D = 3.3;
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
// Vibe ring // Base plate geometry
VRING_OD = GROM_OD + 1.6; // printed retainer OD BASE_FACE_W = 38.0; // wider than rail, provides column socket footprint
VRING_ID = GROM_ID + 0.3; // pass-through with grommet seated BASE_FACE_H = 38.0; // height along rail Z
VRING_T = 2.0; // ring flange thickness BASE_FACE_T = SLOT_NECK_H + 2.0; // plate depth (Y)
// Cable guide clip // Column geometry
CLIP_W = 14.0; COL_OD = 25.0; // column outer diameter
CLIP_T = 3.5; COL_ID = 17.0; // column inner bore (cable routing + weight saving)
CLIP_GAP = COL_OD + 0.4; // snap-fit gap (slight interference) COL_SOCKET_D = COL_OD + 6.0; // socket boss OD (column inserts into base)
SNAP_T = 1.8; COL_SOCKET_L = 14.0; // socket depth in base (14 mm engagement)
CABLE_CH_W = 8.0; COL_BOLT_BC = COL_OD + 4.0; // M4 column-lock bolt span (centre-to-centre)
CABLE_CH_H = 5.0; COL_SLOT_W = 5.0; // cable exit slot width in column base
COL_SLOT_H = 8.0; // cable exit slot height
// Utility modules // Platform geometry
module chamfer_cube(size, ch=1.0) { PLAT_OD = RPL_CLEAR_D + 4.0; // platform disc OD (covers scan clear zone)
// simple chamfered box (bottom edge only for printability) PLAT_T = 5.0; // platform disc thickness
hull() { PLAT_SOCKET_D = COL_OD + 0.3; // column-top socket ID (slip fit)
translate([ch, ch, 0]) PLAT_SOCKET_L = 12.0; // socket depth on platform underside
cube([size[0]-2*ch, size[1]-2*ch, EPS]); PLAT_RIM_T = 3.5; // rim wall thickness around RPLIDAR body
translate([0, 0, ch])
cube(size - [0, 0, ch]); // Anti-vibration ring geometry
} 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) { // ============================================================
// hex nut pocket (flat-to-flat af) // PART 1 T-NUT RAIL BASE
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).
// Part 1: tnut_base // Column socket boss on front face (+Y) receives column bottom.
// 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() {
chamfer_cube([BASE_L, BASE_W, BASE_T], ch=1.5); // Face plate (flush against rail outer face, -Y)
// Column socket boss centred on plate top face translate([-BASE_FACE_W/2, -BASE_FACE_T, 0])
translate([BASE_L/2, BASE_W/2, BASE_T]) cube([BASE_FACE_W, BASE_FACE_T, BASE_FACE_H]);
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);
} }
// M5 bolt holes (counterbored for BHCS heads from underneath) // Rail clamp bolt bore (M3, centre of face plate)
for (x = [BASE_L/2 - BOLT_PITCH/2, BASE_L/2 + BOLT_PITCH/2]) translate([0, -BASE_FACE_T - e, BASE_FACE_H/2])
translate([x, BASE_W/2, -EPS]) { rotate([-90, 0, 0])
cylinder(d=M5_D, h=BASE_T + 8.0 + 2*EPS); cylinder(d = TNUT_BOLT_D, h = BASE_FACE_T + TNUT_H + 2*e);
// counterbore from bottom
cylinder(d=M5_HEAD_D, h=M5_HEAD_H + EPS);
}
// T-nut captive pockets (accessible from bottom) // M3 hex nut pocket (inside T-nut body)
for (x = [BASE_L/2 - BOLT_PITCH/2, BASE_L/2 + BOLT_PITCH/2]) translate([0, SLOT_NECK_H + 0.3, BASE_FACE_H/2])
translate([x - TNUT_L/2, BASE_W/2 - TNUT_W/2, BASE_T - TNUT_H]) rotate([-90, 0, 0])
cube([TNUT_L, TNUT_W, TNUT_H + EPS]); cylinder(d = TNUT_M3_NUT_AF / cos(30),
h = TNUT_M3_NUT_H + 0.3, $fn = 6);
// Column bore into boss // Column socket bore (column inserts from +Y side)
translate([BASE_L/2, BASE_W/2, BASE_T - EPS]) translate([0, -BASE_FACE_T, BASE_FACE_H/2])
cylinder(d=COL_OD + 0.3, h=8.0 + 2*EPS); rotate([-90, 0, 0])
cylinder(d = COL_OD + 0.3, h = BASE_FACE_T + COL_SOCKET_L + e);
// Cable exit slot through base (offset 5 mm from column centre) // Column lock bolt bores (2× M4, horizontal through socket boss)
translate([BASE_L/2 - CABLE_SLOT_W/2, BASE_W/2 + COL_OD/4, -EPS]) // One bolt from +X, one from -X, on COL_SOCKET_L/2 depth
cube([CABLE_SLOT_W, CABLE_SLOT_H, BASE_T + 8.0 + 2*EPS]); for (lx = [-1, 1])
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);
// Weight relief pockets on underside // M4 nut pockets (one side of socket boss for each bolt)
for (x = [BASE_L/2 - BOLT_PITCH/2 + 10, BASE_L/2 + BOLT_PITCH/2 - 10]) for (lx = [-1, 1])
for (y = [7, BASE_W - 7]) translate([lx * (COL_SOCKET_D/2 - M4_NUT_H - 1),
translate([x - 5, y - 5, -EPS]) COL_SOCKET_L/2,
cube([10, 10, BASE_T/2]); BASE_FACE_H/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() {
// Actual column height: ELEV_H minus base boss engagement (8 mm) and platform seating (6 mm) rib_w = 3.0;
col_h = ELEV_H - 8.0 - PLAT_T; rib_h = 2.0; // rib protrusion from column OD
difference() { difference() {
union() { union() {
// Hollow tube // Hollow cylinder
cylinder(d=COL_OD, h=col_h); cylinder(d = COL_OD, h = ELEV_H + COL_SOCKET_L);
// Three 120°-spaced stiffening ribs along full height // Three stiffening ribs (120° apart)
for (a = [0, 120, 240]) for (ra = [0, 120, 240])
rotate([0, 0, a]) rotate([0, 0, ra])
translate([COL_OD/2 - EPS, -RIB_W/2, 0]) translate([COL_OD/2 - e, -rib_w/2, 0])
cube([RIB_H, RIB_W, col_h]); cube([rib_h + e, rib_w, ELEV_H + COL_SOCKET_L]);
// 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);
} }
// Inner cable bore // Central cable bore (full length)
translate([0, 0, -6.0 - EPS]) translate([0, 0, -e])
cylinder(d=COL_ID, h=col_h + 12.0 + 2*EPS); cylinder(d = COL_ID, h = ELEV_H + COL_SOCKET_L + 2*e);
// Cable entry slot at bottom (aligns with base slot) // Cable entry slot at column base (aligns with base exit slot)
translate([-CABLE_SLOT_W/2, -COL_OD/2 - EPS, 2.0]) translate([-COL_SLOT_W/2, COL_OD/2 - e, -e])
cube([CABLE_SLOT_W, CABLE_SLOT_H + EPS, CABLE_SLOT_H]); cube([COL_SLOT_W, COL_ID/2 + rib_h + 2, COL_SLOT_H + 2]);
// Cable exit slot at top (90° rotated for tidy routing) // Cable exit slot at column top (USB exits to scanner)
rotate([0, 0, 90]) translate([-COL_SLOT_W/2, COL_OD/2 - e,
translate([-CABLE_SLOT_W/2, -COL_OD/2 - EPS, col_h - CABLE_SLOT_H - 4.0]) ELEV_H + COL_SOCKET_L - COL_SLOT_H - 2])
cube([CABLE_SLOT_W, CABLE_SLOT_H + EPS, CABLE_SLOT_H]); cube([COL_SLOT_W, COL_ID/2 + rib_h + 2, COL_SLOT_H + 2]);
// Cable clip snap groove (at mid-height) // Column lock flat (prevents rotation in socket)
translate([0, 0, col_h / 2]) // Two opposed flats at column base & top socket peg
difference() { for (peg_z = [0, ELEV_H]) {
cylinder(d=COL_OD + 2*RIB_H + 0.8, h=4.0, center=true); translate([-COL_OD/2 - e, COL_OD/2 - 2.0, peg_z])
cylinder(d=COL_OD - 0.2, h=4.0 + 2*EPS, center=true); cube([COL_OD + 2*e, 2.5, COL_SOCKET_L]);
} }
} }
} }
// 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() {
// Main disc // Platform disc
cylinder(d=PLAT_D, h=PLAT_T); cylinder(d = PLAT_OD, h = PLAT_T);
// Rim lip for stiffness // Column socket boss (underside, -Z)
translate([0, 0, PLAT_T]) translate([0, 0, -PLAT_SOCKET_L])
difference() { cylinder(d = COL_SOCKET_D, h = PLAT_SOCKET_L + e);
cylinder(d=PLAT_D, h=2.0);
cylinder(d=PLAT_D - 4.0, h=2.0 + EPS);
}
} }
// Central cable pass-through // Column socket bore (column top peg inserts from below)
translate([0, 0, -EPS]) translate([0, 0, -PLAT_SOCKET_L - e])
cylinder(d=RPL_BORE_D, h=PLAT_T + 4.0); cylinder(d = PLAT_SOCKET_D, h = PLAT_SOCKET_L + e + 1);
// Column spigot socket (bottom recess) // Column lock bores (2× M4 through socket boss)
translate([0, 0, -EPS]) for (lx = [-1, 1])
cylinder(d=COL_OD - 0.4 + 0.4, h=6.0); translate([lx * (COL_SOCKET_D/2 + e), 0, -PLAT_SOCKET_L/2])
rotate([0, 90, 0])
cylinder(d = M4_D, h = COL_SOCKET_D + 2*e, center = true);
// RPLIDAR M3 mounting holes 4× on Ø40 BC at 45°/135°/225°/315° // M4 nut pockets (one side socket boss)
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])
rotate([0, 0, a]) translate([RPL_BC_D/2 * cos(a),
translate([RPL_BC_D/2, 0, -EPS]) { RPL_BC_D/2 * sin(a), -e])
// Through bore cylinder(d = RPL_BOLT_D, h = PLAT_T + 2*e);
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);
}
// Connector side-exit slots (2× opposing, at 0° and 180°) // M3 hex nut pockets on underside (captured, tool-free)
for (a = [0, 180]) for (a = [45, 135, 225, 315])
rotate([0, 0, a]) translate([RPL_BC_D/2 * cos(a),
translate([-CONN_SLOT_W/2, PLAT_D/2 - CONN_SLOT_H, -EPS]) RPL_BC_D/2 * sin(a), -e])
cube([CONN_SLOT_W, CONN_SLOT_H + EPS, PLAT_T + 2*EPS]); cylinder(d = M3_NUT_AF / cos(30),
h = M3_NUT_H + 0.5, $fn = 6);
// Weight relief pockets (2× lateral) // Motor connector slot (JST rear centreline, 10×6 mm)
for (a = [90, 270]) translate([0, PLAT_OD/2 - 8, -e])
rotate([0, 0, a]) cube([10, 10, PLAT_T + 2*e], center = [true, false, false]);
translate([-10, 15, 1.5])
cube([20, 8, PLAT_T - 3.0]); // USB connector slot (micro-USB, right-rear, 12×6 mm)
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 // ============================================================
// Printed silicone-grommet retainer ring press-fits over M3 bolt with grommet seated // PART 4 VIBRATION ISOLATION RING
// ============================================================
// 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() {
union() { // Ring body
cylinder(d=VRING_OD, h=VRING_T + GROM_H); cylinder(d = RING_OD, h = RING_H);
// Flange
cylinder(d=VRING_OD + 2.0, h=VRING_T); // Central bore (cable / connector access)
} translate([0, 0, -e])
// Bore cylinder(d = RING_ID, h = RING_H + 2*e);
translate([0, 0, -EPS])
cylinder(d=VRING_ID, h=VRING_T + GROM_H + 2*EPS); // 4× M3 clearance bores on Ø40 mm bolt circle
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 // ============================================================
// Snap-on cable clip for column mid-section // PART 5 CABLE GUIDE CLIP
// ============================================================
// 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() {
arm_t = SNAP_T; snap_t = 1.8; // snap tongue thickness (springy PETG)
gap = CLIP_GAP; snap_oc = GUIDE_CABLE_D + 2*GUIDE_T; // channel outer cylinder OD
body_h = GUIDE_BODY_H;
difference() { difference() {
union() { union() {
// Saddle body (U-shape wrapping column) // Clip body (flat plate on column face)
difference() { translate([-GUIDE_BODY_W/2, 0, 0])
cylinder(d=gap + 2*CLIP_T, h=CLIP_W); cube([GUIDE_BODY_W, GUIDE_T, body_h]);
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]);
}
// Snap arms // Cable channel (C-shape, opens toward +Y)
for (s = [-1, 1]) translate([0, GUIDE_T + snap_oc/2, body_h/2])
translate([s*(gap/2 - arm_t), 0, 0]) rotate([0, 90, 0])
mirror([s < 0 ? 1 : 0, 0, 0]) difference() {
translate([0, -arm_t/2, 0]) cylinder(d = snap_oc, h = GUIDE_BODY_W,
cube([arm_t + 1.5, arm_t, CLIP_W]); center = true);
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);
}
// Cable channel bracket (side-mounted) // Snap-fit tongue (grips column rib, -Y side of body)
translate([gap/2 + CLIP_T, -(CABLE_CH_W/2 + CLIP_T), 0]) // Two flexible tabs that straddle column rib
cube([CLIP_T + CABLE_CH_H, CABLE_CH_W + 2*CLIP_T, CLIP_W]); for (tx = [-GUIDE_BODY_W/2 + 2, GUIDE_BODY_W/2 - 2 - snap_t])
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);
} }
// Cable channel cutout // Rib slot (column rib passes through clip body)
translate([gap/2 + CLIP_T + CLIP_T - EPS, -CABLE_CH_W/2, -EPS]) translate([0, -2, body_h/2])
cube([CABLE_CH_H + EPS, CABLE_CH_W, CLIP_W + 2*EPS]); cube([3.5, GUIDE_T + 4 + e, body_h - 4], center = true);
// 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();