Close



Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,818
    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.

  2. #12
    Technician DrUsual's Avatar
    Join Date
    Nov 2014
    Location
    Republic of Texas
    Posts
    69
    Quote Originally Posted by curious aardvark View Post
    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.
    That's exactly what I'm looking for, I'll try Openscad tonight. Thanks!

  3. #13
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,818
    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

    Just copy and paste into openscad.


    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

    And to make corresponding lid:
    //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

    Just change variables to change size of box and lid.

    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.

  4. #14
    Technician DrUsual's Avatar
    Join Date
    Nov 2014
    Location
    Republic of Texas
    Posts
    69
    Quote Originally Posted by curious aardvark View Post
    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.
    This is incredibly helpful; I always find I learn stuff more quickly with a good example to work from. Thanks!

  5. #15
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,818
    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]);
    }}}
    The hull command makes what look like tricky shapes real easy.
    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.

  6. #16
    Technician DrUsual's Avatar
    Join Date
    Nov 2014
    Location
    Republic of Texas
    Posts
    69
    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...

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •