SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
maptoolmeshprofile.h File Reference

Canvas map tool that traces a free-form polyline across the 2D mesh to define a longitudinal profile cross-section. More...

#include "map/tools/maptool.h"
#include <QPoint>
#include <QPointF>
#include <QString>
#include <QVector>
Include dependency graph for maptoolmeshprofile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MapToolMeshProfile
 

Detailed Description

Canvas map tool that traces a free-form polyline across the 2D mesh to define a longitudinal profile cross-section.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Purely geometric — it captures a scene polyline and emits it; it never touches a layer. So it is also the capture tool for the terrain-toolbar DEM profile (SWMMVisProjectWindow::activateTerrainProfileTool), which routes the same polyline to RasterProfileSampler instead of MeshProfileSampler.

Behaviour (mirrors MapToolPick2DCells's lasso idiom):

  • Left-click adds a polyline vertex.
  • Mouse-move shows a live rubber segment from the last vertex to the cursor.
  • Double-click or Enter finishes (needs ≥ 2 vertices) and emits profilePathTraced with the vertices in scene coords (sx = mapX, sy = -mapY — the layer convention consumed directly by SWMM2DMeshLayer::sampleZAt / SWMM2DResultsLayer::pickCellAt).
  • Right-click undoes the last vertex.
  • Escape cancels the in-progress trace.