Add Matekiste Stencil (base plate)

This commit is contained in:
maride 2017-12-20 19:31:41 +01:00
parent e31143fc0b
commit c27c5434f9

View File

@ -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);
}
}