Subject: CGAL users discussion list
List archive
- From: wenchao <>
- To:
- Subject: [cgal-discuss] Troubles in converting triangulation to polyhedron
- Date: Thu, 21 Mar 2013 20:39:23 -0700 (PDT)
Dear CGAL developers,
I encountered a problem when using incremental builder to build a
polyhedron. I used the add_vertex() and add_vertex_to_facet() to construct a
polyhedron from a triangulation. It looks something like:
//////////////////////////////////////////////////////////////////////////////////
builder.begin_surface(points.size(), points.size()/3,
CGAL::Polyhedron_incremental_builder_3<HDS>::ABSOLUTE_INDEXING);
for (unsigned int i = 0; i < points.size(); i++)
{
Vertex_handle vh = builder.add_vertex(points[i].p);
vh->group_id = points[i].group_id;
vh->mp = points[i].prj_pnt;
}
some_function();
builder.end_surface();
//////////////////////////////////////////////////////////////////////////////
void some_function(unsigned int i, unsigned int j, unsigned int k)
{
// some orientation code check here.
b.begin_facet();
b.add_vertex_to_facet(k);
b.add_vertex_to_facet(j);
b.add_vertex_to_facet(i);
b.end_facet();
}
///////////////////////////////////////////////////////////////////////////////
However, after I built this polyhedron P, the validity check
P.is_valid(false, 1) always fails.
More surprisingly, I run the example in
examples/Polyhedron/polyhedron_prog_incr_builder.cpp. I added the same check
in this example. But it still failed.
Can anyone help me find the reason for this trouble?
Thanks a lot!
Best,
Wenchao
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Troubles-in-converting-triangulation-to-polyhedron-tp4657006.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Troubles in converting triangulation to polyhedron, wenchao, 03/22/2013
- Re: [cgal-discuss] Troubles in converting triangulation to polyhedron, Sebastien Loriot (GeometryFactory), 03/25/2013
Archive powered by MHonArc 2.6.18.