Bad dog Minkowski! scale back!

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Bad dog Minkowski! scale back!

tobject
My Minkowski dog is misbehaving! I said "Sit!" Bad dog!

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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Bad dog Minkowski! scale back!

Ronaldo
Cut his back legs and it will sit.

minkowski() {
    box([$BraceBoxWidthX-2,$BraceBoxWidthY-2,$BraceBoxDepthZ-2]);
    ball(d=2,h=2,$fn=100);
}  

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Bad dog Minkowski! scale back!

nophead
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?  

There is but it is very slow, see https://github.com/nophead/NopSCADlib#Round  

On Thu, 4 Jul 2019 at 14:16, Ronaldo Persiano <[hidden email]> wrote:
Cut his back legs and it will sit.

minkowski() {
    box([$BraceBoxWidthX-2,$BraceBoxWidthY-2,$BraceBoxDepthZ-2]);
    ball(d=2,h=2,$fn=100);
}  
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Bad dog Minkowski! scale back!

adrianv
In reply to this post by tobject
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@.openscad

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





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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Bad dog Minkowski! scale back!

alexgibson
In reply to this post by tobject
You might enjoy the attached modules where I had the same problems....  If
you do, please feel free to use under the Creative Commons Attribution
licence - cite our work and let us know if you build upon it please!

Cheers,

Alex Gibson

+44 7813 810 765    @alexgibson3d    37 Royal Avenue, Reading RG31 4UR

admg consulting

edumaker limited

. Project management
. Operations & Process improvement
. 3D Printing

-----Original Message-----
From: Discuss [mailto:[hidden email]] On Behalf Of GZ
Sent: 04 July 2019 14:05
To: [hidden email]
Subject: [OpenSCAD] Bad dog Minkowski! scale back!

My Minkowski dog is misbehaving! I said "Sit!" Bad dog!

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
[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

admg_minkowski_module2.scad (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bad dog Minkowski! scale back!

alexgibson
Can you tell I hastily tacked on the licensing bit?

Try this version of the modules file instead...

Alex Gibson

+44 7813 810 765    @alexgibson3d    37 Royal Avenue, Reading RG31 4UR

admg consulting

edumaker limited

. Project management
. Operations & Process improvement
. 3D Printing


-----Original Message-----
From: Discuss [mailto:[hidden email]] On Behalf Of Alex
Gibson
Sent: 04 July 2019 18:33
To: 'OpenSCAD general discussion'
Subject: Re: [OpenSCAD] Bad dog Minkowski! scale back!

You might enjoy the attached modules where I had the same problems....  If
you do, please feel free to use under the Creative Commons Attribution
licence - cite our work and let us know if you build upon it please!

Cheers,

Alex Gibson

+44 7813 810 765    @alexgibson3d    37 Royal Avenue, Reading RG31 4UR

admg consulting

edumaker limited

. Project management
. Operations & Process improvement
. 3D Printing

-----Original Message-----
From: Discuss [mailto:[hidden email]] On Behalf Of GZ
Sent: 04 July 2019 14:05
To: [hidden email]
Subject: [OpenSCAD] Bad dog Minkowski! scale back!

My Minkowski dog is misbehaving! I said "Sit!" Bad dog!

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
[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

admg_minkowski_module2.scad (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bad dog Minkowski! scale back!

terramir
I dun have the box and ball modules but the easiest way of doing this
is is adding a fudge factor and putting the same number as the sphere
diameter.

fud=2;
translate([fud/2,fud/2,fud/2])
  minkowski() {

     cube([$BraceBoxWidthX-fud,$BraceBoxWidthY-fud,$BraceBoxDepthZ-fud]);
     sphere(d=2,$fn=100);
 }
terramir

All written content of this e-mail is confidential and only intended for
the named recipient. This message is subject to copyright and is
intellectual property of the sender. All rights reserved (c) 2018


On Thu, Jul 4, 2019 at 11:05 AM Alex Gibson <[hidden email]> wrote:

>
> Can you tell I hastily tacked on the licensing bit?
>
> Try this version of the modules file instead...
>
> Alex Gibson
>
> +44 7813 810 765    @alexgibson3d    37 Royal Avenue, Reading RG31 4UR
>
> admg consulting
>
> edumaker limited
>
> . Project management
> . Operations & Process improvement
> . 3D Printing
>
>
> -----Original Message-----
> From: Discuss [mailto:[hidden email]] On Behalf Of Alex
> Gibson
> Sent: 04 July 2019 18:33
> To: 'OpenSCAD general discussion'
> Subject: Re: [OpenSCAD] Bad dog Minkowski! scale back!
>
> You might enjoy the attached modules where I had the same problems....  If
> you do, please feel free to use under the Creative Commons Attribution
> licence - cite our work and let us know if you build upon it please!
>
> Cheers,
>
> Alex Gibson
>
> +44 7813 810 765    @alexgibson3d    37 Royal Avenue, Reading RG31 4UR
>
> admg consulting
>
> edumaker limited
>
> . Project management
> . Operations & Process improvement
> . 3D Printing
>
> -----Original Message-----
> From: Discuss [mailto:[hidden email]] On Behalf Of GZ
> Sent: 04 July 2019 14:05
> To: [hidden email]
> Subject: [OpenSCAD] Bad dog Minkowski! scale back!
>
> My Minkowski dog is misbehaving! I said "Sit!" Bad dog!
>
> 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
> [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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org