+module Pin(){
+ translate([pin_x_offset, pin_y_offset, 0]) rotate([0,90,0]){
+ translate([0, 0, -pin_thick/2])
+ linear_extrude(height=pin_thick){
+ translate([-pin_base/2, 0]) square([pin_base, 50]);
+ translate([-pin_width/2, -100]) square([pin_width, 101]);
+ }
+ hull() for (d=[0,10]) {
+ translate([d*lock_hang_ratio,-d,0])
+ translate([-lock_manouvre_thick/2,
+ -pin_workdepth-100,
+ -lock_manouvre_len_smaller])
+ cube([lock_manouvre_thick, 100,
+ lock_manouvre_len + lock_manouvre_len_smaller]);
+ }
+ }
+}
+
+module All(){
+ difference(){
+ Body();
+ Pin();
+ }
+}
+
+module Piece(pc,interval){
+ translate([0,-pc*interval,0])
+ intersection(){
+ rotate([0,0,pc*180-cut_rotation])
+ translate([-200,clatter_gap/2,-200]) cube([400,400,400]);
+ All();
+ }
+}
+
+module PiecePrint(pc){
+ rotate([0,0,90]) rotate([0,180,0])
+ Piece(pc,4);
+}
+
+module PiecesPrint(){
+ PiecePrint(0);
+ PiecePrint(1);
+}
+
+module Demo(){
+ for (pc=[0,1])
+ Piece(pc,0);
+}
+
+//Holes();
+//Demo();
+//All();
+//Pin();
+//Pieces();
+PiecesPrint();
+//PiecePrint(0);
+//PiecePrint(1);