This commit is contained in:
Sébastien Loriot 2022-07-06 17:09:55 +02:00
parent a994933ccb
commit 07b04366a0
2 changed files with 14 additions and 6 deletions

View File

@ -539,12 +539,6 @@ visit_shell_objects(typename Traits::SFace_handle f, Visitor& V) const
if ((f->incident_volume() == tf->incident_volume()) && Done[tf]) {
continue; // for example when we have to do with the unbounded volume and a surface with boundaries
}
Volume_const_iterator unbounded = volumes_begin();
Volume_const_iterator fit = f->incident_volume();
Volume_const_iterator tfit = tf->incident_volume();
if ((fit == unbounded) && (tfit != unbounded)) {
continue; // because we will later report it from the bounded side
}
FacetCandidates.push_back(f); Done[f] = true;
}
} else if (fc.is_svertex() ) {

View File

@ -359,14 +359,28 @@ void convert_nef_polyhedron_to_polygon_soup(const Nef_polyhedron& nef,
CGAL_assertion ( vol_it != vol_end );
Converter to_output;
bool handling_unbounded_volume = true;
auto shell_is_closed = [](typename Nef_polyhedron::SFace_const_handle sfh)
{
typename Nef_polyhedron::Halffacet_handle f = sfh;
return f->incident_volume()!=f->twin()->incident_volume();
};
for (;vol_it!=vol_end;++vol_it)
{
for(auto sit = vol_it->shells_begin(); sit != vol_it->shells_end(); ++sit)
{
if ( (handling_unbounded_volume || sit!=vol_it->shells_begin()) && shell_is_closed(sit)) continue;
nef_to_pm::collect_polygon_mesh_info(points,
polygons,
nef,
sit,
to_output,
triangulate_all_faces);
}
handling_unbounded_volume = false;
}
}
template <class Nef_polyhedron, class Polygon_mesh>