Class: QgsMeshDataSourceInterface¶
- class qgis.core.QgsMeshDataSourceInterface¶
Bases:
sip.wrapper
Interface for mesh data sources
Mesh is a collection of vertices, edges and faces in 2D or 3D space
vertex - XY(Z) point (in the mesh’s coordinate reference system)
edge - two XY(Z) points (in the mesh’s coordinate reference system) representing straight seqment
faces - sets of vertices forming a closed shape - typically triangles or quadrilaterals
Base on the underlying data provider/format, whole mesh is either stored in memory or read on demand
Note
The API is considered EXPERIMENTAL and can be changed without a notice
New in version 3.2:
Methods
Returns whether the mesh contains at mesh elements of given type
Returns number of edges in the native mesh
Returns number of faces in the native mesh
Returns the maximum number of vertices per face supported by the current mesh, if returns 0, the number of vertices is unlimited
Populates the mesh vertices, edges and faces
Saves the
mesh
frame to the source.Returns number of vertices in the native mesh
- contains(self, type: QgsMesh.ElementType) bool ¶
Returns whether the mesh contains at mesh elements of given type
New in version 3.14.
- Parameters
type (QgsMesh.ElementType) –
- Return type
bool
- edgeCount(self) int ¶
Returns number of edges in the native mesh
- Return type
int
- Returns
Number of edges in the mesh
New in version 3.14.
- faceCount(self) int ¶
Returns number of faces in the native mesh
- Return type
int
- Returns
Number of faces in the mesh
- maximumVerticesCountPerFace(self) int ¶
Returns the maximum number of vertices per face supported by the current mesh, if returns 0, the number of vertices is unlimited
- Return type
int
- Returns
Maximum number of vertices per face
New in version 3.22.
- populateMesh(self, mesh: QgsMesh)¶
Populates the mesh vertices, edges and faces
New in version 3.6.
- Parameters
mesh (QgsMesh) –
- saveMeshFrame(self, mesh: QgsMesh) bool ¶
Saves the
mesh
frame to the source.- Parameters
mesh (QgsMesh) – the mesh to save
- Return type
bool
- Returns
True
on success
New in version 3.22.
- vertexCount(self) int ¶
Returns number of vertices in the native mesh
- Return type
int
- Returns
Number of vertices in the mesh