Can Sleeve: Rundungen & Parameter
This commit is contained in:
parent
03d0978743
commit
ce42c5177c
|
@ -1,39 +1,85 @@
|
||||||
$fa = $preview ? 12 : 1;
|
// Can height
|
||||||
$fs = $preview ? 1 : 0.2;
|
can_height = 168;// [115:330mL,168:500mL,135:Energy Drink,180:Energy Drink L,146:Soda Sleek]
|
||||||
|
// Can width
|
||||||
|
can_dia = 67;// [67:330mL,67:500mL,53:Energy Drink,63:Energy Drink L,58:Soda Sleek]
|
||||||
|
|
||||||
height=168;
|
// Lip height
|
||||||
diameter=67;
|
lip = 15;
|
||||||
thickness=2.5;
|
// Total wall thickness
|
||||||
|
thickness = 2.5;
|
||||||
|
// Inner/Outer Wall thickness
|
||||||
|
wall = 0.8;//[0.1:0.1:2.4]
|
||||||
|
// Interior ribs
|
||||||
|
ribs = 7;// [1:1:9]
|
||||||
|
|
||||||
intersection(){
|
include <../lib/defaults.scad>;
|
||||||
union(){
|
|
||||||
difference(){
|
// For the Preview Crosssection
|
||||||
cylinder(h=(height+thickness-15),r=diameter/2+thickness,center=true);
|
intersection() {
|
||||||
translate([0,0,thickness/2+.1])
|
// To remove unnecessary edges
|
||||||
cylinder(h=(height-15+.1),r=diameter/2,center=true);
|
union() {
|
||||||
translate([0,0,.6])
|
// Primary Cylinder, inner & outer wall
|
||||||
difference(){
|
translate([0,0,thickness/2])
|
||||||
cylinder(h=(height-15-1.2),r=diameter/2+thickness-.6,center=true);
|
union(){
|
||||||
cylinder(h=(height-15-1.0),r=diameter/2+.6,center=true);
|
difference() {
|
||||||
|
cylinder(h = can_height-lip-2*thickness, r = can_dia / 2 + thickness, center = true);
|
||||||
|
cylinder(h = can_height-lip-2*thickness + .1, r = can_dia / 2+thickness-wall, center = true);
|
||||||
|
}
|
||||||
|
difference() {
|
||||||
|
cylinder(h = can_height-lip-2*thickness, r = can_dia / 2 +wall, center = true);
|
||||||
|
cylinder(h = can_height-lip-2*thickness + .1, r = can_dia / 2, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Rounded lip
|
||||||
for(i=[-4:1:4]){
|
translate([0,0,(can_height-lip-thickness)/2])
|
||||||
translate([0,0,i*15])
|
rotate_extrude()
|
||||||
|
translate([(can_dia+thickness)/2,0,0])
|
||||||
|
intersection() {
|
||||||
|
circle(thickness/2);
|
||||||
|
translate([-(thickness+1)/2,0,0])
|
||||||
|
square(thickness+1);
|
||||||
|
}
|
||||||
|
// Bottom
|
||||||
|
translate([0,0,-(can_height-lip-3*thickness)/2])
|
||||||
|
rotate_extrude()
|
||||||
|
translate([can_dia/2,0,0])
|
||||||
|
intersection(){
|
||||||
union(){
|
union(){
|
||||||
difference(){
|
difference(){
|
||||||
cylinder(h=2, r=diameter/2+thickness,center=true);
|
circle(thickness);
|
||||||
cylinder(h=2.1, r=diameter/2, center=true);
|
circle(thickness-wall);
|
||||||
|
}
|
||||||
|
circle(wall);
|
||||||
|
rotate([0,0,45])
|
||||||
|
square([thickness-2*wall,thickness*2-wall],center=true);
|
||||||
|
}
|
||||||
|
translate([0,-thickness,0])
|
||||||
|
square(thickness);
|
||||||
|
}
|
||||||
|
|
||||||
|
translate([0,0,-(can_height-lip-2*thickness)/2])
|
||||||
|
cylinder(h=thickness, r=can_dia/2, center=true);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Ribs for structural strengt & grip
|
||||||
|
for(i = [-((ribs - 1) / 2):((ribs - 1) / 2)]) {
|
||||||
|
translate([0, 0, i * (can_height-lip) / (ribs + 1)])
|
||||||
|
union() {
|
||||||
|
difference() {
|
||||||
|
cylinder(h = 2, r = can_dia / 2 + thickness, center = true);
|
||||||
|
cylinder(h = 2.1, r = can_dia / 2, center = true);
|
||||||
}
|
}
|
||||||
rotate_extrude()
|
rotate_extrude()
|
||||||
translate([diameter/2,0,0])
|
translate([can_dia / 2, 0, 0])
|
||||||
scale([.5,1,1])
|
scale([.5, 1, 1])
|
||||||
circle(r=1);
|
circle(r = 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($preview){
|
if ($preview) {
|
||||||
translate([0,20,0])
|
translate([0, 5+can_dia/4, 0])
|
||||||
cube([80,40,200], center=true);
|
cube([can_dia+10, 10+can_dia/2, can_height+10], center = true);
|
||||||
}
|
translate([0,0,(thickness+lip)/2])
|
||||||
|
%cylinder(h=can_height,d=can_dia,center=true);
|
||||||
|
}
|
||||||
}
|
}
|
5
lib/defaults.scad
Normal file
5
lib/defaults.scad
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
nozzle = !is_undef(nozzle) ? nozzle : 0.4;
|
||||||
|
layer = !is_undef(layer) ? layer : 0.2;
|
||||||
|
|
||||||
|
$fa = $preview ? 10 : 0.1;
|
||||||
|
$fs = $preview ? 1 : min(layer, nozzle/2);
|
Loading…
Reference in a new issue