Skip to Content.
Sympa Menu

cgal-discuss - How to build a Polyhedron_3 quickly

Subject: CGAL users discussion list

List archive

How to build a Polyhedron_3 quickly


Chronological Thread 
  • From: Bernhard Kornberger <>
  • To:
  • Subject: How to build a Polyhedron_3 quickly
  • Date: Fri, 07 Mar 2008 16:48:51 +0100

I need to create a Polyhedron_3 from the vertices of a power
cell:

// First: Get the power vertices
vector<TrCell_handle> vCellHandles;
regTr.incident_cells (v_it, back_inserter(vCellHandles));

// Second: Create a convex hull
Convex_hull_3 cHull(3);
for(unsigned i=0;i<vCellHandles.size();++i)
{
TrCell_handle ch=vCellHandles[i];
cHull.insert(regTr.dual(ch));
}

// Third: Create a polyhedron from the convex hull
Polyhedron poly;
CGAL::convex_hull_d_to_polyhedron_3(cHull,poly);

This is horrible slow. Actually I do not need the compute
the convex hull because it is known that the power cell
is convex. Is there a better way to get the polyhedron?

Best
Bernhard




  • How to build a Polyhedron_3 quickly, Bernhard Kornberger, 03/07/2008

Archive powered by MHonArc 2.6.16.

Top of Page