Subject: CGAL users discussion list
List archive
- From: wenchao <>
- To:
- Subject: [cgal-discuss] Re: Polyhedron to Nef_polyhedron conversion error
- Date: Thu, 21 Mar 2013 20:36:37 -0700 (PDT)
Dear Sebastien,
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.
Could you please help me find the reason for this trouble?
Thanks a lot!
Best,
Wenhao
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Polyhedron-to-Nef-polyhedron-conversion-error-tp4656591p4657005.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Re: Polyhedron to Nef_polyhedron conversion error, wenchao, 03/22/2013
Archive powered by MHonArc 2.6.18.