- class Grid(dtcc.Geometry)[source]
Represents a structured quadrilateral grid in 2D.
Public members¶
-
width : int =
0
-
height : int =
0
- 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 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.
- from_proto(pb: Geometry | bytes)[source]
Initialize Grid from a protobuf representation.
- Grid(_bounds: ~dtcc_model.geometry.bounds.Bounds = <factory>, ...)
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
- 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.
-
width : int =