use spokes instead of square for wheel master
authorozzloy <ozzloy+launchpad_net@gmail.com>
Sun, 3 Nov 2019 06:27:09 +0000 (23:27 -0700)
committerozzloy <ozzloy+launchpad_net@gmail.com>
Sun, 3 Nov 2019 06:27:09 +0000 (23:27 -0700)
Change-Id: I8b40c065bde57809fd4bbcd05004701a72d163c9

3d-printables/wheel-data.scad
3d-printables/wheel.scad

index 70dc710..5245266 100644 (file)
 //  100 will make printing smooth
 $fn = 100;
 
-wheel_square_spoke_size = 45;
-wheel_square_spoke_thickness = 2;
+wheel_spoke_length = 45;
+wheel_spoke_thickness = 2;
 
 wall_width = 3;
 
-wheel_width = 7;
+rim_width = 7;
 wheel_radius =
-  sqrt(2 * pow(wheel_square_spoke_size / 2, 2)) + wall_width / 2 + 1;
+  sqrt(2 * pow(wheel_spoke_length / 2, 2)) + wall_width / 2 + 1;
 
 motor_shaft_radius = 3.9;
 motor_shaft_flat_width = 5.2;
@@ -40,8 +40,8 @@ module motor_shaft(radius,
   linear_extrude(height = shaft_length) {
     motor_shaft_flat(radius, flat_width); } }
 
-module rim(radius, wall_width, wheel_width) {
-  linear_extrude(height = wheel_width) {
+module rim(radius, wall_width, rim_width) {
+  linear_extrude(height = rim_width) {
     difference() {
       circle(radius);
       circle(radius - wall_width); } } }
@@ -73,7 +73,7 @@ module wheel(radius,
     rim(radius, wall_width * 2, width);
     translate([0, 0, width / 2]) {
       tread(radius, tread_radius); } }
-  linear_extrude(height = wheel_square_spoke_thickness) {
+  linear_extrude(height = wheel_spoke_thickness) {
     difference() {
       union(){
         for(spoke = [0: spoke_count - 1]) {
@@ -81,11 +81,11 @@ module wheel(radius,
             translate([-spoke_width / 2, 0]){
             square([spoke_width, radius - 2]); } } } }
       mounting_screw_flat(); } }
-  translate([0, 0, wheel_square_spoke_thickness]) {
+  translate([0, 0, wheel_spoke_thickness]) {
     motor_shaft_holder(shaft_radius,
                        shaft_flat_width,
                        wall_width,
-                       width - wheel_square_spoke_thickness); } }
+                       width - wheel_spoke_thickness); } }
 
 /*
   This file is part of challenge-bot.
index f16e596..405a382 100644 (file)
@@ -13,7 +13,7 @@
 include <wheel-data.scad>
 
 wheel(wheel_radius,
-      wheel_width,
+      rim_width,
       motor_shaft_radius,
       motor_shaft_flat_width,
       wall_width,