Class: QgsMeshEditForceByLine

Forces mesh editing 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()

Added in version 3.22.

Class Hierarchy

Inheritance diagram of qgis.core.QgsMeshEditForceByLine

Base classes

QgsMeshAdvancedEditing

Abstract class that can be derived to implement advanced editing on mesh.

Subclasses

QgsMeshEditForceByPolylines

Derived from QgsMeshEditForceByLine that forces mesh based on polyline.

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

class qgis.core.QgsMeshEditForceByLine[source]

Bases: QgsMeshAdvancedEditing

setAddVertexOnIntersection(self, addVertex: bool)[source]

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)[source]

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)[source]

Sets the input forcing line in rendering coordinates

Parameters:
  • pt1 (QgsPoint)

  • pt2 (QgsPoint)

  • tolerance (float)

  • newVertexOnIntersection (bool)

setInterpolateZValueOnMesh(self, interpolateZValueOnMesh: bool)[source]

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)[source]

Sets the tolerance in redering coordinate system unit

Parameters:

tolerance (float)