Class: QgsMesh3DDataBlock¶
QgsMesh3DDataBlock is a block of 3d stacked mesh data
related N faces defined on base mesh frame.
Data are implicitly shared, so the class can be quickly copied std.numeric_limits<double>.quiet_NaN() represents NODATA value
Note
The API is considered EXPERIMENTAL and can be changed without a notice
Note
In QGIS 3.34 this class was renamed from QgsMesh3dDataBlock to QgsMesh3DDataBlock. The old QgsMesh3dDataBlock name
remains available in PyQGIS for compatibility.
Added in version 3.12.
Methods
Number of 2d faces for which the volume data is stored in the block  | 
|
Returns the indexing between faces and volumes  | 
|
Index of the first volume stored in the buffer (absolute)  | 
|
Whether the block is valid  | 
|
Whether we store vector values  | 
|
Index of the last volume stored in the buffer (absolute)  | 
|
Sets the indexing between faces and volumes  | 
|
Sets block validity  | 
|
Sets the values at volume centers  | 
|
Sets the vertical levels height  | 
|
Sets the vertical level counts  | 
|
Returns the value at volume centers  | 
|
Returns the values at volume centers  | 
|
Returns the vertical levels height  | 
|
Returns number of vertical level above 2d faces  | 
|
Returns number of volumes stored in the buffer  | 
- class qgis.core.QgsMesh3DDataBlock[source]¶
 Bases:
object- __init__()
 Constructs an invalid block
- __init__(count: int, isVector: bool)
 Constructs a new block for count faces
- Parameters:
 count (int)
isVector (bool)
- __init__(a0: QgsMesh3DDataBlock)
 - Parameters:
 a0 (QgsMesh3DDataBlock)
- count(self) int[source]¶
 Number of 2d faces for which the volume data is stored in the block
- Return type:
 int
- faceToVolumeIndex(self) List[int]¶
 Returns the indexing between faces and volumes
- Return type:
 List[int]
- firstVolumeIndex(self) int[source]¶
 Index of the first volume stored in the buffer (absolute)
- Return type:
 int
- lastVolumeIndex(self) int[source]¶
 Index of the last volume stored in the buffer (absolute)
- Return type:
 int
- setFaceToVolumeIndex(self, faceToVolumeIndex: Iterable[int])[source]¶
 Sets the indexing between faces and volumes
- Parameters:
 faceToVolumeIndex (Iterable[int])
- setValues(self, doubleBuffer: Iterable[float])[source]¶
 Sets the values at volume centers
For vector datasets the number of values is doubled (x1, y1, x2, y2, … )
- Parameters:
 doubleBuffer (Iterable[float])
- setVerticalLevels(self, verticalLevels: Iterable[float])[source]¶
 Sets the vertical levels height
- Parameters:
 verticalLevels (Iterable[float])
- setVerticalLevelsCount(self, verticalLevelsCount: Iterable[int])[source]¶
 Sets the vertical level counts
- Parameters:
 verticalLevelsCount (Iterable[int])
- value(self, volumeIndex: int) QgsMeshDatasetValue[source]¶
 Returns the value at volume centers
- Parameters:
 volumeIndex (int) – volume index relative to
firstVolumeIndex()- Return type:
 - Returns:
 value (scalar or vector)
- values(self) List[float]¶
 Returns the values at volume centers
For vector datasets the number of values is doubled (x1, y1, x2, y2, … )
- Return type:
 List[float]
- verticalLevels(self) List[float]¶
 Returns the vertical levels height
- Return type:
 List[float]
- verticalLevelsCount(self) List[int]¶
 Returns number of vertical level above 2d faces
- Return type:
 List[int]