Class: QgsMeshEditForceByLine

class qgis.core.QgsMeshEditForceByLine

Bases: QgsMeshAdvancedEditing

Class derived from QgsMeshAdvancedEditing that forces mesh based on a line

Forcing lines consist of line that the faces are forced to follow, that is edges of encountered faces have to be on theses lines.

Caller of this class has to set the line with setInputLine() before applying the edition with QgsMeshEditor.advancedEdit()

Other option has also to be set before calling QgsMeshEditor.advancedEdit()

New in version 3.22.

QgsMeshEditForceByLine() Constructor

QgsMeshEditForceByLine(QgsMeshEditForceByLine)

Methods

setAddVertexOnIntersection

Sets whether vertices will be added when the lines will intersect internal edges of faces, default is False

setDefaultZValue

Sets the default value of Z coordinate to use for new vertices, this value will be used if the Z value

setInputLine

Sets the input forcing line in rendering coordinates

setInterpolateZValueOnMesh

Sets whether the new created vertices will have their value interpolated from the existing mesh.

setTolerance

Sets the tolerance in redering coordinate system unit

setAddVertexOnIntersection(self, addVertex: bool)

Sets whether vertices will be added when the lines will intersect internal edges of faces, default is False

Parameters

addVertex (bool) –

setDefaultZValue(self, defaultZValue: float)

Sets the default value of Z coordinate to use for new vertices, this value will be used if the Z value

Parameters

defaultZValue (float) –

setInputLine(self, pt1: QgsPoint, pt2: QgsPoint, tolerance: float, newVertexOnIntersection: bool)

Sets the input forcing line in rendering coordinates

Parameters
  • pt1 (QgsPoint) –

  • pt2 (QgsPoint) –

  • tolerance (float) –

  • newVertexOnIntersection (bool) –

setInterpolateZValueOnMesh(self, interpolateZValueOnMesh: bool)

Sets whether the new created vertices will have their value interpolated from the existing mesh. If not, Z value will be interpolated from the lines, in case these line are not 3D, the default value will be used (setDefaultZValue())

Parameters

interpolateZValueOnMesh (bool) –

setTolerance(self, tolerance: float)

Sets the tolerance in redering coordinate system unit

Parameters

tolerance (float) –