Moved arms module to external file
This commit is contained in:
parent
99a85fe92d
commit
a1700efbde
26
bottom.scad
26
bottom.scad
|
@ -1,22 +1,8 @@
|
||||||
include <constants.scad>;
|
include <constants.scad>;
|
||||||
|
use<utils.scad>
|
||||||
$fn = 90;
|
$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() {
|
difference() {
|
||||||
union() {
|
union() {
|
||||||
cylinder(r = bottom_outer_diameter / 2, h = bottom_height);
|
cylinder(r = bottom_outer_diameter / 2, h = bottom_height);
|
||||||
|
@ -25,8 +11,8 @@ difference() {
|
||||||
cylinder(r = insert_diameter/2,
|
cylinder(r = insert_diameter/2,
|
||||||
h = insert_length);
|
h = insert_length);
|
||||||
|
|
||||||
arms([0, 180], arm_dia/2, arm_dia);
|
arms([0, 180], arm_radius, arm_dia/2, arm_dia);
|
||||||
arms([90,270], bottom_short_loop_arms_height, arm_dia);
|
arms([90,270], arm_radius, bottom_short_loop_arms_height, arm_dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
union() {
|
union() {
|
||||||
|
@ -35,8 +21,8 @@ difference() {
|
||||||
cylinder(r = insert_hole_dia / 2,
|
cylinder(r = insert_hole_dia / 2,
|
||||||
h = insert_length + bottom_height);
|
h = insert_length + bottom_height);
|
||||||
|
|
||||||
arms([0, 180], arm_dia/2, arm_hole_dia);
|
arms([0, 180], arm_radius, arm_dia / 2, arm_hole_dia);
|
||||||
arms([90,270], bottom_short_loop_arms_height, arm_hole_dia);
|
arms([90,270], arm_radius, bottom_short_loop_arms_height, arm_hole_dia);
|
||||||
arms([0,180], bottom_short_loop_arms_height, bottom_work_hole_dia);
|
arms([0,180], bottom_outer_diameter / 2, bottom_short_loop_arms_height, bottom_work_hole_dia);
|
||||||
}
|
}
|
||||||
}
|
}
|
5160
lengths.dxf
5160
lengths.dxf
File diff suppressed because it is too large
Load Diff
32
top.scad
32
top.scad
|
@ -1,47 +1,27 @@
|
||||||
include <constants.scad>;
|
include <constants.scad>;
|
||||||
|
use<utils.scad>;
|
||||||
$fn = 90;
|
$fn = 90;
|
||||||
|
|
||||||
module top() {
|
module top() {
|
||||||
difference() {
|
difference() {
|
||||||
|
|
||||||
union() {
|
union() {
|
||||||
cylinder(r = top_outer_diameter/2,
|
cylinder(r = top_outer_diameter / 2,
|
||||||
h = top_height);
|
h = top_height);
|
||||||
|
|
||||||
for(angle = [0, 90, 180, 270]) {
|
arms([0, 90, 180, 270], arm_radius, top_height - arm_dia / 2, arm_dia);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([0, 0, -insert_length])
|
translate([0, 0, -insert_length])
|
||||||
cylinder(r = insert_diameter/2,
|
cylinder(r = insert_diameter / 2,
|
||||||
h = insert_length);
|
h = insert_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
union() {
|
union() {
|
||||||
translate([0, 0, top_height - top_inner_depth])
|
translate([0, 0, top_height - top_inner_depth])
|
||||||
cylinder(r = top_inner_diameter/2,
|
cylinder(r = top_inner_diameter / 2,
|
||||||
h = top_inner_depth);
|
h = top_inner_depth);
|
||||||
|
|
||||||
for(angle = [0, 90, 180, 270]) {
|
arms([0, 90, 180, 270], arm_radius, top_height - arm_dia / 2, arm_hole_dia);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([0, 0, -insert_length])
|
translate([0, 0, -insert_length])
|
||||||
cylinder(r = insert_hole_dia / 2,
|
cylinder(r = insert_hole_dia / 2,
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue