+module CatchTipProfile(dy){
+ ddy = [0,dy];
+ intersection(){
+ translate(cppF){
+ difference(){
+ circle(r = dist2d(cppF, cppd));
+ //circle(r = dist2d(cppF, cppa));
+ }
+ }
+ polygon([ cppa,
+ cppi + ddy,
+ cppd + ddy,
+ cppc,
+ cppb ]);
+ }
+}
+
+module CatchHeadProfile(){
+ polygon([ cppd,
+ cppd,
+ cppi,
+ cppf,
+ cppe,
+ cpph ]);
+}
+
+
+module CatchCore(){ /////toplevel
+ linear_extrude(height=catch_strap_thick, convexity=10)
+ CatchAssemblyCoreProfile();
+
+ hull(){
+ linear_extrude(height=catch_head_th, convexity=10)
+ CatchTipProfile(0);
+ linear_extrude(height=catch_tip_th, convexity=10)
+ CatchTipProfile(catch_tip_th - catch_head_th);
+ }
+
+ linear_extrude(height=catch_head_th, convexity=10)
+ CatchHeadProfile();
+
+ translate(concat(cppB,[0])) hull(){
+ translate([0,0, catch_knob_height + catch_head_th - catch_knob_dia/2])
+ sphere(r = catch_knob_dia/2);
+ cylinder(r = catch_knob_dia/2, h = 0.1);
+ }
+}
+
+module CatchPreDistort(){ /////toplevel
+ scale(100 / sm_inner_rad)
+ rotate([90,0,0])
+ CatchCore();
+}
+
+module CatchAssembly(){ /////toplevel
+ rotate([0,0, -(cppe[0] + cppB[0] + catch_pin_slop) / sm_inner_rad * 360/TAU])
+ translate([0,0, catch_assembly_dy])
+ scale(sm_inner_rad / 100)
+ import(str("poster-tube-lid,CatchPostDistort-fa",
+ (coarse ? 20 : 3),
+ ".stl"),
+ convexity=20);
+
+ SomeStrap(catch_strap_width){
+ union(){ }
+ union(){
+ translate([-200, -200, -200])
+ cube([400, 200, 400]);
+ }
+ }
+}
+
+module CatchDemo(){ /////toplevel
+ color("blue") translate([0,0,
+ -catch_assembly_dy
+ ])
+ CatchAssembly();
+ translate([0,0,+side_height
+ ])
+ Cover();
+}
+
+module CatchDemoS(){ /////toplevel
+ color("blue") translate([0,0,
+ -catch_assembly_dy
+ ])
+ CatchAssembly();
+ intersection(){
+ translate([0,0,+side_height
+ ])
+ Cover();
+ mirror([0,1,0]) translate([-250,33,0]) cube([500,500,500]);
+ }
+ color("black")
+ translate([0,-33,0])
+ cube([6.15, 2,2], center=true);
+}
+
+module CatchPinProfileDemo(){ /////toplevel
+ echo("G ",
+ cpp2[0] - cpp1[0],
+ bayo_n[0] - bayo_e[0]);
+ color("blue") translate([0,0,
+ +1,
+ ]) {
+ CatchAssemblyCoreProfile();
+ CatchHeadProfile();