QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
QgsMeshEditForceByLine Class Reference

Class derived from QgsMeshAdvancedEditing that forces mesh based on a line. More...

#include <qgsmeshforcebypolylines.h>

Inheritance diagram for QgsMeshEditForceByLine:
Inheritance graph
[legend]

Public Member Functions

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

Friends

class QgsMeshEditForceByPolylines
 
class TestQgsMeshEditor
 

Additional Inherited Members

- Protected Member Functions inherited from QgsTopologicalMesh::Changes
void clearChanges ()
 Clears all changes.
 
- 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 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()

Since
QGIS 3.22

Definition at line 39 of file qgsmeshforcebypolylines.h.

Constructor & Destructor Documentation

◆ QgsMeshEditForceByLine()

QgsMeshEditForceByLine::QgsMeshEditForceByLine ( )
default

Member Function Documentation

◆ setAddVertexOnIntersection()

void QgsMeshEditForceByLine::setAddVertexOnIntersection ( bool  addVertex)

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

Definition at line 1223 of file qgsmeshforcebypolylines.cpp.

◆ setDefaultZValue()

void QgsMeshEditForceByLine::setDefaultZValue ( double  defaultZValue)

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

Definition at line 1228 of file qgsmeshforcebypolylines.cpp.

◆ setInputLine()

void QgsMeshEditForceByLine::setInputLine ( const QgsPoint pt1,
const QgsPoint pt2,
double  tolerance,
bool  newVertexOnIntersection 
)

Sets the input forcing line in rendering coordinates.

Definition at line 189 of file qgsmeshforcebypolylines.cpp.

◆ setInterpolateZValueOnMesh()

void QgsMeshEditForceByLine::setInterpolateZValueOnMesh ( bool  interpolateZValueOnMesh)

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 (

See also
setDefaultZValue())

Definition at line 1233 of file qgsmeshforcebypolylines.cpp.

◆ setTolerance()

void QgsMeshEditForceByLine::setTolerance ( double  tolerance)

Sets the tolerance in redering coordinate system unit.

Definition at line 1218 of file qgsmeshforcebypolylines.cpp.

Friends And Related Symbol Documentation

◆ QgsMeshEditForceByPolylines

friend class QgsMeshEditForceByPolylines
friend

Definition at line 125 of file qgsmeshforcebypolylines.h.

◆ TestQgsMeshEditor

friend class TestQgsMeshEditor
friend

Definition at line 124 of file qgsmeshforcebypolylines.h.


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