36 for (
int i = 0; i < gc->numGeometries(); ++i )
47 for (
int i = 0; i < cp->numInteriorRings(); ++i )
56 for (
int i = 0; i < cc->nCurves(); ++i )
76 for (
int i = 0; i < gc->numGeometries(); ++i )
89 for (
int i = 0; i < cp->numInteriorRings(); ++i )
99 for (
int i = 0; i < cc->nCurves(); ++i )
125 int vertexOffset = 0;
126 for (
int i = 0; i < compound->nCurves(); ++i )
128 const QgsCurve *curve = compound->curveAt( i );
129 const int curveVertexCount = curve->
numPoints();
132 const int adjustedCount = ( i == compound->nCurves() - 1 ) ? curveVertexCount : curveVertexCount - 1;
133 if ( vid.
vertex < vertexOffset + adjustedCount )
137 localIndex = vid.
vertex - vertexOffset;
142 vertexOffset += adjustedCount;
151 ring = polygon->exteriorRing();
152 else if ( vid.
ring > 0 && vid.
ring <= polygon->numInteriorRings() )
153 ring = polygon->interiorRing( vid.
ring - 1 );
162 if ( vid.
part >= 0 && vid.
part < collection->numGeometries() )
Abstract base class for all geometries.
Compound curve geometry type.
Curve polygon geometry type.
Abstract base class for curved geometry type.
virtual int numPoints() const =0
Returns the number of points in the curve.
Represents a NURBS (Non-Uniform Rational B-Spline) curve geometry in 2D/3D.
static bool containsNurbsCurve(const QgsAbstractGeometry *geom)
Returns true if the geom contains a NURBS curve (recursively).
static const QgsNurbsCurve * extractNurbsCurve(const QgsAbstractGeometry *geom)
Extracts the first NURBS curve found in the geom (recursively).
static const QgsNurbsCurve * findNurbsCurveForVertex(const QgsAbstractGeometry *geom, const QgsVertexId &vid, int &localIndex)
Finds the NURBS curve containing the vertex identified by vid.
T qgsgeometry_cast(QgsAbstractGeometry *geom)
Utility class for identifying a unique vertex within a geometry.