make all 4 motors on crazyflie
[ozzloy@gmail.com/3d-printables] / crazyflie-2.0-housing.scad
index 9a38432bf891fee2f5c134e3007266125c8a15fc..1bbd7e58d17099282dc089b029dd57349e8673c4 100644 (file)
@@ -9,24 +9,70 @@
    wrapped around the motor shaft.
  */
 
-across_body_screws_outside_measured = 33.3;
-across_body_screws_inside_measured = 32.0;
-
-inside_ = 28.0;
-
 main_body_width_measured = 28.0;
 main_body_length_measured = 31.0;
-main_body_diagonal_measured = 79.0;
 main_body_height_measured = 1.5;
 
+arm_width_measured = 3.6;
+arm_length_measured = 79.0;
+arm_height_measured = main_body_height_measured;
+
+motor_diameter_measured = 7;
+motor_height_measured = 17;
+motor_radius_measured = motor_diameter_measured / 2;
 
-main_body_arm_width_measured = 3.6;
+/*this is how far down the motor sticks below the circuit board*/
+motor_z_offset_measured = 5;
+
+motor_z_translate = (motor_height_measured - arm_height_measured) / 2 - motor_z_offset_measured;
 
 cube([main_body_width_measured,
       main_body_length_measured,
-      main_body_height_measured]);
-
+      main_body_height_measured],
+     center = true);
+rotate(45){
+  cube([arm_width_measured,
+        arm_length_measured,
+        arm_height_measured],
+       center = true);}
+rotate(-45){
+  cube([arm_width_measured,
+        arm_length_measured,
+        arm_height_measured],
+       center = true);}
 
+rotate(45) {
+  translate([arm_length_measured / 2 + motor_radius_measured,
+             0,
+             motor_z_translate]){
+    cylinder(h = motor_height_measured,
+             r = motor_radius_measured,
+             center = true,
+             $fn = 50); } }
+rotate(45 + 90) {
+  translate([arm_length_measured / 2 + motor_radius_measured,
+             0,
+             motor_z_translate]){
+    cylinder(h = motor_height_measured,
+             r = motor_radius_measured,
+             center = true,
+             $fn = 50); } }
+rotate(45 + 90 * 2) {
+  translate([arm_length_measured / 2 + motor_radius_measured,
+             0,
+             motor_z_translate]){
+    cylinder(h = motor_height_measured,
+             r = motor_radius_measured,
+             center = true,
+             $fn = 50); } }
+rotate(45 + 90 * 3) {
+  translate([arm_length_measured / 2 + motor_radius_measured,
+             0,
+             motor_z_translate]){
+    cylinder(h = motor_height_measured,
+             r = motor_radius_measured,
+             center = true,
+             $fn = 50); } }
 
 /*
   This file is part of 3d-printables.