Class: QgsMesh

class qgis.core.QgsMesh

Bases: sip.wrapper

QgsMesh(QgsMesh)

Methods

clear

Remove all vertices, edges and faces

compareFaces

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

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

Attributes

Edge

Face

Vertex

Edge = 2
class ElementType

Bases: int

Face = 4
Vertex = 1
clear(self)

Remove all vertices, edges and faces

New in version 3.14.

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

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

New in version 3.16.

Parameters
  • face1 (Iterable[int]) –

  • face2 (Iterable[int]) –

Return type

bool

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

edge(self, index: int) → Tuple[int, int]

Returns an edge at the index

New in version 3.14.

Parameters

index (int) –

Return type

Tuple[int, int]

edgeCount(self) → int

Returns number of edge

New in version 3.14.

Return type

int

face(self, index: int) → List[int]

Returns a face at the index

Parameters

index (int) –

Return type

List[int]

faceCount(self) → int

Returns number of faces

Return type

int

vertex(self, index: int)QgsPoint

Returns a vertex at the index

Parameters

index (int) –

Return type

QgsPoint

vertexCount(self) → int

Returns number of vertices

Return type

int