1 #ifndef dealii_cgal_wrappers_h
2 #define dealii_cgal_wrappers_h
8 #ifdef DEAL_II_WITH_CGAL
10 # include <boost/config.hpp>
12 # include <CGAL/Bbox_2.h>
13 # include <CGAL/Bbox_3.h>
14 # include <CGAL/Cartesian.h>
15 # include <CGAL/IO/io.h>
16 # include <CGAL/Origin.h>
20 template <
typename CGALPo
intType,
int dim>
22 to_cgal(
const dealii::Point<dim> &p)
24 if constexpr (dim == 1)
25 return CGALPointType(p[0]);
26 else if constexpr (dim == 2)
27 return CGALPointType(p[0], p[1]);
28 else if constexpr (dim == 3)
29 return CGALPointType(p[0], p[1], p[2]);
34 template <
int dim, typename CGALPointType>
36 to_dealii(const CGALPointType &p)
38 if constexpr (dim == 1)
40 else if constexpr (dim == 2)
41 return
dealii::
Point<dim>(CGAL::to_double(p.x()), CGAL::to_double(p.y()));
42 else if constexpr (dim == 3)
44 CGAL::to_double(p.y()),
45 CGAL::to_double(p.z()));
static ::ExceptionBase & ExcNotImplemented()