+module Box(){
+ /// corners, and front and back of base
+ for (ym=[0,1]) mirror([0,ym,0]) {
+ AtTwoCorners(){
+ UsualProfile();
+ }
+ hull() AtTwoCorners(){
+ upp_app_Vars(bevel){
+ polygon([ $xppI,
+ $xppF,
+ $xppF + [0.1, 0],
+ $xppI + [0.1, 0]
+ ]);
+ }
+ }
+ }
+
+ // side walls and base
+ SWalls(yw6 , yw4 , bevel ) { UsualProfile(); BaseProfile(); }
+ SWalls(yw5 , yw4 , a_bevel) { AnchorWallProfile(); BaseProfile(); }
+ SWalls(yw5 , yw12, a_bevel) { NearAnchorProfile(); BaseProfile(); }
+ SWalls(yw3 , yw2 , a_bevel) { AnchorProfile(); BaseProfile(); }
+ SWalls(yw11, yw12, a_bevel) { AnchorWallProfile(); BaseProfile(); }
+ SWalls(yw11, yw13, bevel ) { UsualProfile(); BaseProfile(); }
+ SWalls(yw1, yw10, a_bevel) { WebProfile(); SomeBaseProfile($gppS, $xppF); }
+
+ // front and rear walls
+ rotate([0,0,90]) SWalls(yw6, yw13, bevel) UsualProfile();
+}
+
+module KsafeBase(){ ////toplevel
+ cut = main_sz + 20;
+
+ difference(){
+ Box();
+
+ // bolt holes
+ translate([0,0, -bolt_above -0.5 * bolthole_height])
+ cube(center=true, [ cut, bolthole_width, bolthole_height ]);
+
+ // string slot
+ translate([ -cut,
+ -(bolthole_width/2 + bolthole_rhs),
+ 1 ])
+ mirror([0,1,0]) mirror([0,0,1])
+ cube([ cut*2,
+ string_slot,
+ lidinner_thick_allow + string_depth + 1 ]);
+
+ // thumb slots
+ for (mx=[0,1]) mirror([mx,0,0]) {
+ translate([ thumbslot_between/2,
+ 0,
+ -thumbslot_depth ])
+ cube([ thumbslot_width,
+ cut,
+ thumbslot_depth+1 ]);
+ }
+ }
+}
+
+module DemoProfiles(){ ////toplevel