Does Minkowski work only in 2d?

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

Does Minkowski work only in 2d?

cacb
I am having a look at Minkowski and observe that the documentation isn't
all that clear on this question. The manual mentions this example


$fn=50;
minkowski()
{
  cube([10,10,1]);
  cylinder(r=2,h=1);
}


Which appears to demonstrate Minkowski working on 3d objects. However,
if you try

$fn=50;
minkowski()
{
  translate([0,0,10])cube([10,10,1]);
  cylinder(r=2,h=1);
}

... all you get is the same result translated upwards. The exact same
thing happens if you translate the cylinder instead of the cube, which
means this isn't really working in 3d.

If you try


$fn=50;
minkowski()
{
  translate([0,0,-10]) cube([10,10,1]);
  translate([0,0,10]) cylinder(r=2,h=1);
}

You are back to the original result. The two translations cancel each
other out!

But then, if you try

$fn=50;
minkowski()
{
  translate([0,0,-10]) cube([10,10,1]);
  translate([0,0,10]) cylinder(r=2,h=1);
}

you get something that looks more like an odd 3d hull operation.

Finally, some creative stuff to possibly igure out what is happening:

$fn=50;
minkowski()
{
  cube([10,10,0.000000001]);
  rotate([90,0,0])
  difference() {
    cylinder(r=2,h=1);
    translate([1,0,0])cylinder(r=1.5,h=3,center=true);
  }
}

It looks like the second object is now swept along the edge of the first
object, and the area between is almost like a hull. However, if you
switch the order, the result is the same...


Is there a more detailed description somewhere on how this really works?
Are these examples well defined?


Carsten Arnholm


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

Re: Does Minkowski work only in 2d?

cacb
Sorry, there was a typo

On 07. mars 2016 22:11, Carsten Arnholm wrote:

> But then, if you try
>
> $fn=50;
> minkowski()
> {
>   translate([0,0,-10]) cube([10,10,1]);
>   translate([0,0,10]) cylinder(r=2,h=1);
> }
>
> you get something that looks more like an odd 3d hull operation.
>

It was supposed to be

$fn=50;
minkowski()
{
  rotate([30,0,0]) cube([10,10,1]);
  translate([0,0,10]) cylinder(r=2,h=1);
}


Carsten Arnholm

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

Re: Does Minkowski work only in 2d?

Parkinbot
You can regard minkowski as an inner product. Which "natural" 3D semantics would you expect when translations are inserted?

but try this:

$fn=50;
minkowski()
{
   rotate([45, 45, 0])
  cube([10,10,1]);
  cylinder(r=2,h=1);
}

or this:

$fn=50;
minkowski()
{
   rotate([45, 45, 0])
  cube([10,10,1]);
  scale([2, 1, 1])
 cylinder(r=2,h=1);
}
Reply | Threaded
Open this post in threaded view
|

Re: Does Minkowski work only in 2d?

nophead
It looks like the second object is now swept along the edge of the first object, and the area between is almost like a hull. However, if you switch the order, the result is the same...

A Minkowski sum is commutative so yes if you swap the order you get the same result.

Is there a more detailed description somewhere on how this really works? Are these examples well defined?

Yes it is well defined mathematically, see https://en.wikipedia.org/wiki/Minkowski_addition.

Basically if you think of the origin of one object swept along all the edges of the other object and unioned together that is the result. All your examples do what I expect.

On 7 March 2016 at 23:16, Parkinbot <[hidden email]> wrote:
You can regard minkowski as an inner product. Which "natural" 3D semantics
would you expect when translations are inserted?

but try this:

$fn=50;
minkowski()
{
   rotate([45, 45, 0])
  cube([10,10,1]);
  cylinder(r=2,h=1);
}

or this:

$fn=50;
minkowski()
{
   rotate([45, 45, 0])
  cube([10,10,1]);
  scale([2, 1, 1])
 cylinder(r=2,h=1);
}




--
View this message in context: http://forum.openscad.org/Does-Minkowski-work-only-in-2d-tp16334p16338.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
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: Does Minkowski work only in 2d?

cacb
In reply to this post by Parkinbot
On 2016-03-08 00:16, Parkinbot wrote:
> You can regard minkowski as an inner product. Which "natural" 3D
> semantics
> would you expect when translations are inserted?

What do you mean by inner product in this context? I don't have a lot of
expectations, but rather trying to understand the definition so I can
establish expectations of how this is supposed to work.

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

