Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem customizing Polyhedron_3 Point type

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem customizing Polyhedron_3 Point type


Chronological Thread 
  • From: Philipp Moeller <>
  • To:
  • Cc: cgal-discuss <>
  • Subject: Re: [cgal-discuss] Problem customizing Polyhedron_3 Point type
  • Date: Fri, 29 Jun 2012 10:27:50 +0200

David Coeurjolly
<>
writes:

> Dear cgal-discuss,
>
> I'm having issues with a customization of CGAL Polyhedron_3 and after
> discussing about that with couple of CGAL gurus, I'm posting my problem
> here.
>
> I would like to construct a Polyhedron_3 upon a specific point class (not a
> custom vertex class via wrappers). More precisely, I would like to use
> Weighted_point class which decorated a template class point with "weights"
> (note: Weighted_Point inherits from the given class Point). Hence, my new
> class of points satisfies with the point concept and many of the
> methods/functions dealing with points can use the weighted points....
> except Polyherdon_3...
>
> More precisely, I'm doing something like that:
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
> struct My_items : public CGAL::Polyhedron_items_3
> {
> template <class Refs, class Traits>
> struct Vertex_wrapper {
> typedef CGAL::Weighted_point<typename Traits::Point_3, double> Point;
> //CustomPoints
> typedef CGAL::HalfedgeDS_vertex_base<Refs,CGAL::Tag_true,Point> Vertex;
> };
> template < class Refs, class Traits>
> struct Halfedge_wrapper {
> typedef CGAL::HalfedgeDS_halfedge_base<Refs>
> Halfedge;
> };
> template < class Refs, class Traits>
> struct Face_wrapper {
> typedef typename Traits::Plane_3 Plane;
> typedef CGAL::HalfedgeDS_face_base<Refs, CGAL::Tag_true, Plane> Face;
> };
> };
> typedef CGAL::Polyhedron_3<K, My_items > Polyhedron_3;
>
> but when I want to use it (for example to compute the convex hull of
> weighted point considering only the point coordinates), I get an
> compilation error in the Polyhedron_3 class (not matching function
> ‘CGAL::HalfedgeDS_in_place_list_vertex<...) which seems to be related to
> Halfedge containers. Note: for the rest of the process, I really need the
> weights to be associated with the points and not the polyhedron 3
> vertices...
>
> Am I doing something wrong ? How can I customize the Point class in
> Polyhedron ?

Can you try to give a minimal example that fails to compile (all
includes, a main that triggers instantiation), the full error output and
the CGAL version you are using? A compiler version would be helpful as
well.

Thanks,
Philipp



Archive powered by MHonArc 2.6.18.

Top of Page