X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;ds=sidebyside;f=crazyflie-2.0-housing.scad;h=f4f59cc781fd1f47c1dfa1986d76fecaa017c101;hb=HEAD;hp=3d61effe57ebb6df7668507d7c060255b4f819fd;hpb=b2b49e2cd22dd20a7b5b6fb2dfc7be298739bcaa;p=ozzloy%40gmail.com%2F3d-printables diff --git a/crazyflie-2.0-housing.scad b/crazyflie-2.0-housing.scad index 3d61eff..f4f59cc 100644 --- a/crazyflie-2.0-housing.scad +++ b/crazyflie-2.0-housing.scad @@ -9,43 +9,56 @@ wrapped around the motor shaft. */ -main_body_width_measured = 28.0; -main_body_length_measured = 31.0; -main_body_height_measured = 1.5; +$fn = 300; -arm_width_measured = 3.6; -arm_length_measured = 79.0; -arm_height_measured = main_body_height_measured; +// propeller diameter was measured with calipers +propeller_radius = 46.35 / 2; +// 7mm from spec +motor_grippable_height = 8; +motor_gripper_height = motor_grippable_height / 2; +holder_height = motor_grippable_height * 1.1; -motor_diameter_measured = 7; -motor_height_measured = 17; -motor_radius_measured = motor_diameter_measured / 2; +propeller_radius_measured = 46.35 / 2; +holder_wall_thickness = 1.2; +propeller_guard_wall_thickness = 1.2; -/*this is how far down the motor sticks below the circuit board*/ -motor_z_offset_measured = 5; +motor_diameter = 7; +motor_height_measured = 17; +motor_radius = motor_diameter / 2; -motor_z_translate = (motor_height_measured - arm_height_measured) / 2 - motor_z_offset_measured; +module propeller_protector(motor_radius, + holder_wall_thickness, + propeller_guard_wall_thickness, + motor_gripper_height, + holder_height, + propeller_radius) { + propeller_guard_inner_radius = propeller_radius + 1.5; + holder_outer_radius = motor_radius + holder_wall_thickness; + number_of_arms = 3; + linear_extrude(height = motor_gripper_height) { + // part that holds the motor + difference() { + circle(r = holder_outer_radius); + circle(r = motor_radius); } + for(arm_number = [0: (number_of_arms - 1)]) { + rotate(arm_number * (360 / number_of_arms)) { + translate([-propeller_guard_inner_radius, + -holder_wall_thickness / 2]) { + square([propeller_guard_inner_radius - motor_radius, + holder_wall_thickness]); } } } } + // prop protector + linear_extrude(height = holder_height) { + difference() { + circle(propeller_guard_inner_radius + + propeller_guard_wall_thickness); + circle(propeller_guard_inner_radius); } } } -cube([main_body_width_measured, - main_body_length_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);} -// TODO: move motor out by motor_radius amount -rotate(45) { - translate([arm_length_measured / 2, 0, motor_z_translate]){ - cylinder(h = motor_height_measured, - r = motor_radius_measured, - center = true); } } +propeller_protector(motor_radius, + holder_wall_thickness, + propeller_guard_wall_thickness, + motor_gripper_height, + holder_height, + propeller_radius_measured); /* This file is part of 3d-printables.