diff --git a/thirdparty/roofer/src/reconstruction/ArrangementBase.hpp b/thirdparty/roofer/src/reconstruction/ArrangementBase.hpp index 42ba12b8..ecaf916f 100644 --- a/thirdparty/roofer/src/reconstruction/ArrangementBase.hpp +++ b/thirdparty/roofer/src/reconstruction/ArrangementBase.hpp @@ -82,7 +82,7 @@ typedef CGAL::Arr_face_overlay_traits +class Face_index_observer : public CGAL::Arr_observer { private: int n_faces; // The current number of faces. @@ -91,12 +91,15 @@ class Face_index_observer : public CGAL::Arr_observer float elevation=0; Plane plane; public: - Face_index_observer (roofer::Arrangement_2& arr, bool is_footprint, size_t pid, float elevation, Plane plane) : - CGAL::Arr_observer (arr), + Face_index_observer (Arrangement_2& arr, bool is_footprint, size_t pid, float elevation, Plane plane) : + CGAL::Arr_observer (arr), n_faces (0), in_footprint(is_footprint), plane_id(pid), elevation(elevation), plane(plane) { CGAL_precondition (arr.is_empty()); - arr.unbounded_face()->data().is_finite=false; + for (auto uf = arr.unbounded_faces_begin(); + uf != arr.unbounded_faces_end(); ++uf) { + uf->data().is_finite = false; + } n_faces++; }; virtual void after_split_face (Face_handle old_face, @@ -111,18 +114,21 @@ class Face_index_observer : public CGAL::Arr_observer n_faces++; } }; -class Face_split_observer : public CGAL::Arr_observer +class Face_split_observer : public CGAL::Arr_observer { private: int n_faces; // The current number of faces. bool hole_mode=false; public: - Face_split_observer (roofer::Arrangement_2& arr) : - CGAL::Arr_observer (arr), + Face_split_observer (Arrangement_2& arr) : + CGAL::Arr_observer (arr), n_faces (0) { CGAL_precondition (arr.is_empty()); - arr.unbounded_face()->data().in_footprint=false; + for (auto uf = arr.unbounded_faces_begin(); + uf != arr.unbounded_faces_end(); ++uf) { + uf->data().is_finite = false; + } n_faces++; } virtual void after_split_face (Face_handle old_face,