Moved arms module to external file

This commit is contained in:
Sebastian 2016-07-06 12:36:56 +02:00
parent 99a85fe92d
commit a1700efbde
4 changed files with 3577 additions and 1689 deletions

View File

@ -1,22 +1,8 @@
include <constants.scad>;
use<utils.scad>
$fn = 90;
module arms(angles, height, dia) {
for(angle = angles) {
rotate([0, 0, angle])
translate([arm_radius / 2,
0,
height])
rotate([0, 90, 0])
cylinder(r = dia / 2,
h = arm_radius,
center = true);
}
}
difference() {
union() {
cylinder(r = bottom_outer_diameter / 2, h = bottom_height);
@ -25,8 +11,8 @@ difference() {
cylinder(r = insert_diameter/2,
h = insert_length);
arms([0, 180], arm_dia/2, arm_dia);
arms([90,270], bottom_short_loop_arms_height, arm_dia);
arms([0, 180], arm_radius, arm_dia/2, arm_dia);
arms([90,270], arm_radius, bottom_short_loop_arms_height, arm_dia);
}
union() {
@ -35,8 +21,8 @@ difference() {
cylinder(r = insert_hole_dia / 2,
h = insert_length + bottom_height);
arms([0, 180], arm_dia/2, arm_hole_dia);
arms([90,270], bottom_short_loop_arms_height, arm_hole_dia);
arms([0,180], bottom_short_loop_arms_height, bottom_work_hole_dia);
arms([0, 180], arm_radius, arm_dia / 2, arm_hole_dia);
arms([90,270], arm_radius, bottom_short_loop_arms_height, arm_hole_dia);
arms([0,180], bottom_outer_diameter / 2, bottom_short_loop_arms_height, bottom_work_hole_dia);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +1,27 @@
include <constants.scad>;
use<utils.scad>;
$fn = 90;
module top() {
difference() {
union() {
cylinder(r = top_outer_diameter/2,
cylinder(r = top_outer_diameter / 2,
h = top_height);
for(angle = [0, 90, 180, 270]) {
rotate([0, 0, angle])
translate([arm_radius / 2,
0,
top_height - arm_dia / 2])
rotate([0, 90, 0])
cylinder(r = arm_dia / 2,
h = arm_radius,
center = true);
}
arms([0, 90, 180, 270], arm_radius, top_height - arm_dia / 2, arm_dia);
translate([0, 0, -insert_length])
cylinder(r = insert_diameter/2,
cylinder(r = insert_diameter / 2,
h = insert_length);
}
union() {
translate([0, 0, top_height - top_inner_depth])
cylinder(r = top_inner_diameter/2,
cylinder(r = top_inner_diameter / 2,
h = top_inner_depth);
for(angle = [0, 90, 180, 270]) {
rotate([0, 0, angle])
translate([arm_radius / 2,
0,
top_height - arm_dia / 2])
rotate([0, 90, 0])
cylinder(r = arm_hole_dia / 2,
h = arm_radius,
center = true);
}
arms([0, 90, 180, 270], arm_radius, top_height - arm_dia / 2, arm_hole_dia);
translate([0, 0, -insert_length])
cylinder(r = insert_hole_dia / 2,

14
utils.scad Normal file
View File

@ -0,0 +1,14 @@
include <constants.scad>;
module arms(angles, radius, height, dia) {
for(angle = angles) {
rotate([0, 0, angle])
translate([radius / 2,
0,
height])
rotate([0, 90, 0])
cylinder(r = dia / 2,
h = radius,
center = true);
}
}