chiark / gitweb /
digispark-with-cable: format
[reprap-play.git] / digispark-with-cable.scad
index 69a19e25e3f629eed4c87cc0e22e0bbd9a4cc50f..1758a584156d24063de4debb4914670ae35464bf 100644 (file)
@@ -5,10 +5,10 @@ include <utils.scad>
 //tongue_w = 11.92 + 0.4;
 
 usb_w = 12.01 - 0.3;
-usb_wall_w = 0.75 - 0.1;
+usb_wall_w = 0.51;
 usb_tongue_d = 8.97 - 0.2;
 usb_wall_h = 4.54 - 2.04;
-usb_ceil_th = 0.125;
+usb_ceil_th = 0.425;
 
 side_wall_th = 1.5;
 
@@ -18,12 +18,20 @@ board_th = 1.92 + 0.1;
 
 sw_to_edge = board_w/2 + 0.1;
 
+front_wall_th = 0.75;
+egress_w = 8.0;
+
+wall_y_min = -board_l - side_wall_th;;
+ceil_y_min = wall_y_min - 5;;
+
 small_walls = [
               [ [0, 0], [-sw_to_edge, -1.0] ],
               [ [sw_to_edge-4.5, -4.5], [sw_to_edge, -5.7] ],
-              [ [3.0, -11.72] ,[sw_to_edge, -13.38] ],
+              [ [3.0, -11.72],              [sw_to_edge, -13.38] ],
               [ [-sw_to_edge+3.85, -14.90], [sw_to_edge, -13.38] ],
               ];
+chip_cutout = [[ -sw_to_edge + 4.20,    -4.50 ],
+              [ -sw_to_edge + 11.95,  -11.90 ]];
 
 module BothSides(){
   for (m=[0,1]) {
@@ -44,18 +52,25 @@ module TopSmallWallsPlan() {
   }
 }
 module TopCeilPlan() {
-  BothSides(){
-    rectfromto([ -usb_w/2,              -0.01        ],
-              [ 0.1,                   usb_tongue_d ]);
-    rectfromto([ -board_w/2 - side_wall_th, 0            ],
-              [ 0.1,                       -board_l     ]);
+  difference(){
+    BothSides(){
+      rectfromto([ -usb_w/2,              -0.01        ],
+                [ 0.1,                   usb_tongue_d ]);
+      rectfromto([ -board_w/2 - side_wall_th, 0            ],
+                [ 0.1,                       ceil_y_min   ]);
+    }
+    rectfromto(chip_cutout[0], chip_cutout[1]);
   }
 }
 module TopMainWallsPlan() {
   BothSides(){
-    rectfromto([ -board_w/2 - side_wall_th, 0            ],
-              [ -board_w/2,                -board_l     ]);
+    rectfromto([ -board_w/2 - side_wall_th, 0          ],
+              [ -board_w/2,                wall_y_min ]);
+    rectfromto([ -board_w/2 - side_wall_th, 0             ],
+               [ -usb_w/2,                  front_wall_th ]);
   }
+  rectfromto([ -board_w/2 - side_wall_th + egress_w, -board_l   ],
+            [ +board_w/2 + side_wall_th,            wall_y_min ]);
 }
 
 module Top(){