Pixel hardware and software
This commit is contained in:
361
scad/Pixel-screw.scad
Normal file
361
scad/Pixel-screw.scad
Normal file
@@ -0,0 +1,361 @@
|
||||
include <MCAD/screw.scad>
|
||||
|
||||
screw_length = 12;
|
||||
shaft1_length = 5;
|
||||
shaft2_length = 5;
|
||||
screw_inner_radius = 1;
|
||||
shaft1_radius = 3;
|
||||
shaft2_radius = 2;
|
||||
screw_radius = 20;
|
||||
screw_pitch = 60;
|
||||
fins = 6;
|
||||
taper = 1;
|
||||
groove_fraction = 0.85;
|
||||
groove_width = 2;
|
||||
groove_depth = 0; //0.5;
|
||||
groove_taper_ratio = 0.3;
|
||||
|
||||
screw_travel_in = 10;
|
||||
screw_travel_out = 10;
|
||||
|
||||
leadscrew_pitch = 60;
|
||||
leadscrew_length = 30;
|
||||
leadscrew_width = 2.5;
|
||||
leadscrew_inner = 5;
|
||||
leadscrew_outer = 7.5;
|
||||
leadscrew_endcap = 2;
|
||||
leadscrew_spacer = 5; // aka cone
|
||||
leadscrew_starts = 4;
|
||||
leadscrew_start = screw_length+leadscrew_spacer+shaft1_length;
|
||||
|
||||
leadscrew_width_shrink = 1;
|
||||
leadscrew_inner_shrink = 0.5;
|
||||
leadscrew_outer_shrink = 1;
|
||||
|
||||
clearance = 1;
|
||||
shaft_clearance = 0.8;
|
||||
body_thickness = 1;
|
||||
|
||||
// Overlap between the guide and the body
|
||||
guide_depth = 2;
|
||||
|
||||
//body_length = 26;
|
||||
//body_length = 30; // shaft_length+screw_length;
|
||||
body_length = screw_length + screw_travel_in + shaft1_length + leadscrew_spacer + guide_depth;
|
||||
body_inner_radius = screw_radius + clearance;
|
||||
body_outer_radius = body_inner_radius + body_thickness;
|
||||
|
||||
pipe_inner_radius = 1;
|
||||
pipe_hole_radius = 4;
|
||||
hole_taper = 1;
|
||||
|
||||
body_screw_length = screw_pitch/fins;
|
||||
|
||||
slot_width = 1;
|
||||
slot_start = shaft2_length - 3;
|
||||
|
||||
insert_height_inner = 4;
|
||||
insert_height_outer = 6;
|
||||
insert_width = 2;
|
||||
insert_clearance = 0.1;
|
||||
insert_block_thickness = 2 + insert_clearance;
|
||||
insert_length = 20; // body_length - guide_depth;
|
||||
|
||||
guide_lid_depth = 2;
|
||||
guide_radius = 5/2;
|
||||
guide_clearance = 0; // 0.1;
|
||||
guide_extra = 6;
|
||||
guide_middle_radius = 8;
|
||||
guide_notch_width = 4;
|
||||
guide_notch_depth = 2;
|
||||
|
||||
guide_start_position = body_length - guide_depth;
|
||||
guide_rotation = 360 * (guide_start_position - leadscrew_start) / leadscrew_pitch;
|
||||
|
||||
support_width = 8;
|
||||
support_height = 4;
|
||||
//support_length = 40;
|
||||
support_radius = 14;
|
||||
support_position = support_radius + support_height/2 + 1;
|
||||
|
||||
support_top_width = 4;
|
||||
support_top_length = 5;
|
||||
|
||||
support_clearance = 0; //0.1;
|
||||
|
||||
driver_inner_radius = guide_radius;
|
||||
driver_outer_radius = driver_inner_radius+guide_extra;
|
||||
driver_slot_clearance = 0.5;
|
||||
driver_slot_length = 25;
|
||||
driver_end_cap = 2; // Later this will be an attachment for a servo horn
|
||||
|
||||
motor_x = 12;
|
||||
motor_y = 22.5;
|
||||
motor_mount_depth = 5;
|
||||
motor_x_thickness = 2;
|
||||
motor_y_thickness = 2;
|
||||
motor_screw_diameter = 1.5;
|
||||
motor_screw_housing = 3;
|
||||
motor_screw_position = 14;
|
||||
motor_shaft_position = 6 - motor_y/2;
|
||||
|
||||
motor_to_horn_end = 13;
|
||||
motor_mount_to_horn_end = motor_to_horn_end - motor_mount_depth;
|
||||
|
||||
support_spare = 1;
|
||||
shaft2_overlap = 2;
|
||||
nails_length = 10;
|
||||
horn_shaft_length = 5;
|
||||
horn_shaft_overlap = 2;
|
||||
horn_thickness = 2.5;
|
||||
|
||||
support_length = leadscrew_length + shaft2_length - shaft2_overlap + nails_length + horn_shaft_length - horn_shaft_overlap + horn_thickness + motor_mount_to_horn_end + support_spare;
|
||||
|
||||
delta = 0.1;
|
||||
|
||||
debug_travel = 0;
|
||||
|
||||
render_screw = 1;
|
||||
render_pipe_screw = 0;
|
||||
render_guide = 0;
|
||||
render_motor_mount = 0;
|
||||
|
||||
// These are obsolete
|
||||
render_pipe = 0;
|
||||
render_pipe_alternate = 0;
|
||||
render_driver = 0;
|
||||
|
||||
translate_guide = render_pipe_screw?(guide_start_position):0;
|
||||
translate_motor_mount = render_guide?(translate_guide+support_length+guide_depth+guide_lid_depth):0;
|
||||
|
||||
rotate([0, 0, -360*debug_travel/leadscrew_pitch])
|
||||
translate([0, 0, debug_travel])
|
||||
if (render_screw) {
|
||||
// Visible screw
|
||||
augers(screw_pitch, screw_length, screw_radius, screw_inner_radius, taper, groove_fraction, groove_width, groove_depth, 0, groove_taper_ratio, fins);
|
||||
|
||||
// shaft 1
|
||||
translate([0, 0, screw_length])
|
||||
translate([0, 0, -delta])
|
||||
cylinder(h=shaft1_length+2*delta, r=shaft1_radius, $fn=36);
|
||||
|
||||
// shaft 2
|
||||
translate([0, 0, screw_length+shaft1_length+leadscrew_spacer+leadscrew_length])
|
||||
difference() {
|
||||
translate([0, 0, -delta])
|
||||
cylinder(h=shaft2_length+delta, r=shaft2_radius, $fn=36);
|
||||
translate([-shaft2_radius*1.5, -slot_width/2, slot_start])
|
||||
cube([shaft2_radius*3,slot_width, shaft2_length-slot_start+delta]);
|
||||
}
|
||||
|
||||
// cone
|
||||
translate([0, 0, screw_length+shaft1_length])
|
||||
cylinder(h=leadscrew_spacer, r1=shaft1_radius, r2=sqrt(leadscrew_outer*leadscrew_outer + leadscrew_width*leadscrew_width), $fn=36);
|
||||
|
||||
// leadscrew
|
||||
translate([0, 0, leadscrew_start])
|
||||
difference() {
|
||||
leadscrew(leadscrew_pitch, leadscrew_length, leadscrew_outer, leadscrew_width, leadscrew_inner, leadscrew_starts);
|
||||
translate([0, 0, -leadscrew_pitch])
|
||||
intersection() {
|
||||
leadscrew(leadscrew_pitch, leadscrew_length+2*leadscrew_pitch, leadscrew_outer-leadscrew_outer_shrink, leadscrew_width-leadscrew_width_shrink, leadscrew_inner-leadscrew_inner_shrink, leadscrew_starts);
|
||||
translate([0, 0, 0])
|
||||
cylinder(h=leadscrew_length-leadscrew_endcap, r=leadscrew_outer*2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* width is doubled within this module */
|
||||
module leadscrew(pitch, length, outer, width, inner, n=4)
|
||||
{
|
||||
augers(pitch, length, outer, width, 1, n=n);
|
||||
cylinder(h=length, r=inner);
|
||||
}
|
||||
|
||||
module augers(pitch, length, outside_radius, inner_radius, taper_ratio = 0.25, ,groove_fraction = 0, groove_width = 0, groove1_depth = 0, groove2_depth = 0, groove_taper_ratio = 1, n = 1)
|
||||
{
|
||||
for (i = [0:n-1]) {
|
||||
rotate([0, 0, i*360/n]) auger_plus(pitch, length, outside_radius, inner_radius, taper_ratio, groove_fraction, groove_width, groove1_depth, groove2_depth, groove_taper_ratio);
|
||||
}
|
||||
}
|
||||
|
||||
module auger_plus(pitch, length, outside_radius, inner_radius, taper_ratio = 0.25, groove_fraction = 0, groove_width = 0, groove1_depth = 0, groove2_depth = 0, groove_taper_ratio = 1) {
|
||||
groove_radius = groove_fraction*(outside_radius-inner_radius) + inner_radius;
|
||||
groove_inner_radius = max(0, groove_radius - groove_width/2);
|
||||
groove_outer_radius = min(outside_radius, groove_radius + groove_width/2);
|
||||
groove_taper = (groove_outer_radius - groove_inner_radius) * (1- groove_taper_ratio) / 2;
|
||||
groove_mid_inner_radius = groove_inner_radius + groove_taper;
|
||||
groove_mid_outer_radius = groove_outer_radius - groove_taper;
|
||||
union(){
|
||||
helix(pitch, length)
|
||||
polygon(points=[
|
||||
[0,inner_radius],
|
||||
[groove_inner_radius, inner_radius * (1 + groove_inner_radius * (taper_ratio - 1) / outside_radius)],
|
||||
[groove_mid_inner_radius, inner_radius * (1 + groove_mid_inner_radius * (taper_ratio - 1) / outside_radius) + groove1_depth],
|
||||
[groove_mid_outer_radius, inner_radius * (1 + groove_mid_outer_radius * (taper_ratio - 1) / outside_radius) + groove1_depth],
|
||||
[groove_outer_radius, inner_radius * (1 + groove_outer_radius * (taper_ratio - 1) / outside_radius)],
|
||||
[outside_radius,(inner_radius * taper_ratio)],
|
||||
[outside_radius,(inner_radius * -1 * taper_ratio)],
|
||||
[groove_outer_radius, -inner_radius * (1 + groove_outer_radius * (taper_ratio - 1) / outside_radius)],
|
||||
[groove_mid_outer_radius, -inner_radius * (1 + groove_mid_outer_radius * (taper_ratio - 1) / outside_radius) - groove2_depth],
|
||||
[groove_mid_inner_radius, -inner_radius * (1 + groove_mid_inner_radius * (taper_ratio - 1) / outside_radius) - groove2_depth],
|
||||
[groove_inner_radius, -inner_radius * (1 + groove_inner_radius * (taper_ratio - 1) / outside_radius)],
|
||||
[0,(-1 * inner_radius)]],
|
||||
paths=[[0,1,2,3,4,5,6,7,8,9,10,11]]);
|
||||
cylinder(h=length, r=inner_radius);
|
||||
}
|
||||
}
|
||||
|
||||
if (render_pipe) {
|
||||
translate([render_screw?50:0, 0, 0])
|
||||
difference() {
|
||||
cylinder(h=body_length, r=body_outer_radius);
|
||||
translate([0, 0, body_screw_length]) cylinder(h=body_length - body_screw_length + delta, r=body_inner_radius);
|
||||
translate([0, 0, -delta]) augers(screw_pitch, body_screw_length+2*delta, screw_radius+clearance, screw_inner_radius+shaft_clearance, hole_taper, groove_fraction, groove_width, 0, -groove_depth, groove_taper_ratio, fins);
|
||||
}
|
||||
}
|
||||
|
||||
if (render_pipe_alternate) {
|
||||
translate([render_screw?50:0, 0, 0])
|
||||
scale([1.1,1.1,1])
|
||||
difference() {
|
||||
cylinder(h=body_length, r=body_outer_radius);
|
||||
translate([0, 0, body_screw_length]) cylinder(h=body_length - body_screw_length + delta, r=body_inner_radius);
|
||||
translate([0, 0, -delta]) augers(screw_pitch, body_screw_length+2*delta, screw_radius, screw_inner_radius, hole_taper, groove_fraction, groove_width, 0, -groove_depth, groove_taper_ratio, fins);
|
||||
}
|
||||
}
|
||||
|
||||
module matrix_insert(c = 0) {
|
||||
translate([0, 0, -c])
|
||||
linear_extrude(height=insert_length+2*c) {
|
||||
polygon(points=[
|
||||
[body_outer_radius, insert_height_inner/2+c],
|
||||
[body_outer_radius+insert_width+2*c, insert_height_outer/2+c],
|
||||
[body_outer_radius+insert_width+2*c, -insert_height_outer/2-c],
|
||||
[body_outer_radius, -insert_height_inner/2-c]
|
||||
]);
|
||||
}
|
||||
translate([body_outer_radius, 0, insert_length/2])
|
||||
cube([2*body_thickness, insert_height_inner+2*c, insert_length], center=true);
|
||||
}
|
||||
|
||||
module matrix_block() {
|
||||
difference() {
|
||||
translate([-body_inner_radius-insert_width-body_thickness-2*insert_clearance, -insert_height_outer/2-insert_block_thickness])
|
||||
cube([body_thickness+insert_width+2*insert_clearance, insert_height_outer+2*insert_block_thickness, insert_length]);
|
||||
translate([-2*body_outer_radius-insert_width-2*insert_clearance, 0, 0])
|
||||
matrix_insert(insert_clearance);
|
||||
}
|
||||
}
|
||||
|
||||
if (render_pipe_screw) {
|
||||
difference() {
|
||||
rotate([0, 0, -180/fins])
|
||||
augers(screw_pitch, body_screw_length, screw_radius+clearance, pipe_inner_radius, hole_taper, groove_fraction, groove_width, 0, -groove_depth, groove_taper_ratio, fins);
|
||||
translate([0, 0, -delta])
|
||||
cylinder(h=body_length + 2*delta, r=pipe_hole_radius);
|
||||
translate([0, 0, -delta]) augers(screw_pitch, body_screw_length+2*delta, screw_radius+clearance, screw_inner_radius+shaft_clearance, hole_taper, groove_fraction, groove_width, 0, -groove_depth, groove_taper_ratio, fins);
|
||||
|
||||
}
|
||||
difference() {
|
||||
cylinder(h=body_length, r=body_outer_radius);
|
||||
translate([0, 0, -delta])
|
||||
cylinder(h=body_length + 2*delta, r=body_inner_radius);
|
||||
translate([0, 0, body_length-guide_notch_depth/2])
|
||||
cube([body_outer_radius*3, guide_notch_width+guide_clearance, guide_notch_depth+delta], center=true);
|
||||
translate([0, 0, body_length-guide_notch_depth/2])
|
||||
cube([guide_notch_width+guide_clearance, body_outer_radius*3, guide_notch_depth+delta], center=true);
|
||||
}
|
||||
matrix_insert();
|
||||
rotate([0, 0, 90]) matrix_insert();
|
||||
matrix_block();
|
||||
rotate([0, 0, 90]) matrix_block();
|
||||
}
|
||||
|
||||
if (render_guide) {
|
||||
translate([0, 0, translate_guide]) {
|
||||
difference() {
|
||||
union() {
|
||||
// Bottom plate
|
||||
cylinder(h=guide_depth+delta, r=body_inner_radius-guide_clearance);
|
||||
|
||||
// Lugs
|
||||
intersection() {
|
||||
cylinder(h=guide_depth+delta, r=body_outer_radius);
|
||||
union() {
|
||||
translate([0, 0, guide_notch_depth/2])
|
||||
cube([body_outer_radius*3, guide_notch_width, guide_notch_depth+delta], center=true);
|
||||
translate([0, 0, guide_notch_depth/2])
|
||||
cube([guide_notch_width, body_outer_radius*3, guide_notch_depth+delta], center=true);
|
||||
}
|
||||
}
|
||||
|
||||
// Top plate
|
||||
translate([0, 0, guide_depth])
|
||||
cylinder(h=guide_lid_depth, r=body_outer_radius);
|
||||
|
||||
// Screw casing
|
||||
translate([0, 0, guide_depth + guide_lid_depth - delta])
|
||||
cylinder(h=guide_extra + delta, r=guide_middle_radius);
|
||||
}
|
||||
|
||||
// Hole
|
||||
//translate([0, 0, -delta])
|
||||
// cylinder(h=guide_depth+guide_lid_depth+guide_extra+2*delta, r=guide_radius, $fn=36);
|
||||
scale([1.1, 1.1, 1])
|
||||
translate([0, 0, -leadscrew_pitch])
|
||||
rotate([0, 0, -guide_rotation])
|
||||
leadscrew(leadscrew_pitch, leadscrew_length+leadscrew_pitch*2, leadscrew_outer, leadscrew_width, leadscrew_inner, leadscrew_starts);
|
||||
}
|
||||
|
||||
// Support
|
||||
translate([0, -support_position, guide_depth + guide_lid_depth]) {
|
||||
translate([0, 0, support_length/2+delta/2])
|
||||
cube([support_width, support_height, support_length+delta], center=true);
|
||||
translate([0, 0, support_length+support_top_length/2-delta/2])
|
||||
cube([support_top_width, support_height, support_top_length+delta], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (render_driver) {
|
||||
difference() {
|
||||
cylinder(h = driver_slot_length + driver_end_cap, r=driver_outer_radius, $fn=36);
|
||||
translate([0, 0, driver_end_cap])
|
||||
cylinder(h = driver_slot_length + delta, r=driver_inner_radius, $fn=36);
|
||||
}
|
||||
cubex = (driver_inner_radius+driver_outer_radius);
|
||||
cubey = slot_width - driver_slot_clearance;
|
||||
translate([-cubex/2, -cubey/2, driver_end_cap-delta])
|
||||
cube([cubex, cubey, driver_slot_length+delta]);
|
||||
}
|
||||
|
||||
translate([0, 0, translate_motor_mount])
|
||||
if (render_motor_mount) {
|
||||
translate([0, -motor_shaft_position, motor_mount_depth/2]) {
|
||||
difference() {
|
||||
union() {
|
||||
cube([motor_x + 2*motor_x_thickness, motor_y + 2*motor_y_thickness, motor_mount_depth], center=true);
|
||||
translate([0, motor_screw_position, 0])
|
||||
cylinder(h=motor_mount_depth, d=motor_screw_housing, $fn=36, center=true);
|
||||
translate([0, -motor_screw_position, 0])
|
||||
cylinder(h=motor_mount_depth, d=motor_screw_housing, $fn=36, center=true);
|
||||
translate([0, (motor_screw_position + motor_y/2 + delta)/2, 0])
|
||||
cube([motor_screw_housing, motor_screw_position - motor_y/2 - delta, motor_mount_depth], center=true);
|
||||
translate([0, -(motor_screw_position + motor_y/2 + delta)/2, 0])
|
||||
cube([motor_screw_housing, motor_screw_position - motor_y/2 - delta, motor_mount_depth], center=true);
|
||||
support_extra = (support_width - support_top_width)/2;
|
||||
cube_len = support_extra+support_position+support_height/2-motor_shaft_position-motor_y/2-motor_y_thickness+delta;
|
||||
translate([0, -cube_len/2 - motor_y/2 - motor_y_thickness + delta/2, 0])
|
||||
cube([support_width, cube_len, motor_mount_depth], center=true);
|
||||
}
|
||||
cube([motor_x, motor_y, motor_mount_depth+2*delta], center=true);
|
||||
translate([0, motor_screw_position, 0])
|
||||
cylinder(h=motor_mount_depth+2*delta, d=motor_screw_diameter, $fn=36, center=true);
|
||||
translate([0, -motor_screw_position, 0])
|
||||
cylinder(h=motor_mount_depth+2*delta, d=motor_screw_diameter, $fn=36, center=true);
|
||||
translate([0, motor_shaft_position-support_position, 0])
|
||||
cube([support_top_width+2*support_clearance, support_height+2*support_clearance, motor_mount_depth+2*delta], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
37
scad/README
Normal file
37
scad/README
Normal file
@@ -0,0 +1,37 @@
|
||||
== Pixel-screw.scad ==
|
||||
|
||||
This can generate four parts. Set each of the following to 1 in turn:
|
||||
|
||||
render_screw = 1;
|
||||
render_pipe_screw = 0;
|
||||
render_guide = 0;
|
||||
render_motor_mount = 0;
|
||||
|
||||
Note that they can be combined to see how the model fits together.
|
||||
|
||||
The screw should be printed in a one colour (I chose yellow) and the pipe screw
|
||||
and the guide should be printed in a contrasting colour (I chose black).
|
||||
|
||||
The colour of the motor mount and the other components isn't visible from the
|
||||
front, and so only matters to the aesthetics from the back. (I chose blue)
|
||||
|
||||
== nail-test.scad ==
|
||||
|
||||
Set the following to 0 and to 1 to generate the two halves of this part.
|
||||
|
||||
nail = 0;
|
||||
|
||||
The difference is that one has a narrower diameter in the holes, so that a nail
|
||||
can be banged into each hole. I used 40x1.6mm steel panel pins.
|
||||
|
||||
== horn-holder.scad ==
|
||||
|
||||
This fits the straight arm from a Tower Pro SG90 servo.
|
||||
|
||||
|
||||
== Notes ==
|
||||
|
||||
The mechanism for attaching the nail system to the rest of the parts is
|
||||
considerably weaker than the rest of the system, and is prone to breakage.
|
||||
This really needs redesigning. A square hole/insert would probably make
|
||||
more sense here.
|
||||
58
scad/horn-holder.scad
Normal file
58
scad/horn-holder.scad
Normal file
@@ -0,0 +1,58 @@
|
||||
thickness = 2;
|
||||
centre_d = 7;
|
||||
middle_d = 5.5;
|
||||
outer_d = 4;
|
||||
length = 32;
|
||||
$fn = 36;
|
||||
|
||||
rim = 2;
|
||||
rim_thickness = 2;
|
||||
clearance = 0.1;
|
||||
|
||||
shaft_radius = 2;
|
||||
shaft_length = 5;
|
||||
groove_width = 1;
|
||||
groove_length = 3;
|
||||
|
||||
outer_centre = length/2 - outer_d/2;
|
||||
|
||||
screw_d = 2.4;
|
||||
screw_depth = 1;
|
||||
|
||||
delta = 0.1;
|
||||
|
||||
module horn(thickness, length, centre_d, middle_d, outer_d) {
|
||||
cylinder(h=thickness, d=centre_d);
|
||||
|
||||
translate([-outer_centre, 0, 0])
|
||||
cylinder(h=thickness, d=outer_d);
|
||||
|
||||
translate([outer_centre, 0, 0])
|
||||
cylinder(h=thickness, d=outer_d);
|
||||
|
||||
linear_extrude(height = thickness)
|
||||
polygon(points=[
|
||||
[0, -middle_d/2],
|
||||
[-outer_centre, -outer_d/2],
|
||||
[-outer_centre, outer_d/2],
|
||||
[0, middle_d/2],
|
||||
[outer_centre, outer_d/2],
|
||||
[outer_centre, -outer_d/2]
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
difference() {
|
||||
horn(thickness+rim, length+rim, centre_d+rim, middle_d+rim, outer_d+rim);
|
||||
translate([0, 0, -delta])
|
||||
horn(thickness+delta, length + clearance, centre_d + clearance, middle_d + clearance, outer_d + clearance);
|
||||
translate([0, 0, thickness-delta])
|
||||
cylinder(h=screw_depth+delta, d=screw_d);
|
||||
}
|
||||
|
||||
difference() {
|
||||
translate([0, 0, thickness + rim - delta])
|
||||
cylinder(h=delta + shaft_length, r = shaft_radius);
|
||||
translate([-shaft_radius*3/2, -groove_width/2, thickness + rim + shaft_length - groove_length])
|
||||
cube([shaft_radius*3, groove_width, groove_length+delta]);
|
||||
}
|
||||
54
scad/nail-test.scad
Normal file
54
scad/nail-test.scad
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
delta = 0.1;
|
||||
xo = 10;
|
||||
height = 10;
|
||||
bar_thickness = 2;
|
||||
|
||||
nail = 0;
|
||||
|
||||
d_inner_nail = 1.8;
|
||||
d_outer_nail = 6;
|
||||
|
||||
d_inner_hole = 2.2;
|
||||
d_outer_hole = 6;
|
||||
|
||||
d_inner = nail ? d_inner_nail : d_inner_hole;
|
||||
d_outer = nail ? d_outer_nail : d_outer_hole;
|
||||
|
||||
d_centre = 7;
|
||||
d_joint = 4.55;
|
||||
w_joint = 0.7;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
translate([-xo, -d_outer/2, 0])
|
||||
cube([xo*2, d_outer, bar_thickness]);
|
||||
cylinder(h=bar_thickness, d=d_centre, $fn=36);
|
||||
translate([-xo, 0, 0])
|
||||
nail_outer();
|
||||
translate([xo, 0, 0])
|
||||
nail_outer();
|
||||
}
|
||||
translate([-xo, 0, 0])
|
||||
nail_hole(d_inner);
|
||||
translate([xo, 0, 0])
|
||||
nail_hole(d_inner);
|
||||
nail_hole(d_joint);
|
||||
}
|
||||
|
||||
joint_bar();
|
||||
|
||||
module nail_outer() {
|
||||
cylinder(h=height, d=d_outer, $fn=36);
|
||||
}
|
||||
|
||||
module nail_hole(diameter) {
|
||||
translate([0, 0, -delta])
|
||||
cylinder(h=height+2*delta, d=diameter, $fn=36);
|
||||
|
||||
}
|
||||
|
||||
module joint_bar() {
|
||||
translate([-d_joint, -w_joint/2, 0])
|
||||
cube([d_joint*2, w_joint, bar_thickness]);
|
||||
}
|
||||
Reference in New Issue
Block a user