diff --git a/Matekiste_Laser_Stencil.scad b/Matekiste_Laser_Stencil.scad new file mode 100644 index 0000000..93dfac6 --- /dev/null +++ b/Matekiste_Laser_Stencil.scad @@ -0,0 +1,46 @@ +round_base_plane(300, 200, 5, 20, 20, 10); +RESOLUTION=36; + +module base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y) { + difference() { + // base square + square([width, height]); + + // holes + translate([hole_spacing_x, hole_spacing_y]) + circle(d=hole_size, $fn=RESOLUTION); + translate([width - hole_spacing_x, hole_spacing_y]) + circle(d=hole_size, $fn=RESOLUTION); + translate([hole_spacing_x, height - hole_spacing_y]) + circle(d=hole_size, $fn=RESOLUTION); + translate([width - hole_spacing_x, height - hole_spacing_y]) + circle(d=hole_size, $fn=RESOLUTION); + } +} + +module round_base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y, radius) { + difference() { + base_plane(width, height, hole_size, hole_spacing_x, hole_spacing_y); + + translate([width-radius, height-radius]) + __radius_cutout(radius); + translate([radius, height-radius]) + rotate([0, 0, 90]) + __radius_cutout(radius); + translate([radius, radius]) + rotate([0, 0, 180]) + __radius_cutout(radius); + translate([width-radius, radius]) + rotate([0, 0, 270]) + __radius_cutout(radius); + + } +} + +module __radius_cutout(radius) { + difference() { + translate([radius/2, radius/2, 0]) + square([radius, radius], center=true); + circle(radius, $fn=RESOLUTION); + } +} \ No newline at end of file