voxelmap.Model

class voxelmap.Model(array=None, file='')
__init__(array=None, file='')

Methods

__init__([array, file])

build()

Build voxel boolean mask from self.array

draw([coloring, background_color, ...])

Interactive 3D voxel rendering with PyVista (voxel-drawn cubes).

draw_mpl([coloring, edgecolors, figsize, ...])

Draw voxel model with matplotlib

hashblocks_add(key, color[, alpha])

load([filename])

Load model from JSON only (core).

save([filename])

Save model (JSON or TXT).

set_color(key, color[, alpha])

Set color for a voxel type.

Attributes

hashblocks

palette

Voxel palette: maps voxel values → (color, alpha).