[OpenSCAD] can anyone help with cgal and c++ stl iterators?

Clifford Wolf clifford at clifford.at
Mon Jan 4 10:37:01 CET 2010


On Mon, Jan 04, 2010 at 05:51:45AM +0100, Marius Kintel wrote:
> > Next miracle: how to apply an Aff_transformation_2 to an  
> > Explorer::Point
> > object..
> I didn't quite get what you're trying to achieve, unless this is some  
> kind of workaround for missing functionality in CGAL for 2D primitives.

yes. unlike the 3d nef polyhedron classes the 2d nef polygon classes do not
have a transform method.

> Maybe it would be easier to go to 3D and just set all z coordinates to 0.

with all z coordinates set to 0 it would have no volume and thus
not be a valid 3d new polyhedron.

sure you could work around that by simply linearly extruding the 2d data by
a constant length. but the main reason why I don't want to go there is that
the algorithms for 3d csg are much more expensive than the algorithms for
2d csg and it so it would be a waste of resources to use the 3d algorithms
for 2d operations.

Btw: I'm using that approach (extruding to 3d) already for the OpenCSG
preview of 2d data.

 - clifford

When your hammer is C++, everything begins to look like a thumb.

More information about the Openscad mailing list