# Minkowski extrude has possibilities...

5 messages
Open this post in threaded view
|

## Minkowski extrude has possibilities...

 > Message: 2 > Date: Mon, 30 May 2011 15:16:06 +0530 > From: Jayesh Salvi <[hidden email]> > Subject: Re: [OpenSCAD] Python library for Solid Modelling - Cadmium > To: [hidden email] > > On Mon, May 30, 2011 at 3:03 PM, Triffid Hunter > <[hidden email]> wrote: > > On Sun, May 29, 2011 at 12:18 PM, Jayesh Salvi <[hidden email]> wrote: > >> On Sun, May 29, 2011 at 2:11 AM, Giles Bathgate > >> <[hidden email]> wrote: > >>> Have you implemented a way of doing linear extrude? I am currently > >>> having trouble getting RapCAD's linear extrude module to work > >>> optimally. > >> Not yet. Currently I've managed to implement only the CSG operations > >> and affine transformations. I'll check how linear extrusion algorithm > >> works. > > > > Isn't linear extrude as simple as duplicating all the 2d object's > > vertices along lines parallel to the normal and connecting edges as > > appropriate to form faces? > > That would be one way to implement it. But I think a more generic way > is to use Minkowski sum > http://www.cgal.org/Manual/3.5/doc_html/cgal_manual/Minkowski_sum_3/Chapter_main.html        If you are going to go the route of a Minkowski sum to         implement linear extrude, then extruding with a twist         becomes easy to generalize to more interesting things.         Perhaps if this were generalized in such a way as to         give the user the ability to combine 1D & 2D objects         under Minkowski sum (as well 2D x 2D et al) it would         lead to a more interesting tool.  Just a suggestion.  - Dan
Open this post in threaded view
|

## Re: Minkowski extrude has possibilities...

 On 30 May 2011 18:14, Dan Zuras 3D <[hidden email]> wrote: >        If you are going to go the route of a Minkowski sum to >        implement linear extrude, then extruding with a twist >        becomes easy to generalize to more interesting things. >        Perhaps if this were generalized in such a way as to >        give the user the ability to combine 1D & 2D objects >        under Minkowski sum (as well 2D x 2D et al) it would >        lead to a more interesting tool.  Just a suggestion.  - Dan Oh Right, I forgot to mention that RapCAD can already do a minkowski glide minkowski(){         polyline([[0,0,0],[0,10,10],[20,10,10],[30,20,20]]);         cube([10,10,10]); } http://www.rapcad.org/wordpress/wp-content/uploads/2011/05/Minkowski-Glide.pngThere is also the glide() module which does something slightly different. Regards Giles.
Open this post in threaded view
|

## Some of those possibilities...

 > Date: Mon, 30 May 2011 18:28:09 +0100 > Subject: Re: [OpenSCAD] Minkowski extrude has possibilities... > From: Giles Bathgate <[hidden email]> > To: Dan Zuras 3D <[hidden email]>, [hidden email] > > On 30 May 2011 18:14, Dan Zuras 3D <[hidden email]> wrote: > > If you are going to go the route of a Minkowski sum to > > implement linear extrude, then extruding with a twist > > becomes easy to generalize to more interesting things. > > Perhaps if this were generalized in such a way as to > > give the user the ability to combine 1D & 2D objects > > under Minkowski sum (as well 2D x 2D et al) it would > > lead to a more interesting tool.  Just a suggestion.  - Dan > > Oh Right, I forgot to mention that RapCAD can already do a minkowski glide > > minkowski(){ > polyline([[0,0,0],[0,10,10],[20,10,10],[30,20,20]]); > cube([10,10,10]); > } > > http://www.rapcad.org/wordpress/wp-content/uploads/2011/05/Minkowski-Glide.png> > There is also the glide() module which does something slightly different. > > Regards > > Giles.         This is nice but I was thinking of something more ambitious.         For example one could:                 Run a Minkowski sum in cylindrical coordinates to                 make torii & knots by crossing a 2D figure in the                 theta = 0 x Z plane with a 1D figure that wraps                 generally in theta.                 Or (also in cylindrical coordinates) one could                 cross a 2D figure in the Z = 0 plane with a 1D                 figure going generally in Z in which the theta                 of that latter figure is the theta used in the                 cross & the r is the scale factor rather than a                 displacement.                 Or (in any coordinate system) one could cross                 2 figures (of any kind) together with a scalar                 function (or Z or some parameter that goes from                 0 to 1 say) that scales them both.                 Or consider any 3D figure as a 2D figure that                 changes in the remaining coordinate (say Z) as if                 it were a parameter that goes from 0 to 1 to be                 crossed with any other figure similarly reimagined                 (in, say Y) as a series of parameterized Minkowski                 sums to be unioned together into the resulting                 figure.                 Or more general Minkowski sums in any coordinate                 system.         I can't figure out a good use for spherical coordinates in         such a sum but I suspect there are more imaginative people         out there who can.         Anyway, I was just suggesting that if ordinary extrudes were         based on a specific application of some fairly general forms         of Minkowski sums, it might make for a better tool all around.         And less computationally intensive than crossing 3D figures         with each other.         That's the idea.         I don't know if its too ambitious to code though.         That's up to you.         Yours,                                     Dan