From c27c5434f98dd90cd2f9bf14737c229086cbb0a3 Mon Sep 17 00:00:00 2001 From: maride Date: Wed, 20 Dec 2017 19:31:41 +0100 Subject: [PATCH] Add Matekiste Stencil (base plate) --- Matekiste_Laser_Stencil.scad | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Matekiste_Laser_Stencil.scad 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