Re: Does Minkowski work only in 2d?

nophead
The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

In practice you get exactly the same result sweeping the origin of the first object along all the edges of the second object. Again infinite but less so ;-)

If the object is convex than you can place the origin of the first object at all of the vertices of the second object and take the convex hull. This is now finite to compute as it is just a hull of all the vertices of one object added to all the vertices of the other object. This is why you said some of the results look like a hull. They are. And since vector addition is commutative, so is Minkowski. 

To do Minkowski on concave objects you need to decompose them into multiple convex ones, do convex Minkowski on those and then union the results.




On 8 March 2016 at 06:15, <[hidden email]> wrote:
On 2016-03-08 00:16, Parkinbot wrote:
You can regard minkowski as an inner product. Which "natural" 3D semantics
would you expect when translations are inserted?

What do you mean by inner product in this context? I don't have a lot of expectations, but rather trying to understand the definition so I can establish expectations of how this is supposed to work.

_______________________________________________
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
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Does Minkowski work only in 2d?

tp3
Von: "nop head" <[hidden email]>
> If the object is convex than you can place the origin of
> the first object at all of the vertices of the second object
> and take the convex hull. This is now finite to compute as
> it is just a hull of all the vertices of one object added
> to all the vertices of the other object. This is why you
> said some of the results look like a hull. They are. And
> since vector addition is commutative, so is Minkowski. 
>
Yep, that's exactly how it's implemented now. IIRC that
was the optimization Oskar did some time ago.
It uses CGAL to do a convex decomposition and then creates
the convex minkowski meshes and unions those together again.

This is the reason why minkowski now can be very fast if
the convex decomposition produces only a small number of
parts while object like a cube with a sphere cut out are
quite slow as there's a huge performance hit with the final
union operation.

ciao,
  Torsten.

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

Re: Does Minkowski work only in 2d?

doug.moen
In reply to this post by nophead
Nop Head said: The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

It's not just the origin. Every point within the first object is aligned with every point within the second object and the results unioned.

If you combine a cube of size 10 with a sphere of diameter 10, you'll get a rounded cube of size 30.

On Tuesday, 8 March 2016, nop head <[hidden email]> wrote:
The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

In practice you get exactly the same result sweeping the origin of the first object along all the edges of the second object. Again infinite but less so ;-)

If the object is convex than you can place the origin of the first object at all of the vertices of the second object and take the convex hull. This is now finite to compute as it is just a hull of all the vertices of one object added to all the vertices of the other object. This is why you said some of the results look like a hull. They are. And since vector addition is commutative, so is Minkowski. 

To do Minkowski on concave objects you need to decompose them into multiple convex ones, do convex Minkowski on those and then union the results.




On 8 March 2016 at 06:15, <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;arnholm@arnholm.org&#39;);" target="_blank">arnholm@...> wrote:
On 2016-03-08 00:16, Parkinbot wrote:
You can regard minkowski as an inner product. Which "natural" 3D semantics
would you expect when translations are inserted?

What do you mean by inner product in this context? I don't have a lot of expectations, but rather trying to understand the definition so I can establish expectations of how this is supposed to work.

_______________________________________________
OpenSCAD mailing list
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;Discuss@lists.openscad.org&#39;);" target="_blank">Discuss@...
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: Does Minkowski work only in 2d?

nophead
No that is wrong.

minkowski() {
    cube(10, center = true);
    sphere(d =10);
   
}

Gives a rounded  20mm cube.



If you consider each vertex to be a vector then every possible pair of vertices are added and the resulting points are hulled. The vertices are not aligned, they are summed. That is the same as saying the origin of one object is offset by the vertices of the other.

On 8 March 2016 at 12:21, doug moen <[hidden email]> wrote:
Nop Head said: The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

It's not just the origin. Every point within the first object is aligned with every point within the second object and the results unioned.

If you combine a cube of size 10 with a sphere of diameter 10, you'll get a rounded cube of size 30.

On Tuesday, 8 March 2016, nop head <[hidden email]> wrote:
The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

In practice you get exactly the same result sweeping the origin of the first object along all the edges of the second object. Again infinite but less so ;-)

If the object is convex than you can place the origin of the first object at all of the vertices of the second object and take the convex hull. This is now finite to compute as it is just a hull of all the vertices of one object added to all the vertices of the other object. This is why you said some of the results look like a hull. They are. And since vector addition is commutative, so is Minkowski. 

