Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Triangulate Polyhedron (not point-set)

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Triangulate Polyhedron (not point-set)


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Triangulate Polyhedron (not point-set)
  • Date: Mon, 28 Apr 2014 07:57:08 +0200
  • Organization: GeometryFactory

You can try the non-documented function CGAL::triangulate_polyhedron
defined in the file CGAL/triangulate_polyhedron.h that is used in the
polyhedron demo for example.

Sebastien.

On 04/26/2014 12:02 AM, Jeffrey Bush wrote:
Many of the polyhedral algorithms (including AABB tree) require pure-triangle
polyhedrons. Is there any way to take an already-made polyhedron and ensure
all facets are triangles? The is a 2D polygon version of this
(approx_convex_partition_2) which uses Constrained_triangulation_2 and then
removes edges added outside of the original polygon.

If something does not exist, I will try to implement it as follows:

// end will grow with extra triangles as we call split_facet()
Polyhedron_3::Facet_iterator end = P->facets_end();
for (Polyhedron_3::Facet_iterator f = P->facets_begin(); f != end; ++f)
{
if (f->is_quad())
{
// simple case, already implemented
// use split_facet on one of the two diagonals
// being careful with concave/degenerate quads
}
else if (!f->is_triangle())
{
// convert facet to a Polygon_2
// run approx_convex_partition_2 on the polygon
// tricky part: find all the added edges and figure out
split_facet calls
to make
}
}




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Triangulate-Polyhedron-not-point-set-tp4659203.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page