minkowski

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

minkowski

rk
This post has NOT been accepted by the mailing list yet.
Hi,

I'm new to OpenSCAD since yesterday (thanks to Stefan Krister!), and I'm feeling quite comfortable with the OpenSCAD way and syntax (probably because I have used POV-Ray for some time ;)). So, thanks for creating OpenSCAD!
I'm currently not very interested in 3D printing, but rather in using OpenSCAD for visualisation and 3D modeling.

The minkowski() transformation seem quite powerful, and I have two questions:

- 3D+2D:
  I tried to minkowski a 3D sphere and a 2D polygon; this would make it possible to extrude objects along a path, and make minkowski even more powerful:
  minkowski() {
      sphere(19);
      polygon([[0,0], [10,10]]);
  }

  But unfortunately, this did not work because:
  WARNING: Mixing 2D and 3D objects is not supported.

  Is there any reason why this doesn't work, and is it possible to make it work?

- 2D + rotated 2D:
  Then, I tried minkowski with only 2D elements; this works, as long as the 2D objects are not rotated.
  I tried:
  minkowski() {
      #circle(30);
      #translate([0,30,0]) rotate([0,90,0]) circle(10);
  }
  and expected to get a torus or a rounded disk.
  But instead, OpenSCAD only uses the parts which are located in z=0, and gives me the minkowski-sum of the circle and a line.

  Is this a bug, or is there any deeper reason why this doesn't work, and is it possible to make it work?
  (I know, I could create a torus/disk with rotate_extrude in this special case; but being able to use minkowski with rotated 2D objects would make it possible to create other 3D objects, which are hard to create otherwise.)

Thanks!
Roland
Reply | Threaded
Open this post in threaded view
|

Re: minkowski

QuackingPlums
You can always minkowski around an infinitesimally thin cylinder to make a disc. Applying minkowski with a sphere will produce the rounded disc you describe. If you subtract a cylinder of smaller radius from the disc to make a thin ring before applying minkowski then you'll get a toroid.

Minkowski is very computationally expensive so you'll probably soon find it too slow for it to be useful in more complex models - there are often quicker ways of achieving a similar result.