Grid¶
The Grid.Uniform
object is the central data structure in sdfTools.
Summary¶
|
container to hold SDF grid data |
Details¶
- class _sdf_tools.Grid.Uniform¶
container to hold SDF grid data
- __init__(self: sdf_tools.Grid.Uniform, dimensions: sdf_tools.int3, offsets: sdf_tools.real3, extents: sdf_tools.real3) None ¶
Create an empty uniform grid of given size.
- Parameters
dimensions – Number of cells along each dimension.
offsets – Start of the domain.
extents – Size of the domain.
- dump_to_bov(self: sdf_tools.Grid.Uniform, basename: str) None ¶
Dump the data in
.bov
format- Parameters
basename – Base filename to dump to.
- dump_to_sdf(self: sdf_tools.Grid.Uniform, basename: str) None ¶
Dump data in custom
.sdf
format- Parameters
basename – Base filename to dump to.
- dump_to_vtk(self: sdf_tools.Grid.Uniform, basename: str) None ¶
Dump data in legacy
vtk
format- Parameters
basename – Base filename to dump to.
- evaluate_sdf(self: sdf_tools.Grid.Uniform, arg0: sdf_tools.Sdf.Sdf) None ¶
- evaluate_sdf_periodic(self: sdf_tools.Grid.Uniform, arg0: sdf_tools.Sdf.Sdf) None ¶
- extrude(self: sdf_tools.Grid.Uniform, zoffset: float, zextent: float, nz: int) None ¶
Extrude a SDF from ‘xy’ plane to 3 dimensions.
- Parameters
zoffset – Offset in the new direction.
zextent – Extent in the new direction.
nz – Resolution in new direction.
- flip(self: sdf_tools.Grid.Uniform, map: str) None ¶
Flip axes of the grid according to map.
- Parameters
map – The flip map description.
Examples
map = ‘xyz’ does not flip anything
map = ‘yxz’ flip x and y axes
map = ‘zxy’ z -> x, y -> z, x -> y
- get(*args, **kwargs)¶
Overloaded function.
get(self: sdf_tools.Grid.Uniform) -> List[float]
Returns a list of all values in a flatten array.
get(self: sdf_tools.Grid.Uniform) -> List[float]
Returns a list of all values in a flatten array (const).