Inheriting from CGAL::Surface_mesh

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

Inheriting from CGAL::Surface_mesh

Lucio Santi
Hi all,

I'm trying to inherit from CGAL::Surface_mesh since it would be very
convenient for me to add some custom behavior to the meshes. I've already
followed some guidelines I found in other threads (e.g.  this one
<http://cgal-discuss.949826.n4.nabble.com/Polyhedron-vertex-descriptor-td4658859.html>
) but still I have a couple of compilation issues when trying to call
functions from CGAL::Polygon_mesh_processing --namely,
/is_outward_oriented()/, /volume()/ and /triangulate_faces()/.

This is my code so far:

typedef CGAL::Surface_mesh<CGAL::Simple_cartesian&lt;double>::Point_3>
CGALMesh;

namespace retQSS
{

class Mesh : public CGALMesh
{
public:
        Mesh() {};
        virtual ~Mesh() {};
};

}

namespace boost
{
        template<>
        struct graph_traits<retQSS::Mesh> :
                public boost::graph_traits<CGALMesh>
        {};

        template<>
        struct graph_traits<retQSS::Mesh const> :
                public boost::graph_traits<CGALMesh const>
        {};

        template <class Tag>
        struct property_map<retQSS::Mesh, Tag> :
                public property_map<CGALMesh, Tag>
        {};
}

...and the first compilation error I get when calling the aforementioned
functions is:

error: no type named ‘value_type’ in ‘struct boost::property_traits<bool>’

I think I could be missing some additional structs in the boost namespace.
Any help would be appreciated!

Thanks in advance,

Lucio



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

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


Reply | Threaded
Open this post in threaded view
|

Re: Inheriting from CGAL::Surface_mesh

Sebastien Loriot (GeometryFactory)
The attached file should be working.

Sebastien.

On 01/29/2019 08:23 PM, lsanti wrote:

> Hi all,
>
> I'm trying to inherit from CGAL::Surface_mesh since it would be very
> convenient for me to add some custom behavior to the meshes. I've already
> followed some guidelines I found in other threads (e.g.  this one
> <http://cgal-discuss.949826.n4.nabble.com/Polyhedron-vertex-descriptor-td4658859.html>
> ) but still I have a couple of compilation issues when trying to call
> functions from CGAL::Polygon_mesh_processing --namely,
> /is_outward_oriented()/, /volume()/ and /triangulate_faces()/.
>
> This is my code so far:
>
> typedef CGAL::Surface_mesh<CGAL::Simple_cartesian&lt;double>::Point_3>
> CGALMesh;
>
> namespace retQSS
> {
>
> class Mesh : public CGALMesh
> {
> public:
> Mesh() {};
> virtual ~Mesh() {};
> };
>
> }
>
> namespace boost
> {
> template<>
> struct graph_traits<retQSS::Mesh> :
> public boost::graph_traits<CGALMesh>
> {};
>
> template<>
> struct graph_traits<retQSS::Mesh const> :
> public boost::graph_traits<CGALMesh const>
> {};
>
> template <class Tag>
> struct property_map<retQSS::Mesh, Tag> :
> public property_map<CGALMesh, Tag>
> {};
> }
>
> ...and the first compilation error I get when calling the aforementioned
> functions is:
>
> error: no type named ‘value_type’ in ‘struct boost::property_traits<bool>’
>
> I think I could be missing some additional structs in the boost namespace.
> Any help would be appreciated!
>
> Thanks in advance,
>
> Lucio
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss



DerivedMesh.h (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Inheriting from CGAL::Surface_mesh

Lucio Santi
It is, indeed. Thank you!



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

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