chiark / gitweb /
filamenttrestle plug hole height adjust right directions
[reprap-play.git] / filamenttrestle.scad
index 4532c79867aef2be1c27adc1a9e4bebf67089e2e..d0b0ccb6bb8b00cfeed76bd3d78463bd60758f11 100644 (file)
@@ -32,10 +32,12 @@ pindh = 1.0;
 pindwidth = 1.0;
 
 module Plug(d=0){
-  a = -atan(plugslope);
-  tdx = d * cos(a);
-  tdy = d * sin(a);
-  bdx = d / cos(a);
+  dw = d;
+  dh = d;
+  a = atan(plugslope);
+  bdx = dw / cos(a);
+  tdy = dh;
+  tdx = bdx + dh * plugslope;
   translate([-d,0,0]) rotate([90,0,90]) linear_extrude(height=plugl+0.1+d*2){
     polygon([[-(plugwmin/2 + bdx),  0],
             [-(plugwmax/2 + tdx),  plugh + tdy],