define wiring in separate file
[challenge-bot] / 3d-printables / wheel-data.scad
index 51646b08186c6d58614adb4b9b7eb097b92ddb23..70dc71039d081f537db10ccc54f10b20bcce0a10 100644 (file)
@@ -17,12 +17,12 @@ wheel_square_spoke_thickness = 2;
 
 wall_width = 3;
 
-wheel_width = 9;
+wheel_width = 7;
 wheel_radius =
   sqrt(2 * pow(wheel_square_spoke_size / 2, 2)) + wall_width / 2 + 1;
 
-motor_shaft_radius = 3.7;
-motor_shaft_flat_width = 4.8;
+motor_shaft_radius = 3.9;
+motor_shaft_flat_width = 5.2;
 
 tread_radius = 4 / 2;
 
@@ -67,13 +67,19 @@ module wheel(radius,
              shaft_flat_width,
              wall_width,
              tread_radius) {
+  spoke_count = 7;
+  spoke_width = radius / 3;
   difference() {
     rim(radius, wall_width * 2, width);
     translate([0, 0, width / 2]) {
       tread(radius, tread_radius); } }
   linear_extrude(height = wheel_square_spoke_thickness) {
     difference() {
-      square(wheel_square_spoke_size, center = true);
+      union(){
+        for(spoke = [0: spoke_count - 1]) {
+          rotate(spoke * 360 / spoke_count) {
+            translate([-spoke_width / 2, 0]){
+            square([spoke_width, radius - 2]); } } } }
       mounting_screw_flat(); } }
   translate([0, 0, wheel_square_spoke_thickness]) {
     motor_shaft_holder(shaft_radius,