QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
QgsMeshEditForceByPolylines Class Reference

Class derived from QgsMeshEditForceByLine that forces mesh based on polyline. More...

#include <qgsmeshforcebypolylines.h>

Inheritance diagram for QgsMeshEditForceByPolylines:
Inheritance graph
[legend]

Public Member Functions

 QgsMeshEditForceByPolylines ()=default
 Constructor. More...
 
void addLineFromGeometry (const QgsGeometry &geom)
 Adds a input forcing line geometry in rendering coordinates. More...
 
void addLinesFromGeometries (const QList< QgsGeometry > geometries)
 Adds a list of input forcing lines geometry in rendering coordinates. More...
 
bool isFinished () const override
 Returns whether the advanced edit is finished, if not, this edit has to be applied again with QgsMeshEditor::advancedEdit() until is finished returns true. More...
 
QString text () const override
 Returns a short text string describing what this advanced edit does. Default implementation return a void string. More...
 
- Public Member Functions inherited from QgsMeshEditForceByLine
 QgsMeshEditForceByLine ()=default
 Constructor. More...
 
void setAddVertexOnIntersection (bool addVertex)
 Sets whether vertices will be added when the lines will intersect internal edges of faces, default is false. More...
 
void setDefaultZValue (double defaultZValue)
 Sets the default value of Z coordinate to use for new vertices, this value will be used if the Z value. More...
 
void setInputLine (const QgsPoint &pt1, const QgsPoint &pt2, double tolerance, bool newVertexOnIntersection)
 Sets the input forcing line in rendering coordinates. More...
 
void setInterpolateZValueOnMesh (bool interpolateZValueOnMesh)
 Sets whether the new created vertices will have their value interpolated from the existing mesh. More...
 
void setTolerance (double tolerance)
 Sets the tolerance in redering coordinate system unit. More...
 
- Public Member Functions inherited from QgsMeshAdvancedEditing
 QgsMeshAdvancedEditing ()
 Constructor. More...
 
virtual ~QgsMeshAdvancedEditing ()
 Destructor. More...
 
void clear ()
 Removes all data provided to the editing or created by the editing. More...
 
virtual bool isFinished () const
 Returns whether the advanced edit is finished, if not, this edit has to be applied again with QgsMeshEditor::advancedEdit() until is finished returns true. More...
 
QString message () const
 Returns a message that can be provided by the advanced editing when applying is done. More...
 
void setInputFaces (const QList< int > faceIndexes)
 Sets the input faces indexes that will be used for the editing. More...
 
void setInputVertices (const QList< int > verticesIndexes)
 Sets the input vertices indexes that will be used for the editing. More...
 
virtual QString text () const
 Returns a short text string describing what this advanced edit does. Default implementation return a void string. More...
 
- Public Member Functions inherited from QgsTopologicalMesh::Changes
QVector< QgsMeshFaceaddedFaces () const
 Returns the face that are added with this changes. More...
 
QVector< QgsMeshVertexaddedVertices () const
 Returns the added vertices with this changes. More...
 
QList< int > changedCoordinatesVerticesIndexes () const
 Returns the indexes of vertices that have changed coordinates. More...
 
bool isEmpty () const
 Returns whether changes are empty, that there is nothing to change. More...
 
QList< int > nativeFacesIndexesGeometryChanged () const
 Returns a list of the native face indexes that have a geometry changed. More...
 
QList< QgsPointXYnewVerticesXYValues () const
 Returns the new (X,Y) values of vertices that have changed their coordinates. More...
 
QList< double > newVerticesZValues () const
 Returns the new Z values of vertices that have changed their coordinates. More...
 
QList< QgsPointXYoldVerticesXYValues () const
 Returns the old (X,Y) values of vertices that have changed their coordinates. More...
 
QList< int > removedFaceIndexes () const
 Returns the indexes of the faces that are removed with this changes. More...
 
QVector< QgsMeshFaceremovedFaces () const
 Returns the faces that are removed with this changes. More...
 
