Close



Results 1 to 5 of 5

Threaded View

  1. #3
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,816
    right I'll do this without hull so you can see how it works.

    //pressure fit non cylindrical box




    //forming a cube that is narrower at the top than the bottom.
    cube([50,50,2]); //base plate


    translate([10,10,20]) cube([30,30,1]); //add shape

    That produces:


    Usually I make the lines or shapes all a least 0.1mm in thickness as - but gave these a bit of height so you can see them :-)
    However that produces a 1 mm ledge. For a sharp edge just use a really small height. For some model railway wheels I think I used 0.001 thickness.
    So we start with a base cube and create another one centred and above.

    We then hull them:
    //pressure fit non cylindrical box



    //forming a cube that is narrower at the top than the bottom.


    hull() {
    cube([50,50,2]); //base plate


    translate([10,10,20]) cube([30,30,1]); //add shape
    } //end of hull
    And get this:



    Once you've got the shape you can resize and difference or just make a smaller version and difference.
    Basically once you've got the hang of of hull you can make pretty much irregular shape you like :-)

    I've used quite big differences to easily illustrate the function. But obviously you can make the slope as large or small as you like.
    And use as many or as few shapes as you like to create the hull.

    Want to make a wedge ?
    Just hull a tall thin block and a long short block:
    hull() { cube([0.1,20,30]);
    cube([100,20,0.1]);
    }
    without hull:


    With hull:


    So making push fit 'square' boxes is just as easy as cylindrical boxes just use a hulled shape :-)
    Attached Images Attached Images

Tags for this Thread

Posting Permissions

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