Commit d03dbb93 authored by Thomas Gubler's avatar Thomas Gubler Committed by Thomas Gubler

[Survey transects generation] close polygon after decomposition

parent fb10d04d
...@@ -1113,14 +1113,17 @@ void SurveyComplexItem::_rebuildTransectsPhase1Worker(bool refly) ...@@ -1113,14 +1113,17 @@ void SurveyComplexItem::_rebuildTransectsPhase1Worker(bool refly)
qCDebug(SurveyComplexItemLog) << "Vertex" << polygonPoints[i]; qCDebug(SurveyComplexItemLog) << "Vertex" << polygonPoints[i];
polygon << polygonPoints[i]; polygon << polygonPoints[i];
} }
polygon << polygonPoints[0];
// Create list of separate polygons // Create list of separate polygons
QList<QPolygonF> polygons; QList<QPolygonF> polygons;
_PolygonDecomposeConvex(polygon, polygons); _PolygonDecomposeConvex(polygon, polygons);
// iterate over polygons // iterate over polygons
for (const auto& p : polygons) { for (auto& p : polygons) {
// close polygon
p << p.front();
// build transects for this polygon
// TODO figure out tangent origin
_rebuildTranscetsFromPolygon(refly, p, tangentOrigin); _rebuildTranscetsFromPolygon(refly, p, tangentOrigin);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment