![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Virtual-junction rule validation, flag editing, split and fusion. More...
#include "VirtualJunctionOps.hpp"#include "ObjectDeleter.hpp"#include "../core/ErrorCodes.hpp"#include "../input/PostParseResolver.hpp"#include "../2d/data/MeshData.hpp"#include <algorithm>#include <cmath>Namespaces | |
| namespace | openswmm |
| namespace | openswmm::edit |
Functions | |
| int | openswmm::edit::vj_rule_violation (const SimulationContext &ctx, int node_idx) |
| Check the virtual-junction usage rules for a node. | |
| void | openswmm::edit::vj_apply_derived_geometry (SimulationContext &ctx, int node_idx) |
| Apply the derived-geometry contract to a validated virtual junction: full depth = pipe crown (xsect y_full), zero surcharge depth, zero ponded area. The invert and the rendering-only rim depth are user/split-supplied data and are left alone. | |
| void | openswmm::edit::vj_clear_virtual (SimulationContext &ctx, int node_idx) |
| Clear a node's virtual flag, promoting its rendering rim depth (if any) back to the real full depth. | |
| int | openswmm::edit::vj_set_virtual (SimulationContext &ctx, int node_idx, bool make_virtual) |
| Set or clear a node's virtual flag. | |
| SplitResult | openswmm::edit::vj_split_conduit (SimulationContext &ctx, int link_idx, double t, const std::string &new_node_name, const std::string &new_link_name, bool make_virtual) |
Split a conduit at normalized position t along its vertex-aware polyline, inserting a new node (virtual junction when make_virtual) and a new downstream conduit. | |
| int | openswmm::edit::vj_fuse (SimulationContext &ctx, int node_idx, int *surviving_link_out) |
| Re-fuse the two conduits of a virtual junction into one, deleting the node (inverse of a virtual split). | |
| int | openswmm::edit::ij_host_conduit (const SimulationContext &ctx, int host_kind, int host_idx) |
| The conduit whose cross-section governs an inlet usage row. | |
| bool | openswmm::edit::ij_usage_shape_ok (const SimulationContext &ctx, int design_idx, int link_idx) |
| Legacy inlet_validate shape rule (inlet.c:498-505): CUSTOM designs fit any shape, DROP_* need RECT_OPEN/TRAPEZOIDAL, everything else needs STREET_XSECT. | |
| int | openswmm::edit::ij_rule_violation (const SimulationContext &ctx, int node_idx, bool for_drop_inlet) |
Check the inlet-junction usage rules for a node: every virtual-junction rule, then rule 623 — both attached conduits carry the cross-section the design needs (STREET_XSECT, or RECT_OPEN/TRAPEZOIDAL when for_drop_inlet). | |
| int | openswmm::edit::ij_set_inlet (SimulationContext &ctx, int node_idx, bool make_inlet) |
| Promote a node to an inlet junction or demote it. | |
| SplitResult | openswmm::edit::ij_split_conduit (SimulationContext &ctx, int link_idx, double t, const std::string &new_node_name, const std::string &new_link_name, int design_idx, int capture_node_idx) |
| Split a conduit and make the inserted node an inlet junction with the given design and capture node. | |
| int | openswmm::edit::ij_fuse (SimulationContext &ctx, int node_idx, int *surviving_link_out) |
| Inverse of ij_split_conduit: re-fuse an inlet junction's conduit pair. The node deletion inside vj_fuse cascades the node-hosted usage row away with the node; a failed fuse changes nothing. | |
Virtual-junction rule validation, flag editing, split and fusion.