QList< int > verticesToRemoveIndexes () const
 Returns the indexes of vertices to remove. More...
 

Additional Inherited Members

virtual QgsTopologicalMesh::Changes apply (QgsMeshEditor *meshEditor)=0
 Apply a change to mesh Editor. More...
 
- Protected Member Functions inherited from QgsTopologicalMesh::Changes
void clearChanges ()
 Clears all changes. More...
 
- Protected Attributes inherited from QgsMeshAdvancedEditing
QList< int > mInputFaces
 
QList< int > mInputVertices
 
bool mIsFinished = false
 
QString mMessage
 
- Protected Attributes inherited from QgsTopologicalMesh::Changes
int mAddedFacesFirstIndex = 0
 
QList< int > mChangeCoordinateVerticesIndexes
 
QList< int > mFaceIndexesToRemove
 
QVector< FaceNeighborsmFacesNeighborhoodToAdd
 
QVector< FaceNeighborsmFacesNeighborhoodToRemove
 
QVector< QgsMeshFacemFacesToAdd
 
QVector< QgsMeshFacemFacesToRemove
 
QList< int > mNativeFacesIndexesGeometryChanged
 
QList< std::array< int, 4 > > mNeighborhoodChanges
 
QList< QgsPointXYmNewXYValues
 
QList< double > mNewZValues
 
QList< QgsPointXYmOldXYValues
 
QList< double > mOldZValues
 
QList< QgsMeshVertexmRemovedVertices
 
QVector< int > mVertexToFaceToAdd
 
QVector< QgsMeshVertexmVerticesToAdd
 
QList< std::array< int, 3 > > mVerticesToFaceChanges
 
QList< int > mVerticesToFaceRemoved
 
QList< int > mVerticesToRemoveIndexes
 

Detailed Description

Class derived from QgsMeshEditForceByLine that forces mesh based on polyline.

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 add the lines from QgsGeometry instances with addLineFromGeometry() or addLinesFromGeometries() before applying the edition with QgsMeshEditor::advancedEdit()

Since
QGIS 3.22

Definition at line 144 of file qgsmeshforcebypolylines.h.

Constructor & Destructor Documentation

◆ QgsMeshEditForceByPolylines()

QgsMeshEditForceByPolylines::QgsMeshEditForceByPolylines ( )
default

Constructor.

Member Function Documentation

◆ addLineFromGeometry()

void QgsMeshEditForceByPolylines::addLineFromGeometry ( const QgsGeometry geom)

Adds a input forcing line geometry in rendering coordinates.

Note
if the geometry is not 3D, the default Z value will be used for the Z value of the geometry's vertices. This default Z value has to be set before adding the geometry (
See also
setDefaultZValue()

Definition at line 1152 of file qgsmeshforcebypolylines.cpp.

◆ addLinesFromGeometries()

void QgsMeshEditForceByPolylines::addLinesFromGeometries ( const QList< QgsGeometry geometries)

Adds a list of input forcing lines geometry in rendering coordinates.

Note
if the geometry is not 3D, the default Z value will be used for the Z value of the geometry's vertices. This default Z value has to be set before adding the geometry (
See also
setDefaultZValue()

Definition at line 1212 of file qgsmeshforcebypolylines.cpp.

◆ isFinished()

bool QgsMeshEditForceByPolylines::isFinished ( ) const
overridevirtual

Returns whether the advanced edit is finished, if not, this edit has to be applied again with QgsMeshEditor::advancedEdit() until is finished returns true.

Reimplemented from QgsMeshAdvancedEditing.

Definition at line 1118 of file qgsmeshforcebypolylines.cpp.

◆ text()

QString QgsMeshEditForceByPolylines::text ( ) const
overridevirtual

Returns a short text string describing what this advanced edit does. Default implementation return a void string.

Reimplemented from QgsMeshAdvancedEditing.

Definition at line 1113 of file qgsmeshforcebypolylines.cpp.


The documentation for this class was generated from the following files: