compas-dev / compas_cgal

COMPAS package for working with CGAL.
https://compas.dev/compas_cgal
GNU Lesser General Public License v3.0
23 stars 5 forks source link

CHANGE main types like Point, Vector, Polyline are moved to compas na… #21

Closed petrasvestartas closed 7 months ago

petrasvestartas commented 7 months ago

The main types like Point, Vector, Polyline and etc. are placed to the compas namespace because these names are very generic. For example if you want to run CGAL normal estimation, you get a clash with Windows Polyline class (the same name).

After the change, all the documentation example files were rerun to check if the compiled code works.

I am referring to compas.h main include header, most of the cpp files are modified due to this change:

...
namespace compas
{
    using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
    using Point = Kernel::Point_3;
    using Vector = Kernel::Vector_3;
    using Polyline = std::vector<Point>;
    using Polylines = std::list<Polyline>;
    using Polyhedron = CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3>;
    using Mesh = CGAL::Surface_mesh<Point>;
    using RowMatrixXd = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
    using RowMatrixXi = Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;$
...