Closed ethiy closed 3 years ago
I think the prefered method is: http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Class_Cartesian_converter.html
But you could also possibly use: https://github.com/GilesBathgate/RapCAD/blob/master/contrib/Copy_polyhedron_to.h I believe this latter exists somewhere in the examples. You use it like so:
template <class Poly_B, class Poly_A>
void poly_copy(Poly_B& poly_b, const Poly_A& poly_a)
{
poly_b.clear();
Copy_polyhedron_to<Poly_A, Poly_B> modifier(poly_a);
poly_b.delegate(modifier);
}
Giles' answer is a good one. That is nice to see users answering to users. :smiley:
You can also use CGAL::copy_face_graph
. It converts point types from one kernel to another. See that example, where it also converts from a face graph type to another.
Giles' answer is a good one. That is nice to see users answering to users. 😃
You can also use
CGAL::copy_face_graph
. It converted point types from one kernel to another. See that example, where it also converts from a face graph type to another.
@lrineau this works very well, thanks!
I am trying to convert a polyhedron using one kernel to another. The idea is to use exact kernels only if necessary. In the following example, I want to compute a minkowski sum which must be done with the
CGAL::Epeck
kernel. I do not want to make other computations with this kernel as it will be more slow.Issue Details
Is it possible to develop such a feature? If theoretically impossible, could you explain why?
Example
The same works without the attempted conversion. The error message is:
no matching function for call to ‘CGAL::Polyhedron_3<CGAL::Epeck>::Polyhedron_3(CGAL::Polyhedron_3<Simple_Cartesian>&)’
Environment
conan
)