Skip to content

Commit 8df9054

Browse files
committed
fix(block_bounding_box): Added case to compute block bounding box from block mesh if it exists.
1 parent df0db87 commit 8df9054

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/geode/model/helpers/component_mensurations.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <geode/geometry/point.hpp>
3232

3333
#include <geode/mesh/core/edged_curve.hpp>
34+
#include <geode/mesh/core/solid_mesh.hpp>
3435
#include <geode/mesh/core/surface_mesh.hpp>
3536

3637
#include <geode/model/helpers/component_mesh_edges.hpp>
@@ -174,6 +175,10 @@ namespace geode
174175

175176
BoundingBox3D block_bounding_box( const BRep& brep, const Block3D& block )
176177
{
178+
if( block.mesh().nb_vertices() != 0 )
179+
{
180+
return block.mesh().bounding_box();
181+
}
177182
BoundingBox3D result;
178183
for( const auto& surface : brep.boundaries( block ) )
179184
{

0 commit comments

Comments
 (0)