-ins_irad = openingcnr_dia/2 + gap;
-ins_orad = openingcnr_dia/2 + opening_height - gap;
-ins_th = ins_orad - ins_irad;
-
-handle_x0 = ins_irad + hgap_empir_adjust;
-handle_h = bot_overlap + ins_th;
-handle_y0 = -ins_orad-bot_overlap;
-handle_y1 = handle_y0 + handle_h;
-
-handle_x1 = handle_x0 + bot_w + handle_w;
-
-topprotr_y = -ins_irad + opening_topprotr;
-
-retain_mxy = [handle_x0 - retain_rad - retain_hgap_adjust,
- -ins_orad + retain_rad - retain_protr];
-
-retain_cutout_h = retain_rad * 2 + retain_bend_gap;
-
-overret_gaplen = retain_cutout_h / cos(retain_empir_angle);
-
-peg_width = retain_stalk_len -
- (handle_x0 - retain_mxy[0]) / cos(retain_empir_angle)
- - peg_width_slop;
-
-peg_height = retain_cutout_h - (retain_rad + retain_stalk_h)
- + retain_pushmore_adj;
-
-retain1_len = retain_len + retain_stalk_len;
-retain1_base = total_len - retain1_len;
-
-peg_len = retain_len;
-
-module InsertSection(){
- hull(){
- translate([-ins_irad, -ins_irad])
- mirror([1, 0])
- square([opening_depth - ins_irad, 0.1]);
- translate([-ins_irad - topprotr_rad,
- topprotr_y - topprotr_rad])
- circle(r=topprotr_rad, $fn=10);
- }
- translate([0, -ins_orad]) square([ins_irad+1, ins_th]);
- intersection(){
- translate([0, -ins_irad])
- mirror([1,1])
- square([100, opening_depth]);
- difference(){
- circle(r= ins_orad);
- circle(r= ins_irad, $fn=20);
- }
- }
-}
-
-module HandleSection(){
- difference(){
- hull(){
- translate([handle_x0, handle_y0])
- square([bot_w, handle_h]);
- for (y= [handle_y1 - handle_rh/2,
- handle_y1 - ins_th + handle_rh/2]) {
- translate([handle_x1 - handle_rh/2, y])
- circle(r= handle_rh/2, $fn=20);
+inside_h = opening_height/2 - opening_protrh - inside_h_xgap/2;
+
+edge_or = openingedge_dia/2 + opening_protr_slop;
+
+Q0 = [ openingedge_dia/2,
+ openingedge_dia/2 + opening_height/2 ];
+
+p4p5d = [edge_or + ourcirc_r, 0];
+
+P0 = [ pivot_x, pivoting_gap ];
+P4 = Q0 - p4p5d;
+P3 = [ P4[0], Q0[1] - openingedge_dia/2 + opening_protrh
+ - intooth_top_slop - ourcirc_r ];
+P2 = P4 + [ -(inside_len - ourcirc_r*2), 0 ];
+P1 = [ P2[0], P3[1] - (inside_h + ourcirc_r*2) ];
+P9 = [ outside_len - ourcirc_r, outside_gap/2 + ourcirc_r ];
+P8 = P9 + [ 0, outend_height - ourcirc_r*2 ];
+P5 = Q0 + p4p5d;
+P6 = P5 + [ 0, outside_pushh - ourcirc_r*2 ];
+P7 = [ P6[0] + (P6[1] - P1[1]) / outside_pushslope,
+ P1[1] ];
+
+module ExtrusionSect(){
+ cr = openingedge_dia/2;
+ toph = opening_height/2 + opening_protrh;
+
+ for (my=[0,1]) {
+ mirror([0,my]) {
+ translate(Q0) {
+ hull(){
+ circle(r=cr, $fn=20);
+ translate([-cr,10]) square([cr*2, 1]);
+ }