Browse Source

new frame with motor flange

master
philipp schoenberger 7 years ago
parent
commit
e1af92464d
  1. 161
      Copter/mgh-quad.scad

161
Copter/mgh-quad.scad

@ -1,8 +1,17 @@
motor_size = 8.45;
motor_height = 10;
$fn = 25;
with_props=0;
with_motor=0;
with_pcbs=1;
with_akku=0;
motor_size = 8.47;
motor_height = 21;
motor_wall_d = 2.2; motor_wall_d = 2.2;
motor_clamp_cut = 3; motor_clamp_cut = 3;
usb_width=12;
usb_hight=8;
motor_helper_disc = 40; motor_helper_disc = 40;
motor_helper_height = 0.2; motor_helper_height = 0.2;
@ -11,21 +20,19 @@ motor_arm_height = 6;
motor_arm_length = 20; motor_arm_length = 20;
motor_body_len = 40; motor_body_len = 40;
motor_body_height = 8;
motor_body_height = 12;
motor_body_wall = 2; motor_body_wall = 2;
triangle_cut_height = 8;
triangle_cut_height = 10;
cable_cut_width = 3; cable_cut_width = 3;
cable_cut_height = 1.5;
cable_cut_height = 3;
motor_body_arm_dist = (motor_body_len - motor_arm_width + 2) / sqrt(2); motor_body_arm_dist = (motor_body_len - motor_arm_width + 2) / sqrt(2);
fc_width = 20;
fc_height = 28;
rx_width = 12;
rx_height = 25;
$fn = 25;
module aligned_cube(size, aligned=[1,1,0])
{
translate(-0.5*[size[0]*aligned[0], size[1]*aligned[1], size[2]*aligned[2]])
cube(size);
}
module triangle(o_len, a_len, depth) { module triangle(o_len, a_len, depth) {
linear_extrude(height=depth) linear_extrude(height=depth)
@ -33,56 +40,84 @@ module triangle(o_len, a_len, depth) {
} }
module fc_pcb() { module fc_pcb() {
%cube([fc_width, fc_height, 2]);
fc_width = 20;
fc_height = 28;
if(with_pcbs)
cube([fc_width, fc_height, 2]);
} }
module rx_pcb() { module rx_pcb() {
%cube([rx_width, rx_height, 2]);
rx_width = 12;
rx_height = 25;
if(with_pcbs)
cube([rx_width, rx_height, 2]);
}
module motor() {
color([0.8,0.2,0.2,0.5]) {
if (with_motor) {
cylinder(d = motor_size, h = motor_height );
translate([0, 0, -5])
cylinder(d = 2, h = motor_height + 5);
}
if (with_props) {
translate([0, 0, -5])
cylinder(d = 66.5, h = 2);
}
}
} }
module motor_clamp() { module motor_clamp() {
// motor / prop mockup // motor / prop mockup
%cylinder(d = motor_size, h = motor_height + 5);
%cylinder(d = 2, h = motor_height + 15);
%translate([0, 0, 20]) cylinder(d = 65, h = 2);
difference() { difference() {
union () { union () {
color("blue") color("blue")
// motor stand
hull() { hull() {
cylinder(d = motor_size + motor_wall_d, h = motor_height); cylinder(d = motor_size + motor_wall_d, h = motor_height);
translate([-motor_arm_width / 2, -(motor_size + motor_wall_d) / 2 - 2, motor_height - motor_arm_height]) translate([-motor_arm_width / 2, -(motor_size + motor_wall_d) / 2 - 2, motor_height - motor_arm_height])
cube([motor_arm_width, 1, motor_arm_height]); cube([motor_arm_width, 1, motor_arm_height]);
} }
// print support
color("green") color("green")
translate([0, 0, motor_height - motor_helper_height]) translate([0, 0, motor_height - motor_helper_height])
cylinder(d = motor_helper_disc, h = motor_helper_height); cylinder(d = motor_helper_disc, h = motor_helper_height);
color("blue") color("blue")
sphere(d = motor_size + motor_wall_d);
//sphere(d = motor_size + motor_wall_d);
translate([0, 0, -2])
cylinder(d = motor_size + motor_wall_d,h=7);
} }
// cable hole // cable hole
translate([-cable_cut_width / 2, -(motor_size + motor_wall_d) / 2 - cable_cut_height, -5])
cube([cable_cut_width, cable_cut_height, 20]);
translate([-cable_cut_width / 2, -(motor_size + motor_wall_d) / 2 - cable_cut_height, 0])
cube([cable_cut_width, cable_cut_height, 25]);
// motor hole // motor hole
translate([0, 0, -1]) translate([0, 0, -1])
cylinder(d = motor_size, h = motor_height + 2); cylinder(d = motor_size, h = motor_height + 2);
// clamp cutout // clamp cutout
translate([-motor_clamp_cut / 2, -3, -motor_size - motor_wall_d - 1]) translate([-motor_clamp_cut / 2, -3, -motor_size - motor_wall_d - 1])
cube([motor_clamp_cut, motor_size + motor_wall_d + 5, motor_height + motor_size + motor_wall_d + 2]); cube([motor_clamp_cut, motor_size + motor_wall_d + 5, motor_height + motor_size + motor_wall_d + 2]);
sphere(d = motor_size);
translate([0, 0, -motor_size - motor_wall_d - 1])
cylinder(d=6.5, h= motor_height + motor_size + motor_wall_d + 2);
translate([0, 0, -1.75])
cylinder(d2=motor_size,d1=6.5, h=0.75);
//sphere(d = motor_size);
} }
%motor();
} }
module arm() { module arm() {
motor_clamp(); motor_clamp();
// motor arm itself // motor arm itself
color("blue") color("blue")
translate([-motor_arm_width / 2, -(motor_arm_length + ((motor_size + motor_wall_d) / 2) + 2), motor_height - motor_arm_height]) translate([-motor_arm_width / 2, -(motor_arm_length + ((motor_size + motor_wall_d) / 2) + 2), motor_height - motor_arm_height])
@ -96,24 +131,23 @@ module body() {
translate([0, motor_arm_length + ((motor_size + motor_wall_d) / 2) + motor_body_arm_dist + 1, 0]) translate([0, motor_arm_length + ((motor_size + motor_wall_d) / 2) + motor_body_arm_dist + 1, 0])
difference() { difference() {
arm(); arm();
translate([-cable_cut_width / 2, -motor_arm_length - ((motor_size + motor_wall_d) / 2) - 2, motor_height - cable_cut_height])
cube([cable_cut_width, motor_arm_length + 1, cable_cut_height + 1]);
translate([-cable_cut_width / 2, -motor_arm_length - ((motor_size + motor_wall_d) / 2) - 2, motor_height - motor_arm_height-3])
cube([cable_cut_width, motor_arm_length + 2, cable_cut_height + 3]);
} }
} }
color("red") color("red")
translate([-motor_body_len / 2, -motor_body_len / 2, motor_height - motor_body_height])
translate([0,0, motor_height])
difference() { difference() {
cube([motor_body_len, motor_body_len, motor_body_height]);
aligned_cube([motor_body_len, motor_body_len, motor_body_height],[1,1,2]);
for(r = [45 : 90 : 360]) { for(r = [45 : 90 : 360]) {
translate([motor_body_len / 2, motor_body_len / 2, -motor_height + motor_body_height])
translate([0,0, -motor_height + motor_body_height])
rotate([0, 0, r]) rotate([0, 0, r])
translate([-cable_cut_width / 2, motor_body_len / 2 * sqrt(2) - 6, motor_height - cable_cut_height]) {
cube([cable_cut_width, 8, cable_cut_height + 1]);
translate([0, -1, -5])
cube([cable_cut_width, cable_cut_height, 10]);
translate([0, motor_body_len / 2 * sqrt(2) - 2, cable_cut_height]) {
aligned_cube([cable_cut_width, 8, cable_cut_height ]);
} }
} }
} }
@ -122,24 +156,45 @@ module body() {
module quad() { module quad() {
difference() { difference() {
translate([0, 0, motor_height]) translate([0, 0, motor_height])
rotate([180, 0, 0]) {
rotate([180, 0, 0])
{
body(); body();
translate([-3, -14, 6])
fc_pcb();
translate([-16, -12.5, 6])
rx_pcb();
translate([0,0, 15])
{
translate([-3, -14, 0])
%fc_pcb();
translate([-16, -12.5, 0])
%rx_pcb();
}
} }
// cut out for actual PCBs // cut out for actual PCBs
translate([-(motor_body_len - (2 * motor_body_wall)) / 2, -(motor_body_len - (2 * motor_body_wall)) / 2, motor_body_wall]) translate([-(motor_body_len - (2 * motor_body_wall)) / 2, -(motor_body_len - (2 * motor_body_wall)) / 2, motor_body_wall])
cube([motor_body_len - (2 * motor_body_wall), motor_body_len - (2 * motor_body_wall), motor_body_height - motor_body_wall + 1]); cube([motor_body_len - (2 * motor_body_wall), motor_body_len - (2 * motor_body_wall), motor_body_height - motor_body_wall + 1]);
// akku cutout
akku_cut=motor_body_len - motor_body_wall*2;
translate([0,0, motor_body_height]) {
scale([1,1,1])
rotate([0,0,45])
//cylinder($fn=4, d1=akku_cut*1.4, d2=30, h=11);
translate([1,-12.5,0]) {
//cube([20,25,10]);
}
translate([-30,-12.5,0]) {
//cube([20,25,10]);
}
}
translate([-motor_body_len/2,-(akku_cut)/2, motor_body_height]) {
//cube([motor_body_len, akku_cut/2, 10]);
}
// usb cutout // usb cutout
translate([-2, -motor_body_len / 2 - 1, 2]) translate([-2, -motor_body_len / 2 - 1, 2])
cube([12, 4, 7]);
cube([usb_width, 4, usb_hight]);
// triangle cut-outs // triangle cut-outs
translate([0, -motor_body_len / 3, -1]) { translate([0, -motor_body_len / 3, -1]) {
triangle(triangle_cut_height, motor_body_len / 4, 4); triangle(triangle_cut_height, motor_body_len / 4, 4);

Loading…
Cancel
Save