// Cutout geometry for accessories that mount to the IKEA Skadis pegboard // via the printable T-Clip system from // https://www.printables.com/model/256896-skadis-t-clip-system // // Provides: // skadis_t_clip_cutout(plate_thickness, slot_w, slot_h, // recess_d, recess_depth, recess_fillet_r) // Negative geometry for one mount: pill-shaped through-slot plus a // cylindrical recess on the front face whose two outer joints (the // rim where the front face meets the wall, and the inner edge where // the wall meets the recess floor) are filleted by recess_fillet_r. // Place at the desired (x, z) of the slot center and subtract from // the back plate. // // Coordinate system at the cutout's origin: // X = horizontal (slot's short axis) // Y = pegboard outward; back face at Y=0, front face at Y=plate_thickness // Z = vertical (slot's long axis) // Standard Skadis grid pitch (mm) — for callers that stack multiple mounts SKADIS_PITCH = 40; module skadis_t_clip_cutout( plate_thickness, slot_w = 5.0, slot_h = 15.0, recess_d = 22.2, recess_depth = 2.9, recess_fillet_r = 0.8 ) { // Pill-shaped through-slot: hull of two cylinders aligned with Y. slot_pad = 1; e = (slot_h - slot_w) / 2; hull() for (zc = [-e, e]) translate([0, -slot_pad, zc]) rotate([-90, 0, 0]) cylinder(h = plate_thickness + 2 * slot_pad, d = slot_w); // Cylindrical recess of diameter recess_d with proper fillets at // both joints. The wall-to-floor joint (interior, concave from // inside the recess) tightens the floor by recess_fillet_r; the // wall-to-front-face joint (exterior, rounded plate corner) opens // the rim by recess_fillet_r so it joins the front face smoothly. recess_pad = 0.5; translate([0, plate_thickness - recess_depth, 0]) rotate([-90, 0, 0]) rotate_extrude($fn = 96) polygon(_skadis_recess_profile( r = recess_d / 2, depth = recess_depth, f = recess_fillet_r, pad = recess_pad)); } // Radial-axial 2D profile of the filleted-recess negative. X is the // radial direction, Y is the axial direction (Y=0 at the recess floor, // Y=depth at the front face, with a pad above for clean Boolean cuts). // // Two proper fillets, each bulging toward the corner being rounded: // - bottom fillet: rounds the negative's convex floor-to-wall joint // (arc center at (r-f, f), inside the negative) // - top fillet: rounds the plate's convex wall-to-front-face joint // (arc center at (r+f, depth-f), inside the plate material) // The bottom narrows the floor by f; the top opens the rim wider by f. function _skadis_recess_profile(r, depth, f, pad, n_arc = 16) = let ( bottom_arc = [ for (i = [0 : n_arc]) let (a = 270 + 90 * i / n_arc) [(r - f) + f * cos(a), f + f * sin(a)] ], top_arc = [ for (i = [0 : n_arc]) let (a = 180 - 90 * i / n_arc) [(r + f) + f * cos(a), (depth - f) + f * sin(a)] ] ) concat( [[0, 0]], bottom_arc, top_arc, [[r + f, depth + pad]], [[0, depth + pad]] );