trestleplugd = 1;
topblockthick = 4;
-topblockbasedepth = 4;
+topblockbasedepth = 5;
pinbasew = 5.0;
pinminh = 1.5;
module Plug(d=0){
dw = d;
dh = d;
+ dhb = d*2;
a = atan(plugslope);
- bdx = dw / cos(a);
+ bdy = -dhb;
+ bdx = dw / cos(a) + bdy * plugslope;
tdy = dh;
- tdx = bdx + dh * plugslope;
+ tdx = bdx + tdy * plugslope;
translate([-d,0,0]) rotate([90,0,90]) linear_extrude(height=plugl+0.1+d*2){
- polygon([[-(plugwmin/2 + bdx), 0],
+ polygon([[-(plugwmin/2 + bdx), bdy],
[-(plugwmax/2 + tdx), plugh + tdy],
[+(plugwmax/2 + tdx), plugh + tdy],
- [+(plugwmin/2 + bdx), 0]]);
+ [+(plugwmin/2 + bdx), bdy]]);
}
}