# How can I make a phase on a cube just on on side Classic List Threaded 6 messages Open this post in threaded view
|

## How can I make a phase on a cube just on on side

 Hello How can I make a phase on a cube just on on side ? minkowski() is a powerful function but with no control on witch border you like to have a phase. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: How can I make a phase on a cube just on on side

 You can't use minkowski()  this way.  By definition, it is impossible to get an accurate "cube" with only one side rounded. I normally use hull() to get a rounded "cubish" thing.  See the code and example below. ---------------------- // Cube with rounded face dim = [100, 50, 40]; corner_r = 10; grain = 1; // Top edges and corners rounded, but spills onto the sides hull() {         // Define lower side of cube         translate ([0, 0, 0]) cube (grain);         translate ([dim.x - grain, 0, 0]) cube (grain);         translate ([dim.x - grain, dim.y-grain, 0]) cube (grain);         translate ([0, dim.y-grain, 0]) cube (grain);         // Rounded face         translate ([0+corner_r, 0+corner_r, dim.z-corner_r]) sphere (r=corner_r);         translate ([dim.x-corner_r, 0+corner_r, dim.z-corner_r]) sphere (r=corner_r);         translate ([dim.x-corner_r, dim.y-corner_r, dim.z-corner_r]) sphere (r=corner_r);         translate ([0+corner_r, dim.y-corner_r, dim.z-corner_r]) sphere (r=corner_r); } // Create a rounded cube, but a flat bottom translate ([-dim.x-10, 0, 0]) {         hull()         {                 // Define lower side of cube                 linear_extrude(1)                 {                                                 translate ([0+corner_r, 0+corner_r, 0]) circle (r=corner_r);                         translate ([dim.x-corner_r, 0+corner_r, 0]) circle (r=corner_r);                         translate ([dim.x-corner_r, dim.y-corner_r, 0]) circle (r=corner_r);                         translate ([0+corner_r, dim.y-corner_r, 0]) circle (r=corner_r);                 }                 // Rounded top face                 translate ([0+corner_r, 0+corner_r, dim.z-corner_r]) sphere (r=corner_r);                 translate ([dim.x-corner_r, 0+corner_r, dim.z-corner_r]) sphere (r=corner_r);                 translate ([dim.x-corner_r, dim.y-corner_r, dim.z-corner_r]) sphere (r=corner_r);                 translate ([0+corner_r, dim.y-corner_r, dim.z-corner_r]) sphere (r=corner_r);         } } ------------------ -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: How can I make a phase on a cube just on on side

 Thank you very much I don't understand in the Moment how that works but I try !!! -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: How can I make a phase on a cube just on on side

 Hull works by wrapping smaller shapes as if with plastic wrap for food. For a cube, this means putting eight shapes (One for each corner). > On May 3, 2019, at 8:08 AM, ats3788 <[hidden email]> wrote: > > Thank you very much > I don't understand in the Moment how that works but I try !!! > > > > -- > Sent from: http://forum.openscad.org/> > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org