1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
/************************************************************************
* 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 *
************************************************************************/
|