Results 11 to 16 of 16
-
11-25-2014, 02:52 PM #11
try it in openscad - made for boxes.
Also makes it easy to slope the inside of the lid, so it starts out easy to fit then get's tight as you push down.
-
11-25-2014, 03:22 PM #12
-
11-25-2014, 04:22 PM #13
well I'll look at your specs again and knock a script up for you.
brb....
right openscad program to generate round boxes with lids attached.
The script contains both lid and box generator. Just remove the '//' from the bit you want.
Generate, f6 to render, export as stl and then. switch to the lid section (add // back in box and delete from lid sections)
and repeat.
Think I've covered all the measurements you might need.
parametric cylinder box with lid.scad
Also here's the script for copying and pasting:
//Parametric Round box with tight fitting lid by Curious Aardvark
$fn=100;
cd=74; //box diameter
tw=3; //thickness of box wall and lid rim
tb=3; //thickness of box base
hb=50; //height of box
hr=10; //height of lid
blt=2; //thickness of lid top
si=1.5; //slope index. difference between the diameter of the lid rim from the bottom to the rim. Adjust slightly untill lid fits tightly enough.
//generates box - remove '//' to make box
//difference() { //remove smaller cylinder to make box
//cylinder(d=cd,h=hb);
//translate([0,0,tb]) cylinder (d=cd-tw,h=hb);
//} //end of remove smaller cylinder to make box
//generates pressure fitting lid - remove or add '//' to make lid
//difference(){ //removes sloping cylinder to make tight fit
//cylinder(d=cd+(2*tw),h=hr);
//translate([0,0,blt]) cylinder(d1=cd-si,d2=cd,h=hr);
//}
//end of lid generation
So to make the box it would look like this:
//Parametric Round box with tight fitting lid by Curious Aardvark
$fn=100;
cd=74; //box diameter
tw=3; //thickness of box wall and lid rim
tb=3; //thickness of box base
hb=50; //height of box
hr=10; //height of lid
blt=2; //thickness of lid top
si=1.5; //slope index. difference between the diameter of the lid rim from the bottom to the rim. Adjust slightly untill lid fits tightly enough.
//generates box - remove '//' to make box
difference() { //remove smaller cylinder to make box
cylinder(d=cd,h=hb);
translate([0,0,tb]) cylinder (d=cd-tw,h=hb);
} //end of remove smaller cylinder to make box
//generates pressure fitting lid - remove or add '//' to make lid
//difference(){ //removes sloping cylinder to make tight fit
//cylinder(d=cd+(2*tw),h=hr);
//translate([0,0,blt]) cylinder(d1=cd-si,d2=cd,h=hr);
//}
//end of lid generation
//Parametric Round box with tight fitting lid by Curious Aardvark
$fn=100;
cd=74; //box diameter
tw=3; //thickness of box wall and lid rim
tb=3; //thickness of box base
hb=50; //height of box
hr=10; //height of lid
blt=2; //thickness of lid top
si=1.5; //slope index. difference between the diameter of the lid rim from the bottom to the rim. Adjust slightly untill lid fits tightly enough.
//generates box - remove '//' to make box
//difference() { //remove smaller cylinder to make box
//cylinder(d=cd,h=hb);
//translate([0,0,tb]) cylinder (d=cd-tw,h=hb);
//} //end of remove smaller cylinder to make box
//generates pressure fitting lid - remove or add '//' to make lid
difference(){ //removes sloping cylinder to make tight fit
cylinder(d=cd+(2*tw),h=hr);
translate([0,0,blt]) cylinder(d1=cd-si,d2=cd,h=hr);
}
//end of lid generation
Oh yeah - for abs you need to make everything 1% larger in the slicing software. For pla - no adjustment is needed.
Any issues or confusion - let me know :-)Last edited by curious aardvark; 11-25-2014 at 05:17 PM.
-
11-25-2014, 10:18 PM #14
-
11-26-2014, 06:12 AM #15
it's a pretty simple script.
The only thing that might need adding is a variable to seperately adjust the thickness of the lid's edge. Also maybe enlarge the lid's minimum size to make it slightly larger than the box diameter.
It does depend on what you're actually printing with. Some filaments shrink, some don't.
I find that pla is actually less brittle and more durable than abs. Which is weird. I think pla has improved massively in the last couple of years and most of the negative things just aren't there any more.
The sweeper handles I make will crack if slightly too large and made of abs. But the pla ones just need more force to get them to click in - and just don't break.
If you need a polygonal box I've written a polygon generating script that's pretty useful.
Haven't got into modules yet - but when i do that'll be the first thing I turn into a module.
//curious aardvarks polygon generator
$fn=100;
//parametric polygon
ns=5; //number of sides
hs=65; //height shape
ds=50; // overall width of shape - measured across the diagonal
hull() {
for (r=[0:ns]){
rotate([0,0,(360/ns)*r]) {
translate([0,0,0]) cube([0.001,0.001,hs]);
translate([0,0,hs]) cube([ds/2,0.001,0.001]);
translate([0,0,0]) cube([ds/2,0.001,0.001]);
}}}
Basically all it does is draw a series of line a 1000th of a mm thick and then wraps a hull round them.
I used it to make a feather plucker that fits on a drill :-)
What i really like about openscad is that the more I use it, the more things I find it will do.
Great learning curve.
-
11-28-2014, 01:14 PM #16
Very cool...have you tackled doing this with irregular shapes at all? Not that I need to jump into something that complicated yet, I'm just eager to learn as much as possible. In fact, I'm about to sit down with OpenSCAD and do that this afternoon...
Resin has changed after...
06-18-2024, 10:34 AM in General 3D Printing Discussion