mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			167 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			167 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/mesh/qgsmeshadvancedediting.h                               *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsMeshAdvancedEditing : protected QgsTopologicalMesh::Changes /Abstract/
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
 | 
						|
Abstract class that can be derived to implement advanced editing on mesh
 | 
						|
 | 
						|
To apply the advanced editing, a pointer to an instance of a derived class is passed
 | 
						|
in the method :py:func:`QgsMeshEditor.advancedEdit()`.
 | 
						|
 | 
						|
.. versionadded:: 3.22
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsmeshadvancedediting.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsMeshAdvancedEditing();
 | 
						|
    virtual ~QgsMeshAdvancedEditing();
 | 
						|
 | 
						|
    void setInputVertices( const QList<int> verticesIndexes );
 | 
						|
%Docstring
 | 
						|
Sets the input vertices indexes that will be used for the editing
 | 
						|
%End
 | 
						|
 | 
						|
    void setInputFaces( const QList<int> faceIndexes );
 | 
						|
%Docstring
 | 
						|
Sets the input faces indexes that will be used for the editing
 | 
						|
%End
 | 
						|
 | 
						|
    QString message() const;
 | 
						|
%Docstring
 | 
						|
Returns a message that can be provided by the advanced editing when applying is done
 | 
						|
%End
 | 
						|
 | 
						|
    void clear();
 | 
						|
%Docstring
 | 
						|
Removes all data provided to the editing or created by the editing
 | 
						|
%End
 | 
						|
 | 
						|
    virtual bool isFinished() const;
 | 
						|
%Docstring
 | 
						|
Returns whether the advanced edit is finished,
 | 
						|
if not, this edit has to be applied again with :py:func:`QgsMeshEditor.advancedEdit()` until is finished returns ``True``
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QString text() const;
 | 
						|
%Docstring
 | 
						|
Returns a short text string describing what this advanced edit does. Default implementation return a void string.
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
class QgsMeshEditRefineFaces : QgsMeshAdvancedEditing
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
 | 
						|
Class that can do a refinement of faces of a mesh.
 | 
						|
 | 
						|
This refinement is operated only on faces with 3 or 4 vertices (triangles or quads) by adding a vertex on the middle of each refined face.
 | 
						|
For quad faces, a vertex is added on the centroid of the original face.
 | 
						|
 | 
						|
New vertices Z value are interpolated between original vertices.
 | 
						|
 | 
						|
Original triangle faces are replaced by four triangles, and original quad faces are replaced by four quads.
 | 
						|
Neighboring faces are triangulated to take account of the new vertex in the shared edge.
 | 
						|
 | 
						|
.. versionadded:: 3.22
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsmeshadvancedediting.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsMeshEditRefineFaces();
 | 
						|
 | 
						|
    virtual QString text() const;
 | 
						|
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
class QgsMeshTransformVerticesByExpression : QgsMeshAdvancedEditing
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
 | 
						|
Class that can transform vertices of a mesh by expression
 | 
						|
 | 
						|
Each coordinates are associated with an expression that can be defined with function
 | 
						|
returning the current coordinates (see :py:func:`~setExpressions`):
 | 
						|
 | 
						|
- $vertex_x
 | 
						|
- $vertex_y
 | 
						|
- $vertex_z
 | 
						|
 | 
						|
Example:
 | 
						|
Transposing a mesh and translate following axe X with a distance of 50 and increase the level of the mesh
 | 
						|
with an height of 80 when previous X coordinate is under 100 and de crease the level of 150 when X is under 100:
 | 
						|
 | 
						|
expressionX: "$vertex_y + 50"
 | 
						|
expressionY: "$vertex_x"
 | 
						|
expressionZ: "if( $vertex_x <= 100 , $vertex_z + 80 , $vertex_z - 150)"
 | 
						|
 | 
						|
.. versionadded:: 3.22
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsmeshadvancedediting.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsMeshTransformVerticesByExpression();
 | 
						|
 | 
						|
    virtual QString text() const;
 | 
						|
 | 
						|
 | 
						|
    void setExpressions( const QString &expressionX, const QString &expressionY, const QString &expressionZ );
 | 
						|
%Docstring
 | 
						|
Sets the expressions for the coordinates transformation.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   Expressions are optional for each coordinate, the coordinate will not be transformed if the string is void.
 | 
						|
%End
 | 
						|
 | 
						|
    bool calculate( QgsMeshLayer *layer );
 | 
						|
%Docstring
 | 
						|
Calculates the transformed vertices of the mesh ``layer``, returns ``False`` if this leads to topological or geometrical errors.
 | 
						|
The mesh layer must be in edit mode.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   this method not apply new vertices to the mesh layer but only store the calculated transformation
 | 
						|
   that can be apply later with :py:func:`QgsMeshEditor.advancedEdit()`
 | 
						|
%End
 | 
						|
 | 
						|
    QgsMeshVertex transformedVertex( QgsMeshLayer *layer, int vertexIndex ) const;
 | 
						|
%Docstring
 | 
						|
Returns the transformed vertex from its index ``vertexIndex`` for the mesh ``layer``
 | 
						|
 | 
						|
If ``layer`` is not the same than the one used to make the calculation, this will create an undefined behavior
 | 
						|
%End
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/mesh/qgsmeshadvancedediting.h                               *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 |