Class: QgsMesh

Mesh - vertices, edges and faces

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

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

Attributes

Edge

Face

Vertex

class qgis.core.QgsMesh

Bases: object

Edge = 2
class ElementType

Bases: int

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

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