Skip to content

Commit 0c37af1

Browse files
committed
num_faces is not tight
1 parent e431c4e commit 0c37af1

File tree

1 file changed

+2
-3
lines changed
  • Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing

1 file changed

+2
-3
lines changed

Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,7 @@ void orient_to_bound_a_volume(TriangleMesh& tm,
13641364
typedef typename GetGeomTraits<TriangleMesh, NamedParameters>::type GT;
13651365
typedef typename GetInitializedFaceIndexMap<TriangleMesh, NamedParameters>::type FaceIndexMap;
13661366

1367-
std::size_t nbf = num_faces(tm);
1368-
if (nbf == 0) return;
1367+
if (is_empty(tm)) return;
13691368

13701369
CGAL_precondition(is_closed(tm));
13711370
CGAL_precondition(is_triangle_mesh(tm));
@@ -1380,7 +1379,7 @@ void orient_to_bound_a_volume(TriangleMesh& tm,
13801379
GT gt = choose_parameter<GT>(get_parameter(np, internal_np::geom_traits));
13811380
FaceIndexMap fid_map = CGAL::get_initialized_face_index_map(tm, np);
13821381

1383-
std::vector<std::size_t> face_cc(nbf, std::size_t(-1));
1382+
std::vector<std::size_t> face_cc(num_faces(tm), std::size_t(-1));
13841383
std::vector<std::size_t> nesting_levels;
13851384
std::vector<bool> is_cc_outward_oriented;
13861385
Constant_property_map<face_descriptor, std::size_t> vidmap(0); // dummy map not used

0 commit comments

Comments
 (0)