File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/geode/inspector/criterion/intersections Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -408,11 +408,22 @@ namespace geode
408408 std::vector< std::pair< ComponentMeshElement, ComponentMeshElement > >
409409 intersecting_triangles () const
410410 {
411- const auto model_tree = create_surface_meshes_aabb_trees ( model_ );
412411 std::vector<
413412 std::pair< ComponentMeshElement, ComponentMeshElement > >
414413 component_intersections;
415414 for ( const auto & surface : model_.surfaces () )
415+ {
416+ if ( surface.mesh ().nb_polygons () == 0 )
417+ {
418+ geode::Logger::warn (
419+ " One of the surface meshes has an empty mesh, cannot "
420+ " compute the AABBTree used for detecting the mesh "
421+ " intersections, no intersections will be computed." );
422+ return component_intersections;
423+ }
424+ }
425+ const auto model_tree = create_surface_meshes_aabb_trees ( model_ );
426+ for ( const auto & surface : model_.surfaces () )
416427 {
417428 if ( surface.mesh ().type_name ()
418429 != TriangulatedSurface< dimension >::type_name_static () )
You can’t perform that action at this time.
0 commit comments