chiark / gitweb /
ksafe-base: wip KsafeBase
[reprap-play.git] / ksafe-base.scad
index 0f881c33401085b87af74c4688793ad09890abdf..2ef442b0c7c789d36b851555ead35e437c5073b8 100644 (file)
@@ -5,7 +5,7 @@ bolt_above = 4;
 wall_thick = 4;
 bolthole_height = 4;
 bolthole_width = 10;
-main_sz = 30;
+main_sz = 300;
 cnr_rad = 10;
 lidinner_thick_allow = 20;
 
@@ -20,10 +20,12 @@ base_thick = 4;
 space = 25;
 anchor_thick = 4;
 anchor_rad = 4;
-bevel = 15;
+bevel = 5;
 
 // ----- calculated -----
 
+hsz = main_sz/2;
+
 gppA = [0,0];
 gppB = gppA - [ wall_thick, 0 ];
 
@@ -60,7 +62,8 @@ module upp_app_Profile(){
            $xppF,
            $xppF + [1,0],
            $xppI + [1,0],
-           $xppJ ]);
+           $xppJ ],
+         convexity=10);
 }
 
 
@@ -82,7 +85,8 @@ module AnchorProfile(){
        polygon([ $xppE,
                  $xppF,
                  $xppF + [0,1],
-                 $xppE + [1,0] ]);
+                 $xppE + [1,0] ],
+         convexity=10);
        translate(appM) circle(r= anchor_b);
       }
       translate(appM) circle(r= anchor_rad);
@@ -99,7 +103,8 @@ module AnchorWallProfile(){
        polygon([ $xppE,
                  $xppF,
                  $xppI,
-                 $xppJ ]);
+                 $xppJ ],
+         convexity=10);
       }
     }
   }
@@ -116,18 +121,35 @@ module WebProfile(){
                $xppE,
                $xppF,
                $gppS,
-               $gppR ]);
+               $gppR ],
+         convexity=10);
     } else {
       polygon([ $gppP,
                $xppE,
                $xppF,
                $gppS,
-               $gppP + web_height * [1,0] ]);
+               $gppP + web_height * [1,0] ],
+         convexity=10);
     }
     polygon([ $gppS,
              $xppF,
              $xppF + [1,0],
-             $gppS + [1,0] ]);
+             $gppS + [1,0] ],
+         convexity=10);
+  }
+}
+
+module KsafeBase(){
+  for (xm=[0,1]) for (ym=[0,1]) {
+    mirror([xm,0]) mirror([0,ym])
+    translate((hsz - cnr_rad) * [1,1])
+    intersection(){
+      rotate_extrude(convexity=10)
+       translate([-cnr_rad,0])
+       UsualProfile();
+      translate([0,0,-250])
+       cube([50,50,500]);
+    }
   }
 }
 
@@ -139,4 +161,5 @@ module DemoProfiles(){
   translate([0,0,-4]) color("pink") WebProfile();
 }
 
-DemoProfiles();
+//DemoProfiles();
+KsafeBase();