Class: QgsMesh

Mesh - vertices, edges and faces

List of all members, including inherited members

Enums

ElementType

Methods

clear

Remove all vertices, edges and faces

contains

Returns whether the mesh contains at mesh elements of given type

edge

Returns an edge at the index

edgeCount

Returns number of edge

face

Returns a face at the index

faceCount

Returns number of faces

invalidateZMinMax

Invalidates the minimum and maximum elevation values, therefoe when querying zMinimum() or zMaximum(), the minimum and maximum are recalculated before returning the value.

maximumElevation

Returns the maximum elevation value of all vertices of the mesh.

minimumElevation

Returns the minimum elevation value of all vertices of the mesh.

vertex

Returns a vertex at the index

vertexCount

Returns number of vertices

Static Methods

compareFaces

Compare two faces, return True if they are equivalent : same indexes and same clock wise

class qgis.core.QgsMesh[source]

Bases: object

Edge = 2
class ElementType(*values)

Bases: IntEnum

Edge = 2
Face = 4
Vertex = 1
Face = 4
Vertex = 1
clear(self)[source]

Remove all vertices, edges and faces

Added in version 3.14.

static compareFaces(face1: Iterable[int], face2: Iterable[int]) → bool[source]

Compare two faces, return True if they are equivalent : same indexes and same clock wise

Added in version 3.16.

Parameters:
  • face1 (Iterable[int])

  • face2 (Iterable[int])

Return type:

bool

contains(self, type: QgsMesh.ElementType) → bool[source]

Returns whether the mesh contains at mesh elements of given type

Added in version 3.14.

Parameters:

type (QgsMesh.ElementType)

Return type:

bool

edge(self, index: int) → tuple[int, int][source]

Returns an edge at the index

Added in version 3.14.

Parameters:

index (int)

Return type:

tuple[int, int]

edgeCount(self) → int[source]

Returns number of edge

Added in version 3.14.

Return type:

int

face(self, index: int) → list[int][source]

Returns a face at the index

Parameters:

index (int)

Return type:

list[int]

faceCount(self) → int[source]

Returns number of faces

Return type:

int

invalidateZMinMax(self)[source]

Invalidates the minimum and maximum elevation values, therefoe when querying zMinimum() or zMaximum(), the minimum and maximum are recalculated before returning the value.

Added in version 4.4.

maximumElevation(self) → float[source]

Returns the maximum elevation value of all vertices of the mesh.

Added in version 4.4.

Return type:

float

minimumElevation(self) → float[source]

Returns the minimum elevation value of all vertices of the mesh.

Added in version 4.4.

Return type:

float

vertex(self, index: int) → QgsPoint[source]

Returns a vertex at the index

Parameters:

index (int)

Return type:

QgsPoint

vertexCount(self) → int[source]

Returns number of vertices

Return type:

int