Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] How to mesh a Polyhedron<Cartesian<Gmpq>> ?

Subject: CGAL users discussion list

List archive

[cgal-discuss] How to mesh a Polyhedron<Cartesian<Gmpq>> ?


Chronological Thread 
  • From: Ruud Vlaming <>
  • To: cgal-discuss <>
  • Subject: [cgal-discuss] How to mesh a Polyhedron<Cartesian<Gmpq>> ?
  • Date: Tue, 29 Apr 2014 14:38:23 +0200

Dear people,

The following polyhedron is defined
in an open source program (openscad) i am using:

typedef CGAL::Gmpq NT;
typedef CGAL::Cartesian<NT> CGAL_Kernel3;
typedef CGAL::Nef_polyhedron_3<CGAL_Kernel3> CGAL_Nef_polyhedron3;
typedef CGAL::Polyhedron_3<CGAL_Kernel3> CGAL_Polyhedron;

I need to mesh these polyhedra, so i tried to integrate the
standard example:
http://doc.cgal.org/latest/Mesh_3/index.html#Mesh_33DPolyhedralDomains
where it is defined:

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedron_3<K> Polyhedron;
typedef CGAL::Polyhedral_mesh_domain_3<Polyhedron, K> Mesh_domain;


The problem that occurs is that both kernels seem (are?)
incompatible. So i get an error when i want to convert the
polyhedron from CGAL_Nef_polyhedron3 to Polyhedron
"no viable constructor" on the conversion convert_to_polyhedron
or i get the message
"no matching function for call to 'sqrt'" when i
try to use the CGAL_Kernel3 instead of
'CGAL::Exact_predicates_inexact_constructions_kernel'

I understand why this is (loosely formulated, sqrt is not possible
on the rational number field), but how can this be circumvented?
In the end i need the mesh result to be mapped back to the CGAL_Kernel3.

Surely this is not the first time such a problem surfaces,
but Google did not provide me any leads. Grateful for any
insights.

Ruud



  • [cgal-discuss] How to mesh a Polyhedron<Cartesian<Gmpq>> ?, Ruud Vlaming, 04/29/2014

Archive powered by MHonArc 2.6.18.

Top of Page