Skip to content

Commit

Permalink
More imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Vin committed Jan 12, 2024
1 parent 60e1f9d commit dd8709c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/scenic/core/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
quaternion_matrix,
translation_matrix,
)
from trimesh.voxel import VoxelGrid

warnings.filterwarnings(
"ignore", module="trimesh"
Expand Down Expand Up @@ -2050,7 +2051,7 @@ def __init__(self, voxelGrid, orientation=None, name=None, lazy=False):
raise ValueError("Tried to create an empty VoxelRegion.")

# Store voxel grid and extract points and scale
self.voxelGrid = trimesh.voxel.VoxelGrid(
self.voxelGrid = VoxelGrid(
voxelGrid.encoding, transform=voxelGrid.transform.copy()
)
self.voxel_points = self.voxelGrid.points
Expand Down Expand Up @@ -2135,9 +2136,7 @@ def dilation(self, iterations, structure=None):
return nowhere

# Otherwise, return a VoxelRegion representing the eroded region.
new_voxel_grid = trimesh.voxel.VoxelGrid(
new_encoding, transform=self.voxelGrid.transform
)
new_voxel_grid = VoxelGrid(new_encoding, transform=self.voxelGrid.transform)
return VoxelRegion(voxelGrid=new_voxel_grid)

@property
Expand Down

0 comments on commit dd8709c

Please sign in to comment.