From dd70f9c11b72606056b121a7e828f123dbf1708e Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 22 Apr 2022 21:40:57 +0100 Subject: [PATCH] Implement append for Nef_3 that takes a range --- Nef_3/include/CGAL/Nef_polyhedron_3.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Nef_3/include/CGAL/Nef_polyhedron_3.h b/Nef_3/include/CGAL/Nef_polyhedron_3.h index bb9fe4d4844..fdb2fedae27 100644 --- a/Nef_3/include/CGAL/Nef_polyhedron_3.h +++ b/Nef_3/include/CGAL/Nef_polyhedron_3.h @@ -1456,6 +1456,24 @@ protected: return *this; } + template + Nef_polyhedron_3 + append(const Range& N) + /*{\Mop returns |\Mvar| with the range N appended }*/ { + for(typename Range::const_iterator N1=N.begin(); N1!=N.end(); ++N1) { + CGAL_NEF_TRACEN(" append between nef3 "<<&*this<<" and "<<&*N1); + Shell_entry_const_iterator si; + CGAL_forall_shells_of(si,N1->volumes_begin()) + CGAL::shell_to_nef_3(*N1,si,snc(),true); + } + SNC_external_structure es(snc()); + es.clear_external_structure(); + build_external_structure(); + mark_bounded_volumes(); + + return *this; + } + Nef_polyhedron_3 difference(const Nef_polyhedron_3& N1) const /*{\Mop returns |\Mvar| $-$ |N1|. }*/ {