Skip to content

Instantly share code, notes, and snippets.

@cjdell
Created March 29, 2016 19:01
Show Gist options
  • Save cjdell/1bd58f88824ad3442aa4151aef7cdc1a to your computer and use it in GitHub Desktop.
Save cjdell/1bd58f88824ad3442aa4151aef7cdc1a to your computer and use it in GitHub Desktop.
$fn = 100;
batt = [23, 72, 35];
standoff_spacing = 34;
standoff_diameter = 5.4;
standoff_radius = standoff_diameter / 2;
gate_thickness = 2.0;
gate_height = batt[2] / 2;
pole_radius = gate_thickness + standoff_radius;
module pole() {
difference() {
cylinder(r=pole_radius, h=gate_height);
translate([0, 0, -1]) {
cylinder(r=standoff_radius, h=gate_height + 2.0);
}
}
}
difference() {
pole();
translate([standoff_spacing / 2, 0, 0]) {
difference() {
translate([0, 0, -1]) {
cylinder(r=standoff_spacing / 2 + standoff_radius, h=gate_height + 2.0);
}
translate([-1000, 0, -2]) {
cube([2000, 60, 60]);
}
}
}
}
translate([standoff_spacing, 0, 0]) {
pole();
}
translate([standoff_spacing / 2, 0, 0]) {
difference() {
cylinder(r=standoff_spacing / 2 + pole_radius, h=gate_height);
translate([0, 0, -1]) {
cylinder(r=standoff_spacing / 2 + pole_radius - gate_thickness, h=gate_height + 2.0);
}
translate([-1000, 0, -2]) {
cube([2000, 60, 60]);
}
}
}
translate([(standoff_spacing - batt[0]) / 2, -5.0, 0]) {
cube(batt);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment