diff options
author | Robert "ar" Gerus <ar@bash.org.pl> | 2013-06-07 23:05:12 +0200 |
---|---|---|
committer | Robert "ar" Gerus <ar@bash.org.pl> | 2013-06-07 23:05:12 +0200 |
commit | 878ba66893499238c185b21019c48b52311b3f7a (patch) | |
tree | 57a11e554ea80b22bfca96fcd3f99a1b72979626 | |
parent | ea7650f161fd74e002e5bcc1f0c1e2584ddde3a5 (diff) | |
download | 3dparts-878ba66893499238c185b21019c48b52311b3f7a.tar.gz 3dparts-878ba66893499238c185b21019c48b52311b3f7a.tar.bz2 3dparts-878ba66893499238c185b21019c48b52311b3f7a.tar.xz 3dparts-878ba66893499238c185b21019c48b52311b3f7a.zip |
Ice shot glass form, two-part.
-rw-r--r-- | ice_glass_forms/glass.scad | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/ice_glass_forms/glass.scad b/ice_glass_forms/glass.scad new file mode 100644 index 0000000..51e040c --- /dev/null +++ b/ice_glass_forms/glass.scad @@ -0,0 +1,136 @@ +$fn = 500; + +module cup_shape(height, b_rad, t_rad) { + cylinder(height, b_rad, t_rad, 0); +} + +module cup(height, b_rad, t_rad) { + difference() { + cup_shape(height, b_rad, t_rad); + translate([0,0,height - 0.85 * height + 0.03]) + scale([0.85,0.85,0.85]) + cup_shape(height, b_rad, t_rad); + } +} + +module holding_cut_in(height, t_rad) { + translate([t_rad + 5, -(t_rad), height -5]) + cube([10 ,t_rad * 2,10]); +} + +module holding_cut_ins(height, t_rad) { + for (i = [0:90:360]) { + rotate([0,0,i]) + holding_cut_in(height, t_rad); + } +} + +module outer_cup_form(height, b_rad, t_rad) { + difference() { + cylinder(height + 10, t_rad + 10, t_rad + 10); + translate([0,0,10.1]) + cup_shape(height, b_rad, t_rad); + holding_cut_ins(height, t_rad); + } +} + +module ice_form_barrier(height, b_rad, t_rad) { + difference() { + cup_shape(height * 0.85, b_rad * 0.85, t_rad * 0.85); + translate([-t_rad,5,-1]) + cube(height+t_rad); + rotate([0,0,180]) + translate([-t_rad,5,-1]) + cube(height+t_rad); + } +} + +module ice_form_barriers(height, b_rad, t_rad) { + ice_form_barrier(height, b_rad, t_rad); + rotate([0,0,90]) + ice_form_barrier(height, b_rad, t_rad); +} + +module inner_cup_form_holder_outer_ring(t_rad) { + difference() { + cylinder(10, t_rad * 0.85, t_rad *0.85, 0); + translate([0,0,-0.5]) + cylinder(11, (t_rad * 0.85)*0.85, (t_rad *0.85)*0.85, 0); + } +} + +module inner_cup_form_holder_cross_arm(t_rad) { + translate([-5,0,0]) + cube([10,(t_rad*0.85),10]); +} + +module inner_cup_form_holder_cross(t_rad) { + for (i = [0:90:360]) { + rotate([0,0,i]) + inner_cup_form_holder_cross_arm(t_rad); + } +} + +module inner_cup_form_holder_arm_hook(t_rad) { + cube([10,10,24]); + translate([0,-5,16]) + cube([10,5,8]); +} + +module inner_cup_form_holder_arm(t_rad) { + translate([-5,0,2]) { + cube([10,t_rad + 10 + 2, 8]); + translate([10,t_rad + 10 + 2,8]) + rotate([0,180,0]) + inner_cup_form_holder_arm_hook(t_rad); + } +} + +module inner_cup_form_holder_arms(t_rad) { + for (i = [0:180:360]) { + rotate([0,0,i]) + inner_cup_form_holder_arm(t_rad); + } +} + +module inner_cup_form_holder(height, b_rad, t_rad) { + inner_cup_form_holder_outer_ring(t_rad); + inner_cup_form_holder_cross(t_rad); + inner_cup_form_holder_arms(t_rad); +} + +module inner_cup_form_main(height, b_rad, t_rad) { + difference() { + cup_shape(height * 0.85, b_rad * 0.85, t_rad * 0.85); + translate([0,0,height - 0.85 * height + 0.03]) + scale([0.85,0.85,0.85]) + cup_shape(height, 10, t_rad); + } +} + +module inner_cup_form(height, b_rad, t_rad) { + inner_cup_form_main(height, b_rad, t_rad); + ice_form_barriers(height, b_rad, t_rad); + translate([0,0,height * 0.85]) + inner_cup_form_holder(height, b_rad, t_rad); +} + +module example() { + color("red") + outer_cup_form(70, 30, 40); + + color("green") + translate([0,0,10 + 70 - 70*0.85]) + inner_cup_form(70, 30, 40); +} + +module print(height, b_rad, t_rad) { + outer_cup_form(height, b_rad, t_rad); + translate([(t_rad + 10)*2,0,height]) + rotate([0,180,0]) + inner_cup_form(height, b_rad, t_rad); +} + +print(70, 30, 40); + + |