Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] conversion to non-scalar type requested error.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] conversion to non-scalar type requested error.


Chronological Thread 
  • From: Gilles Kneuss <>
  • To:
  • Subject: Re: [cgal-discuss] conversion to non-scalar type requested error.
  • Date: Fri, 20 Nov 2009 13:07:58 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ERo0tAwvZEKKoK+hMHQhIPjK45JmcG1P+m3/kFogB0YjYqoB0G8OU5kjLOjE8RDUkz 0VqBeYaZiLf4BJAUO/LfQ87t8heiI29/LyychhxjxwCwde6ZFWe014hl6bziNupBFFop T3DhiN6PTx0zXY32pH+vvV3iNP8Qy4Ptn0y9I=

Hello,

Yes ! It works now !

Many thanks !

As I declared my method "const", I cannot use a non-const iterator.
I just put my iterator in Facet_const_iterator !

-> Facet_const_iterator monIterator=facets_begin();


Gilles

2009/11/20 Laurent Rineau (GeometryFactory) <>
Le jeudi 19 novembre 2009 20:32:34, Gilles a écrit :
> Hello,
>
> I inheritate from Polyhedron_3 this way :
>
> typedef CGAL::Simple_cartesian<double>           Kernel;
> typedef CGAL::Polyhedron_3<Kernel>       Polyhedron_3;
> typedef Polyhedron_3::HalfedgeDS         HalfedgeDS;
> typedef HalfedgeDS::Vertex   Vertex;
> typedef Vertex::Point Point_3;
>
>
> class AC_Nef_Polyhedron : public Polyhedron_3,public AC_Forme3D
> {...}
>
>
>  ...and I try to get the facet iterator in a member fonction :
>
>  void AC_Nef_Polyhedron::draw() const
>  {
>      // it does not work on 'this' ("conversion to non-scalar type
>  requested") Facet_iterator monIterator=facets_begin();
>
>
>      // IT WORKS
>      AC_Nef_Polyhedron np (NULL,NULL);
>      Facet_iterator t=np.facets_begin();
>
>      // IT ALSO WORKS
>      AC_Nef_Polyhedron* hj=new AC_Nef_Polyhedron(NULL,NULL);
>      Facet_iterator o=hj->facets_begin();
>  }
>
> Any clue ?

The only difference I see is that "this", in "void draw() const", is a *const*
pointer. Is facets_begin() a *const* method?

--
Laurent Rineau, PhD
Release Manager of the CGAL Project
http://www.cgal.org/
R&D
Engineer at GeometryFactory
http://www.geometryfactory.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss





Archive powered by MHonArc 2.6.16.

Top of Page