To do Minkowski on concave objects you need to decompose them into multiple convex ones, do convex Minkowski on those and then union the results.




On 8 March 2016 at 06:15, <[hidden email]> wrote:
On 2016-03-08 00:16, Parkinbot wrote:
You can regard minkowski as an inner product. Which "natural" 3D semantics
would you expect when translations are inserted?

What do you mean by inner product in this context? I don't have a lot of expectations, but rather trying to understand the definition so I can establish expectations of how this is supposed to work.

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Does Minkowski work only in 2d?

nophead
This produces exactly the same result as it is what OpenScad does internally for convex shapes.

hull()
    for(x =[-5, 5], y = [-5, 5], z = [-5, 5])
        translate([x, y, z])
            sphere(d = 10);


On 8 March 2016 at 12:47, nop head <[hidden email]> wrote:
No that is wrong.

minkowski() {
    cube(10, center = true);
    sphere(d =10);
   
}

Gives a rounded  20mm cube.



If you consider each vertex to be a vector then every possible pair of vertices are added and the resulting points are hulled. The vertices are not aligned, they are summed. That is the same as saying the origin of one object is offset by the vertices of the other.

On 8 March 2016 at 12:21, doug moen <[hidden email]> wrote:
Nop Head said: The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

It's not just the origin. Every point within the first object is aligned with every point within the second object and the results unioned.

If you combine a cube of size 10 with a sphere of diameter 10, you'll get a rounded cube of size 30.

On Tuesday, 8 March 2016, nop head <[hidden email]> wrote:
The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

In practice you get exactly the same result sweeping the origin of the first object along all the edges of the second object. Again infinite but less so ;-)

If the object is convex than you can place the origin of the first object at all of the vertices of the second object and take the convex hull. This is now finite to compute as it is just a hull of all the vertices of one object added to all the vertices of the other object. This is why you said some of the results look like a hull. They are. And since vector addition is commutative, so is Minkowski. 

To do Minkowski on concave objects you need to decompose them into multiple convex ones, do convex Minkowski on those and then union the results.




On 8 March 2016 at 06:15, <[hidden email]> wrote:
On 2016-03-08 00:16, Parkinbot wrote:
You can regard minkowski as an inner product. Which "natural" 3D semantics
would you expect when translations are inserted?

What do you mean by inner product in this context? I don't have a lot of expectations, but rather trying to understand the definition so I can establish expectations of how this is supposed to work.

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Does Minkowski work only in 2d?

doug.moen
In reply to this post by nophead
Thank you for correcting me, Nop Head. I've been confused about this for a while.

On 8 March 2016 at 07:47, nop head <[hidden email]> wrote:
No that is wrong.

minkowski() {
    cube(10, center = true);
    sphere(d =10);
   
}

Gives a rounded  20mm cube.



If you consider each vertex to be a vector then every possible pair of vertices are added and the resulting points are hulled. The vertices are not aligned, they are summed. That is the same as saying the origin of one object is offset by the vertices of the other.

On 8 March 2016 at 12:21, doug moen <[hidden email]> wrote:
Nop Head said: The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

It's not just the origin. Every point within the first object is aligned with every point within the second object and the results unioned.

If you combine a cube of size 10 with a sphere of diameter 10, you'll get a rounded cube of size 30.

On Tuesday, 8 March 2016, nop head <[hidden email]> wrote:
The definition in simple terms is that the origin of the first object is placed at every point inside the second object and the results unioned. Of course that would be an infinite number unless the object was divided into voxels.

In practice you get exactly the same result sweeping the origin of the first object along all the edges of the second object. Again infinite but less so ;-)

If the object is convex than you can place the origin of the first object at all of the vertices of the second object and take the convex hull. This is now finite to compute as it is just a hull of all the vertices of one object added to all the vertices of the other object. This is why you said some of the results look like a hull. They are. And since vector addition is commutative, so is Minkowski. 

To do Minkowski on concave objects you need to decompose them into multiple convex ones, do convex Minkowski on those and then union the results.




On 8 March 2016 at 06:15, <[hidden email]> wrote:
On 2016-03-08 00:16, Parkinbot wrote:
You can regard minkowski as an inner product. Which "natural" 3D semantics
would you expect when translations are inserted?

What do you mean by inner product in this context? I don't have a lot of expectations, but rather trying to understand the definition so I can establish expectations of how this is supposed to work.

_______________________________________________
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



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

