navis.Volume.resize¶
- Volume.resize(x, method='center', inplace=False)[source]¶
Resize volume.
- Parameters:
x (int | float) – Resizing factor. For methods “center”, “centroid” and “origin” this is the fraction of original size (e.g.
.5
for half size). For method “normals”, this is is the absolute displacement (e.g.-1000
to shrink volume by that many units)!method ("center" | "centroid" | "normals" | "origin") –
Point in space to use for resizing.
method
explanation
center
average of all vertices
centroid
average of the triangle centroids weighted by the area of each triangle.
origin
resizes relative to origin of coordinate system (0, 0, 0)
normals
resize using face normals. Note that this method uses absolute displacement for parameter
x
.inplace (bool, optional) – If False, will return resized copy.
- Returns:
navis.Volume
– Resized copy of original volume. Only ifinplace=False
.None – If
inplace=True
.