Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Inheriting from CGAL::Surface_mesh
- Date: Wed, 30 Jan 2019 07:24:27 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:IDcCcxbQVowX9JfeGZk/4kr/LSx+4OfEezUN459isYplN5qZr8i/bnLW6fgltlLVR4KTs6sC17KG9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa+bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjAk7m/XhMx+gqFVrh2vqBNwwZLbbZqQNPZiZK7QZ88WSGRDU8tXSidPApm8b4wKD+cZM+pWspfyqEAUohulGQmsBf3gyjlVjXHw2q06yeUhEQba3Ac9G94AsWrbrNLwNKgMTeC11qnJwzXZYPxKxTf975LIcxAkrf2CQLl9dtHRyU0oFwPfj1WQrpDlMymQ1uQJqGWb4O9gWviui24jsQ1+vj+vxsI1h4TPm4kbxFfE9SBjz4Y0I921UEh7bsS/H5RLsyGVKZF6Td8lQ2Ftvisx174IuYajcSQU1JgqwwTTZv+HfoSS/x7vSuWcLS13iX9mYL6yhRW//VK+xuDzV8S4yktGoy5Ln9XWtH0A1xre4dWdRPRn5EeuwzOP2hjT6u5aJUA0krLWK5s7zb4xkpofqErCHirrlEnvgq+beUYp9vKn6+TgZbXmqZucOJFuhg7iNaQun9SzAeU+MgcQQ2iW4fqw2KHn8EHjQ7hHjuc6nrTHvJ3ZP8gWqa20DxdQ0ok56ha/Czmm0M4fnXkCNF9FYxaHj4/zO1HPJ/D4Ee2zg1GokDpwyPDGO6fuApTJLnTZjLjherN951ZGyAUv1dBf+45UCrYZLf3vVU/+rtjYAgYkPAy12OboFMh91pgFWW+UGa+YMKbSsUeS6e41IumMYpUVuDfnJPQ/6f7ulyxxpVhIdqag2d4baWuzA+99C0Sfe3vlxNkbQkkQuQ9rBtfnglSZTT9eYT6WWLg94S1zSK2rCoLOWpq8rrWKwCChD9wcLjRdDleWEHD0MYCAc/gJYSOWZMRml2pXBvCaV4Y92ET250fBwL19I7+Mo3xKhdfYzNFwotbru1Q3/D1wAd6a1jjUHW5xl2IMATQx2fIm+BAv+hK4yaF9xsdgO5lL/foQC1U1MJfdy6pxDNWgAlucLOfMc06vR5CdOR90Tt81xIVTMUN0GtHnkRWamiT2U/kakLuEAJFy+aXZjSD8
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<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/
#include <CGAL/Simple_cartesian.h> #include <CGAL/Surface_mesh.h> namespace MyNameSpace { struct DerivedMesh: public CGAL::Surface_mesh<CGAL::Simple_cartesian<double>::Point_3> { typedef CGAL::Surface_mesh<CGAL::Simple_cartesian<double>::Point_3> Base; }; } namespace boost { template <> struct graph_traits<MyNameSpace::DerivedMesh> : public graph_traits<MyNameSpace::DerivedMesh::Base> {}; } namespace boost { template <class Tag> struct property_map<MyNameSpace::DerivedMesh, Tag > : public property_map<MyNameSpace::DerivedMesh::Base, Tag > {}; template <class T> struct property_map<MyNameSpace::DerivedMesh, CGAL::dynamic_halfedge_property_t<T> > : public property_map<MyNameSpace::DerivedMesh::Base, CGAL::dynamic_halfedge_property_t<T> > {}; template <class T> struct property_map<MyNameSpace::DerivedMesh, CGAL::dynamic_edge_property_t<T> > : public property_map<MyNameSpace::DerivedMesh::Base, CGAL::dynamic_edge_property_t<T> > {}; } namespace CGAL { template<class Tag> struct graph_has_property<MyNameSpace::DerivedMesh, Tag> : public graph_has_property<MyNameSpace::DerivedMesh::Base, Tag> {}; } namespace MyNameSpace { template <typename T> typename boost::property_map<DerivedMesh, CGAL::dynamic_halfedge_property_t<T> >::const_type get(const CGAL::dynamic_halfedge_property_t<T>& tag, DerivedMesh& dm) { return get(tag, static_cast<DerivedMesh::Base&>(dm)); } template <typename T> typename boost::property_map<DerivedMesh, CGAL::dynamic_edge_property_t<T> >::const_type get(const CGAL::dynamic_edge_property_t<T>& tag, DerivedMesh& dm) { return get(tag, static_cast<DerivedMesh::Base&>(dm)); } }
- [cgal-discuss] Inheriting from CGAL::Surface_mesh, lsanti, 01/29/2019
- Re: [cgal-discuss] Inheriting from CGAL::Surface_mesh, Sebastien Loriot (GeometryFactory), 01/30/2019
- Re: [cgal-discuss] Inheriting from CGAL::Surface_mesh, Lucio Santi, 01/30/2019
- Re: [cgal-discuss] Inheriting from CGAL::Surface_mesh, Sebastien Loriot (GeometryFactory), 01/30/2019
Archive powered by MHonArc 2.6.18.