+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 DCover(){ ////toplevel
+ translate([ -display_width/2, -hsz, 0 ])
+ rotate([0,90,0])
+ rotate([0,0,90])
+ linear_extrude( display_width - display_rhs_secs, convexity = 10)
+ DCoverProfile();
+}
+
+module DCoverSupportAllowance(){
+ translate([0, -hsz, 0])
+ cube(center=true,
+ [ display_width + 2 * dcover_edge_gap_more_width,
+ wall_thick * 2,
+ dcover_slop_inside * 2 + 0.01 ]);
+}
+
+module BoltHoles(){
+ translate([0,0, -(bolt_above + 0.5 * bolthole_height)])
+ cube(center=true, [ cut, bolthole_width, bolthole_height ]);
+}
+
+module KsafeBase(){ ////toplevel
+ DCover();
+
+ difference(){
+ Box();
+
+ BoltHoles();
+
+ // 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 ]);
+ }
+
+ DCoverSupportAllowance();
+ }
+}
+
+module DemoProfiles(){ ////toplevel