Subject: CGAL users discussion list
List archive
- From:
- To:
- Subject: Isolated vertices
- Date: Tue, 13 Mar 2007 14:42:03 +0100
Hello,
I have a problem loading a mesh with isolated vertices. In the
polyhedron_scan_off.h there is a call to function
remove_unconnected_vertices() based on the of HalfedgeDS::Supports_removal's
value type(Tag_true/Tag_false). I presume that I have to activate this type
with something like typedef CGAL::Tag_true Supports_removal but I'm a newbie
with CGAL and I have not a clearly idea where I have to put this code's line.
My mesh definition is:
template <class Refs, class T, class P>
class MyHalfedge : public CGAL::HalfedgeDS_vertex_base<Refs, T, P>
{
protected:
typedef CGAL::Tag_true Supports_removal;
};
template <class Refs, class T, class P, class Norm>
class My_vertex : public CGAL::HalfedgeDS_vertex_base<Refs, T, P> {
Norm norm;
public:
typedef CGAL::Tag_true Supports_removal;
My_vertex() {} // repeat mandatory constructors
My_vertex( const P& pt) : CGAL::HalfedgeDS_vertex_base<Refs, T,
P>(pt) {}
typedef Norm Normal_3;
Normal_3& normal() { return norm; }
const Normal_3& normal() const { return norm; }
};
template <class Refs, class T, class Norm>
class My_facet : public CGAL::HalfedgeDS_face_base<Refs, T> {
Norm norm;
public:
// no constructors to repeat, since only default constructor mandatory
typedef Norm Normal_3;
Normal_3& normal() { return norm; }
const Normal_3& normal() const { return norm; }
};
struct My_items : public CGAL::Polyhedron_items_3 {
template <class Refs, class Traits>
struct Vertex_wrapper {
typedef typename Traits::Point_3 Point;
typedef typename Traits::Vector_3 Normal;
typedef My_vertex<Refs, CGAL::Tag_true, Point, Normal> Vertex;
};
template <class Refs, class Traits>
struct Face_wrapper {
typedef typename Traits::Vector_3 Normal;
typedef My_facet<Refs, CGAL::Tag_true, Normal> Face;
};
};
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point_3;
typedef CGAL::Polyhedron_3<Kernel, My_items, CGAL::HalfedgeDS_vector>
MyCGALMesh;
Can you help me?
Thanks, Guido.
- Isolated vertices, inopportuno, 03/13/2007
Archive powered by MHonArc 2.6.16.