+tppK = [ tppC[0], tppG[1] ];
+spp31 = tppK - [0, gap[1]];
+spp30 = [ spp8[0], spp31[1] ];
+
+nom_cnr = 0.5 * [nook_w, nook_h, 0] - nook_cnr_rad * [1,1,0];
+
+tooth_y = nom_cnr[1] - tooth_w/2;
+
+etxa = nom_cnr[0] - engage_l2;
+etxb = etxa - engage_l1;
+etxc = -(nom_cnr[0] - engage_l2);
+
+tapa = nom_cnr[1] - engage_l2;
+tapb = tapa - tape_w;
+
+opra = nom_cnr[1] - engage_l2;
+oprb = opra - open_recess_w;
+
+opqa = tooth_y - open_recess_2_d_tooth + open_recess_2_len/2;
+opqb = opqa - open_recess_2_len;
+
+tppS = tppB + [-gap[0], 0];
+tppP = [ tppS[0] - tooth_th, tppC[1] ];
+tppQ = tppP + tooth_height * [0,-1] + tooth_inward * [1,0];
+tppR = [ tppS[0] + tooth_inward, tppQ[1] ];
+tppM = (tppQ + tppR) * 0.5 + tooth_th * 0.5 * [0,1];
+
+edge_ledge_rad = edge_ledge_h;
+
+module RightSideMainProfile() {