Skip to content

Commit ecfca74

Browse files
committed
bounds check before voxelization
1 parent 6c43cff commit ecfca74

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

voxec.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ namespace {
496496
BRepBndLib::Add(p.second, global_bounds);
497497
}
498498

499+
if (global_bounds.IsVoid()) {
500+
return (abstract_voxel_storage*) new chunked_voxel_storage<V>(make_vec<long>(0, 0, 0), vsize, chunksize, make_vec<size_t>(1U, 1U, 1U));
501+
}
502+
499503
global_bounds.Get(x1, y1, z1, x2, y2, z2);
500504
nx = (int)ceil((x2 - x1) / vsize);
501505
ny = (int)ceil((y2 - y1) / vsize);

0 commit comments

Comments
 (0)