aboutsummaryrefslogtreecommitdiffstats
path: root/docs/prints/square.scad
diff options
context:
space:
mode:
Diffstat (limited to 'docs/prints/square.scad')
-rw-r--r--docs/prints/square.scad41
1 files changed, 35 insertions, 6 deletions
diff --git a/docs/prints/square.scad b/docs/prints/square.scad
index c5f34d87..9416cf44 100644
--- a/docs/prints/square.scad
+++ b/docs/prints/square.scad
@@ -7,10 +7,39 @@ square_width = 5;
square_size = 60;
square_height = 5;
-difference() {
- cube([square_size, square_size, square_height]);
- translate([square_width, square_width, -1])
- cube([square_size-2*square_width, square_size-2*square_width, square_height+2]);
- translate([-.5, square_size/2 - 4, -1])
- cube([1, 2, square_height+2]);
+module hollow_square() {
+ difference() {
+ cube([square_size, square_size, square_height]);
+ translate([square_width, square_width, -1])
+ cube([square_size-2*square_width, square_size-2*square_width,
+ square_height+2]);
+ }
}
+
+module notch() {
+ CUT = 0.01;
+ depth = .5;
+ width = 2;
+ translate([-depth, -width/2, -CUT])
+ cube([depth*2, width, square_height + 2*CUT]);
+}
+
+module square_with_notches() {
+ difference() {
+ // Start with initial square
+ hollow_square();
+ // Remove four notches on inside perimeter
+ translate([square_width, square_size/2 - 4, 0])
+ notch();
+ translate([square_size/2, square_size - square_width, 0])
+ rotate([0, 0, 90])
+ notch();
+ translate([square_size - square_width, square_size/2, 0])
+ notch();
+ translate([square_size/2, square_width, 0])
+ rotate([0, 0, 90])
+ notch();
+ }
+}
+
+square_with_notches();