[OpenSCAD] Bad dog Minkowski! scale back!

adrianv avm4 at cornell.edu
Thu Jul 4 10:02:52 EDT 2019


I'm not sure what you were expecting:  minkowski() performs a certain
mathematical operation, which by it's very nature can only make things grow
larger.    

For your application you could just make the cube smaller, as already
suggested.  I have done entire designs undersized by r and then added
minkowski at the end with a radius r ball to do the final rounding.  This
may be the best way to use minkowski for rounding in situations where it
works.  

You can make a rounded cube in a variety of different ways.  For example,
convex hull of 8 spheres.  

But if you had some larger aims and really wanted to use minkowski to round
something complex it can, in theory, be done.  You need to be very patient. 
(And when I tried it OpenSCAD crashed.)  But the method below works by
making a huge cube, subtracting your model from it, and running minkowski on
that to shrink your model.  You can then expand it using minkowski() and it
ends up at the starting size.   If you want inside and outside rounding it
requires 3 calls to minkowski (though the snippet example uses 4).  If you
want just outside rounding "only" two calls to minkowski() are needed.  

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Tips_and_Tricks#Filleting_objects
https://github.com/Irev-Dev/Round-Anything


tobject wrote
> Why there's no parameter to scale back to original size?
> I want to do round corners for my box but to keep the size the same as
> original.
> Is there an elegant way to do it?
> 
>  minkowski() {
> 
>     box([$BraceBoxWidthX,$BraceBoxWidthY,$BraceBoxDepthZ]);
>     ball(d=2,h=2,$fn=100);
> }
> 
> _______________________________________________
> OpenSCAD mailing list

> Discuss at .openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list