Implement append for Nef_3 that takes a range

This commit is contained in:
Giles Bathgate 2022-04-22 21:40:57 +01:00
parent 6b1dd03935
commit dd70f9c11b
1 changed files with 18 additions and 0 deletions

View File

@ -1456,6 +1456,24 @@ protected:
return *this;
}
template <typename Range>
Nef_polyhedron_3<Kernel,Items, Mark>
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<Kernel,Items, Mark>
difference(const Nef_polyhedron_3<Kernel,Items, Mark>& N1) const
/*{\Mop returns |\Mvar| $-$ |N1|. }*/ {