Subject: CGAL users discussion list
List archive
- From: Laurent Rineau <>
- To:
- Subject: Re: [cgal-discuss] 3D Surface mesher
- Date: Thu, 24 May 2007 16:34:54 +0200
- Organization: Inria, Sophia Antipolis, FRANCE
On Thursday 24 May 2007 04:54:55
wrote:
> Dear Laurent,
>
> Thanks for your answer.
>
> > All the surfacic information are in the object c2t3. See the
> > documentation, for that class:
>
> I managed to get the surfacic information.
> But I am not sure why facet iterator variable for c2t3 does not work
> without initializing it.
>
> If I try to compile the following fragment of code,
> C2t3::Facet_iterator it;
> the compiler (VC7) complains like
> "error C2512:
> 'CGAL::Complex_2_in_triangulation_3<Tr>::Iterator_not_in_complex' ". On the
> other hand, the following one can be compiled without any claims
> C2t3::Facet_iterator it = c2t3.facets_begin();
> Am I doing something wrong?
In way, yes: you should not used uninitialized iterators. On the other hand,
the "iterator" concept of the STL states that iterator types should have a
default constructor.
If you really want to construct uninitialized C2t3::Facet_iterator objects,
apply the following patch (not tested).
--- include/CGAL/Complex_2_in_triangulation_3.h 2007-05-24 09:31:33.000000000
+0200
+++ include/CGAL/Complex_2_in_triangulation_3.h 2007-05-24 09:31:29.000000000
+0200
@@ -167,13 +167,16 @@
class Iterator_not_in_complex {
Self* self;
public:
- Iterator_not_in_complex(Self* self) : self(self)
+ Iterator_not_in_complex(Self* self = 0) : self(self)
{
}
template <typename Iterator> // Facet or Edges iterators
bool operator()(Iterator it) const {
- return ! self->is_in_complex(*it);
+ if(self)
+ return ! self->is_in_complex(*it);
+ else
+ return true;
}
}; // end struct Iterator_not_in_complex
> > If you want to recreate a surface from a set of points, you need a
> > surface reconstruction algorithm. As far as I know, the only one that is
> > publicly available in CGAL is the alpha shape.
>
> Could the reconstructed shape be input for the function make_surface_mesh?
No. The reconstructed shape already is a kind of surface mesh. What do you
want to achieve? Re-mesh it?
> or do we have another way to make surface mesh from the shape?
Surface_mesher should be able to mesh implicit surfaces defined by a set of
point, if one provides an implicit function that approximates the surface.
However, such functionality is not implementated in CGAL.
> My goal is to create surface mesh from given points written in a file.
> I think one way to do that is to convert the file format to INRIMAGE, GIS
> or ANALYZE one if their file format opens.
INRIMAGE, GIS or ANALYZE are 3D images file formats, that is a 3D grid (for
example 256×256×256), that has a float value at each voxel. You cannot
convert a set of point into a 3D image.
--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
- Re: Re: [cgal-discuss] 3D Surface mesher, momokeke50, 05/24/2007
- Re: [cgal-discuss] 3D Surface mesher, Laurent Rineau, 05/24/2007
- <Possible follow-up(s)>
- Re: Re: [cgal-discuss] 3D Surface mesher, momokeke50, 05/25/2007
Archive powered by MHonArc 2.6.16.