Re: Does Minkowski work only in 2d?

cacb
On 08. mars 2016 14:58, doug moen wrote:
> I've been confused about this for a while.

The discussion is kind of interesting, but my overall impression is that
minkowski is rarely useful in practice as it can be difficult for an end
user to predict/understand what it does and where the result will end up
in relation to other parts.

Carsten Arnholm


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

Re: Does Minkowski work only in 2d?

doug.moen
Minkowski with a centred sphere is a useful operation that inflates an object like a balloon, producing rounded corners. If the sphere has radius r, then the new inflated object boundary will be exactly r units away from the original boundary at all points.

That's the only practical application of minkowski that I know, but it's a pretty good application, and not difficult to understand on its own.

On 8 March 2016 at 17:48, Carsten Arnholm <[hidden email]> wrote:
On 08. mars 2016 14:58, doug moen wrote:
I've been confused about this for a while.

The discussion is kind of interesting, but my overall impression is that minkowski is rarely useful in practice as it can be difficult for an end user to predict/understand what it does and where the result will end up in relation to other parts.

Carsten Arnholm



_______________________________________________
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: Does Minkowski work only in 2d?

clothbot
Things get more interesting when you think of it in terms of “shape-directed growth”.  Combine a few minkowski() with difference() and/or intersection() operators and you get things like this:



…or for something really fancy (caveat: the default “rotated cube” example takes a while to render):


Andrew

On Mar 8, 2016, at 6:35 PM, doug moen <[hidden email]> wrote:

Minkowski with a centred sphere is a useful operation that inflates an object like a balloon, producing rounded corners. If the sphere has radius r, then the new inflated object boundary will be exactly r units away from the original boundary at all points.

That's the only practical application of minkowski that I know, but it's a pretty good application, and not difficult to understand on its own.

On 8 March 2016 at 17:48, Carsten Arnholm <[hidden email]> wrote:
On 08. mars 2016 14:58, doug moen wrote:
I've been confused about this for a while.

The discussion is kind of interesting, but my overall impression is that minkowski is rarely useful in practice as it can be difficult for an end user to predict/understand what it does and where the result will end up in relation to other parts.

Carsten Arnholm



_______________________________________________
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

--

"The future is already here.  It's just not very evenly distributed" -- William Gibson

Me: http://clothbot.com/wiki/




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

Re: Does Minkowski work only in 2d?

nophead
In reply to this post by doug.moen
Sometimes I have used an inverted truncated teardrop instead of a sphere so I get a rounded object but the bottom is still printable without support.

Other times I have use part of a sphere to round the front of an object but leave the back flat.

I don't have any problem understanding what it will do or where the results end up. As I said before it simply sweeps the origin of one object through all the edges of the other. If each object has an offset from the origin then the result will have the sum of those offsets from the origin. All the vertices of the result are a vector sum of two vertices one from each of the original objects.

On 8 March 2016 at 23:35, doug moen <[hidden email]> wrote:
Minkowski with a centred sphere is a useful operation that inflates an object like a balloon, producing rounded corners. If the sphere has radius r, then the new inflated object boundary will be exactly r units away from the original boundary at all points.

That's the only practical application of minkowski that I know, but it's a pretty good application, and not difficult to understand on its own.

On 8 March 2016 at 17:48, Carsten Arnholm <[hidden email]> wrote:
On 08. mars 2016 14:58, doug moen wrote:
I've been confused about this for a while.

The discussion is kind of interesting, but my overall impression is that minkowski is rarely useful in practice as it can be difficult for an end user to predict/understand what it does and where the result will end up in relation to other parts.

Carsten Arnholm



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Does Minkowski work only in 2d?

Neon22
In reply to this post by cacb
I find minkowski generally useful but leads to lazy thinking. Its convenient to use a cylider 0.1 high and minkowski - when in fact I should be using offset etc.

So I think a lot of people use it instead of doing it a simpler way which requires more thinking about what they want to achieve. The length of time it takes to process is the balancing factor, as this forces you to reconsider your choices when its taking ages to build :)

I may be incorrect but I think having the minkowski is one of the only reasons (and hull) we still use nef_polyhedron and the CGAL. I mean the difficulty in coding a replacement in a faster library...
However - its hard to give up the minkowski... its seductive....

and the hull is fantastically useful of course.
Reply | Threaded
Open this post in threaded view
|

Re: Does Minkowski work only in 2d?

