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: Jeffrey Bush <>
  • To:
  • Subject: Re: [cgal-discuss] Triangulate Polyhedron (not point-set)
  • Date: Mon, 8 Sep 2014 11:01:36 -0700 (PDT)

crobar wrote
> I would like to do this too, could you possibly explain how you updated it
> please?

If you are using any kernel whose FT supports std:sqrt (like double or maybe
EPIC) then just include <CGAL/triangulate_polyhedron.h> and call
CGAL::triangulate_polyhedron(my_polyhedron).

If you are using any other kernel, you will have to include
<CGAL/internal/Operations_on_polyhedra/compute_normal.h> and define a
specialization of the following template function:

template <class Facet, class Kernel>
typename Kernel::Vector_3 compute_facet_normal(const Facet& f);

for your Polyhedron::Facet and Polyhedron::Traits types. You could copy the
definition of the original (available at
http://fossies.org/dox/CGAL-4.4/include_2CGAL_2internal_2Operations__on__polyhedra_2compute__normal_8h_source.html
or in your own source) and replace the std::sqrt with something else (like
Kernel::FT(CGAL::sqrt(CGAL::to_double(n*n))).

After you have created a specialization of the compute_facet_normal function
you can include and use the triangulate_polyhedron function as normal.



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



Archive powered by MHonArc 2.6.18.

Top of Page