![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Records "place a node ON a conduit": the conduit is split at the picked point and a node of the requested SWMM type is inserted there (ADDNODE_SPLIT_REDESIGN_PLAN_2026-09-10.md step 2). More...
#include <mapundostack.h>
Public Member Functions | |
| InsertNodeSplitCommand (SWMMModelLayer *layer, QString linkName, double t, QString nodeName, QString newLinkName, int nodeType, MapCanvas *canvas, QUndoCommand *parent=nullptr) | |
| void | undo () override |
| void | redo () override |
| int | id () const override |
| QStringList | warnings () const |
| bool | retyped () const |
Public Member Functions inherited from MapCommand | |
| MapCommand (const QString &text, MapCanvas *canvas, QUndoCommand *parent=nullptr) | |
Constructs a map command with a human-readable text. | |
| MapCanvas * | canvas () const |
Additional Inherited Members | |
Protected Attributes inherited from MapCommand | |
| MapCanvas * | m_canvas |
Records "place a node ON a conduit": the conduit is split at the picked point and a node of the requested SWMM type is inserted there (ADDNODE_SPLIT_REDESIGN_PLAN_2026-09-10.md step 2).
The engine's swmm_conduit_split always creates a JUNCTION, so for STORAGE / DIVIDER redo() splits, then converts the new junction with applyNodeConvert and applies the type's creation defaults (the same ObjectDefaultsApplier pass AddNodeCommand runs). A plain junction takes the split as-is — the engine's interpolated invert and conduit-derived depth are better than the defaults. Undo runs the inverse in reverse: convert back to a junction (the fuse inverse only accepts junctions), then re-fuse the conduit pair. OUTFALL is never accepted (an outfall must be terminal).
If the conversion is refused the node stays a junction and the engine's message is kept in warnings(); the split itself stands.
| InsertNodeSplitCommand::InsertNodeSplitCommand | ( | SWMMModelLayer * | layer, |
| QString | linkName, | ||
| double | t, | ||
| QString | nodeName, | ||
| QString | newLinkName, | ||
| int | nodeType, | ||
| MapCanvas * | canvas, | ||
| QUndoCommand * | parent = nullptr |
||
| ) |
|
inlineoverride |
|
override |
|
inline |
True when the node was actually retyped to nodeType (always true for a junction, which needs no conversion).
|
override |
|
inline |
Engine warnings / the conversion error from the last redo() (e.g. a divider inserted mid-conduit has only two links until a third is drawn).