class VolumeGrid(dtcc.Geometry)[source]

Represents a structured hexahedral grid in 3D.

width

Number of cells in the x-direction.

Type:

int

height

Number of cells in the y-direction.

Type:

int

depth

Number of cells in the z-direction.

Type:

int

Public members

width : int = 0
height : int = 0
depth : int = 0
__str__()[source]

Return str(self).

calculate_bounds()[source]
property xstep : int

Return the distance between adjacent grid points in the x-direction.

property ystep : int

Return the distance between adjacent grid points in the y-direction.

property zstep : int

Return the distance between adjacent grid points in the z-direction.

property num_vertices : int

Return the total number of vertices in the grid.

property num_cells : int

Return the total number of cells in the grid.

coordinates()[source]

Return the coordinates of the grid points.

to_proto() Geometry[source]

Return a protobuf representation of the VolumeGrid.

from_proto(pb: Geometry | bytes)[source]

Initialize VolumeGrid from a protobuf representation.

VolumeGrid(...)

Initialize self. See help(type(self)) for accurate signature.

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

view()

View a mesh in 3D with a GLFW window.

property bounds
add_field(field: Field)[source]

Add a field to the geometry.

transform : Transform
fields : list[Field]
to_json() str

Return a JSON representation of the object.

copy(**kwargs)

Return a copy of the object.

classmethod add_methods(module, name=None)

Adds methods from a module or function to the class.

classmethod print_methods(verbose=False)

Print the methods that have been added to the class.