3d-printing/lib/skadis-t-clip/example.scad
Felipe M. fd91da94c8
Add preview screenshot to lib/skadis-t-clip
Render a minimal example (rounded plate with one cutout) so the README
opens with a visual of what the library produces. Adds example.scad
with the openscad render command in its header so the screenshot can
be regenerated.
2026-05-08 16:16:57 +02:00

34 lines
1.2 KiB
OpenSCAD

// Minimal example for lib/skadis-t-clip illustrating what skadis_t_clip_cutout
// produces: a flat plate with a single T-Clip cutout (pill-shaped through-slot
// plus filleted cylindrical recess on the front face).
//
// Render command for the README screenshot:
// openscad --render --imgsize 1280,960 \
// --camera=0,2.7,25,70,0,200,140 \
// -o preview.png example.scad
use <skadis-t-clip.scad>;
plate_thickness = 5.4;
plate_w = 32;
plate_h = 50;
plate_corner_r = 4;
$fn = 96;
difference() {
// Simple rounded-rectangle back plate (consumers typically build their
// own plate; this is just for the demo).
hull()
for (xc = [-plate_w / 2 + plate_corner_r,
plate_w / 2 - plate_corner_r])
for (zc = [plate_corner_r, plate_h - plate_corner_r])
translate([xc, plate_thickness / 2, zc])
rotate([90, 0, 0])
cylinder(h = plate_thickness, r = plate_corner_r,
center = true);
// One T-Clip cutout, centered on the plate.
translate([0, 0, plate_h / 2])
skadis_t_clip_cutout(plate_thickness = plate_thickness);
}