nophead
Hull is relatively easy to implement and so is convex Minkowski. Concave Minkowski needs convex decomposition and union. I haven't looked how hard decomposition is. I know union is more difficult than hull but any CSG library will have it.

On 8 March 2016 at 23:59, Neon22 <[hidden email]> wrote:
I find minkowski generally useful but leads to lazy thinking. Its convenient
to use a cylider 0.1 high and minkowski - when in fact I should be using
offset etc.

So I think a lot of people use it instead of doing it a simpler way which
requires more thinking about what they want to achieve. The length of time
it takes to process is the balancing factor, as this forces you to
reconsider your choices when its taking ages to build :)

I may be incorrect but I think having the minkowski is one of the only
reasons (and hull) we still use nef_polyhedron and the CGAL. I mean the
difficulty in coding a replacement in a faster library...
However - its hard to give up the minkowski... its seductive....

and the hull is fantastically useful of course.



--
View this message in context: http://forum.openscad.org/Does-Minkowski-work-only-in-2d-tp16334p16359.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
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: Does Minkowski work only in 2d?

clothbot


On Mar 8, 2016, at 7:09 PM, nop head <[hidden email]> wrote:

Hull is relatively easy to implement and so is convex Minkowski. Concave Minkowski needs convex decomposition and union. I haven't looked how hard decomposition is. I know union is more difficult than hull but any CSG library will have it.

On 8 March 2016 at 23:59, Neon22 <[hidden email]> wrote:
I find minkowski generally useful but leads to lazy thinking. Its convenient
to use a cylider 0.1 high and minkowski - when in fact I should be using
offset etc.

So I think a lot of people use it instead of doing it a simpler way which
requires more thinking about what they want to achieve. The length of time
it takes to process is the balancing factor, as this forces you to
reconsider your choices when its taking ages to build :)

I may be incorrect but I think having the minkowski is one of the only
reasons (and hull) we still use nef_polyhedron and the CGAL. I mean the
difficulty in coding a replacement in a faster library...
However - its hard to give up the minkowski... its seductive....

and the hull is fantastically useful of course.



--
View this message in context: http://forum.openscad.org/Does-Minkowski-work-only-in-2d-tp16334p16359.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
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

--

"The future is already here.  It's just not very evenly distributed" -- William Gibson

Me: http://clothbot.com/wiki/




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

Re: Does Minkowski work only in 2d?

doug.moen
In reply to this post by Neon22
@Neon22 "I think having the minkowski is one of the only reasons (and hull) we still use nef_polyhedron and the CGAL."

CGAL is more accurate and robust than any other CSG package, at the expense of being slow. So it's a tradeoff, and what we probably should do is give users a configuration choice between CGAL and another package. That way, if your model blows up using fast CSG, then you can switch to CGAL and get your work done.

On 8 March 2016 at 18:59, Neon22 <[hidden email]> wrote:
I find minkowski generally useful but leads to lazy thinking. Its convenient
to use a cylider 0.1 high and minkowski - when in fact I should be using
offset etc.

So I think a lot of people use it instead of doing it a simpler way which
requires more thinking about what they want to achieve. The length of time
it takes to process is the balancing factor, as this forces you to
reconsider your choices when its taking ages to build :)

I may be incorrect but I think having the minkowski is one of the only
reasons (and hull) we still use nef_polyhedron and the CGAL. I mean the
difficulty in coding a replacement in a faster library...
However - its hard to give up the minkowski... its seductive....

and the hull is fantastically useful of course.



--
View this message in context: http://forum.openscad.org/Does-Minkowski-work-only-in-2d-tp16334p16359.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
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: Does Minkowski work only in 2d?

Alan Cox
In reply to this post by doug.moen
On Tue, 8 Mar 2016 18:35:29 -0500
doug moen <[hidden email]> wrote:

> Minkowski with a centred sphere is a useful operation that inflates an
> object like a balloon, producing rounded corners. If the sphere has radius
> r, then the new inflated object boundary will be exactly r units away from
> the original boundary at all points.

It's usually easier to use cylinders and spheres and hull() in my
experience - and a ton faster.
>
> That's the only practical application of minkowski that I know, but it's a
> pretty good application, and not difficult to understand on its own.

Another really useful one is turning a solid object into a skin with a
defined wall thickness.

subtract the original from a solid block
minkowski that with a wall thickness sphere
intersect it with the original

Very useful when rescaling models and you want a constant wall thickness.

Alan

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