Last active
August 29, 2015 13:56
-
-
Save RaD/9018198 to your computer and use it in GitHub Desktop.
Hobbed Bolt Magic Device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hobbed Bolt Support | |
// Authors: Alexander, http://vk.com/linuxbashev | |
// Ruslan Popov, http://vk.com/id19523249 | |
// Original: http://www.thingiverse.com/thing:151669 | |
// Requires: http://curriculum.makerbot.com/daily_lessons/february/openscad_write.html | |
// Usage: | |
// * to generate all on one model: | |
// openscad -o all-in-one.stl hobbed_support.scad | |
// * to generate a particular model use 0, 1, or 2 as N: | |
// openscad -D only=N -o hobbed_N.stl hobbed_support.scad | |
$fn=32; | |
use <Write.scad>; | |
gear_depth = 7.5; | |
washer_depth = 1.6; | |
washer_count = 3; | |
extruder_depth = 9.3; | |
extruder_to_hole = 4.5; | |
k_material = [0.25, 0.4]; // ABS, PLA | |
k_index = 1; // PLA | |
bolt_diameter = 8; | |
bolt_radius = bolt_diameter / 2; | |
tap_radius = 6 / 2; | |
m8_radius = 8.5 / 2; | |
gk = [0.7, 0.9, 1.2]; | |
desc = ["First", "Second", "Third"]; | |
h608 = 7; | |
r608 = (22 + k_material[k_index]) / 2; | |
h606 = 6; | |
r606 = (19 + k_material[k_index]) / 2; | |
notch_offset = gear_depth + (washer_depth * washer_count) + extruder_depth + extruder_to_hole; | |
block_width = notch_offset * 2; | |
block_height = 50; | |
block_depth = 32; | |
block_tail = 30; | |
module device(step) { | |
tap_shift = gk[step]; | |
echo("TAP SHIFT IS ", tap_shift); | |
echo("K material IS ", k_material[k_index]); | |
translate([(block_width + 10) * step, 0, 0]) { | |
difference() { | |
// the case itself | |
cube([block_width, block_depth, block_height + block_tail]); | |
// text | |
writecube(text=desc[step], | |
where=[block_width/2, | |
block_depth, | |
block_height*1.2], | |
size=[0, 0, 0], | |
rotate=180, face="back", | |
h=10, | |
font = "orbitron.dxf"); | |
// the bolt axis | |
translate([1, block_depth/2, block_height/2-3]) | |
rotate([0,90,0]) | |
cylinder(block_width, m8_radius + 1, m8_radius + 1); | |
// the bolt bearings | |
translate([-1,block_depth/2, block_height/2-3]) | |
rotate([0,90,0]) | |
cylinder(h608+1, r608, r608); | |
translate([block_width-h608, block_depth/2, block_height/2-3]) | |
rotate([0,90,0]) | |
cylinder(h608+1, r608, r608); | |
// the tap axis | |
translate([notch_offset, | |
-1, | |
block_height/2-3 + bolt_radius + tap_radius - tap_shift]) | |
rotate([-90,0,0]) | |
cylinder(block_depth+2, m8_radius, m8_radius); | |
// the tap bearings | |
translate([notch_offset, | |
block_depth/2 - bolt_radius, | |
block_height/2-3 + bolt_radius + tap_radius - tap_shift]) | |
rotate([90,0,0]) | |
cylinder(h606+7, r606, r606); | |
translate([notch_offset, | |
block_depth + 1, | |
block_height/2-3 + bolt_radius + tap_radius - tap_shift]) | |
rotate([90,0,0]) | |
cylinder(h606+1, r606, r606); | |
// support gap | |
translate([notch_offset - r606 - 1, | |
block_depth / 2 - bolt_radius - 2, | |
-1]) | |
cube([r606 * 2 + 2, bolt_diameter + 4, block_height + block_tail + 2]); | |
} | |
// make custom support | |
for (i=[-8:2:8]) | |
translate([notch_offset + i, | |
block_depth / 2, | |
(block_height + block_tail) / 2]) | |
cube([0.4, bolt_diameter + 4, block_height+block_tail], center=true); | |
} | |
} | |
rotate([90, 0, 0]) | |
if (only == undef) { | |
// make three devices at once | |
for(step=[0:1:2]) { | |
device(step); | |
} | |
} else { | |
device(only); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment