chiark / gitweb /
sewing-table: new front profile wip, prep for swap
[reprap-play.git] / sewing-table.scad.m4
index 8e16bbd9fa93c14d7cb831c5637c745495bcf923..712bce9028fd7fce126d9ba726522f45f2c0f4f3 100644 (file)
@@ -267,12 +267,6 @@ m4_define(`ROUNDCORNER_VARS',`
 
 module RoundCorner_selector(ci, adj) {
   ROUNDCORNER_VARS;
-  echo("RCS",l_uvec,ctr);
-  %union(){
-    INREFFRAME(this_cnr, right_cnr) {
-      cube(bigr*2 + adj, center=true);
-    }
-  }
   intersection(){
     union(){
       INREFFRAME(ctr3,concat(lp1,[4])){
@@ -495,6 +489,21 @@ module Machine_NewRearProfile(){
   }
 }
 
+module Machine_NewFrontProfile(){
+  // figures copied out of xfig edit boxes
+  // best not to edit the posbox size if poss - just move it
+  posbox = 10 * ([11.8022,8.0600] - [4.2044,19.1867]); // box, Green
+  refline = 10 * ([7.6778,16.7222] - [27.8689,17.6578]); // line, Blue
+  refline_mm = (11-1)*10;
+  sh = -[abs(posbox[0]), abs(posbox[1])];
+  rot = atan2(-refline[0], refline[1]);
+  sc = refline_mm / vectorlen2d(refline);
+  //echo("SH",sh,rot,sc);
+  mirror([1,0]) scale(sc) rotate(rot+90) translate(sh){
+    import("sewing-table-front-profile.dxf", convexity=10); // spline, Pink3
+  }
+}
+
 module Machine_NewRearCurve(){
   slant = atan2(4,210-10);
   //echo("SL",slant);
@@ -572,6 +581,12 @@ module Machine_Curves(){ ////toplevel
          Machine_FrontProfile();
       }
     }
+
+    %translate([0, -machine_rear_to_front, 0])
+      mirror([1,0,0]) rotate([0,-90,0])rotate([0,0,-90])
+      linear_extrude(height= 200)
+      Machine_NewFrontProfile();
+
     translate([ rearcurve_strt_len,
                0,
                rearcurve_z_slop ]){
@@ -786,6 +801,7 @@ module Tile00(){ ////toplevel
            cnr_posts[3] + [ 0,                             -cty ]
            ];
   rcs = R_CNR(c,1);
+  rc2 = [c1bis,c2bis,c[1]];
   difference(){
     union(){
       difference(){
@@ -804,9 +820,10 @@ module Tile00(){ ////toplevel
       RoundEdge(c1bis, c2bis);
     }
     Machine();
+    RoundCornerCut(rc2);
   }
   RoundCornerAdd(rcs);
-  RoundCornerAdd([c1bis,c2bis,c[1]]);
+  RoundCornerAdd(rc2);
 }
 
 module FitTest_FrontCurve(){ ////toplevel
@@ -854,6 +871,7 @@ module Demo(){ ////toplevel
 //Machine_Profile();
 //Machine_NewRearProfile();
 //Machine_NewRearCurve();
+//Machine_NewFrontProfile();
 //Machine_Curves();
 //Machine();
 //FitTest();