Loading...
Searching...
No Matches
inpmeshreader.h
Go to the documentation of this file.
1
25
26#ifndef OPENSWMMVIS_MESH_INPMESHREADER_H
27#define OPENSWMMVIS_MESH_INPMESHREADER_H
28
29#include "meshresult.h"
30#include "meshedgebc.h"
31
32#include <QString>
33#include <QVector>
34
35namespace mesh
36{
37
42 QString
44 bool isExternal = false;
45 bool hasMesh =
46 false;
47 QString
49 QString
51
56 QString unitsHeader;
57
59 QString sourceCrsTag;
60
68 QVector<MeshEdgeBC> edgeBCs;
69};
70
89[[nodiscard]] bool unitsHeaderIsSI(const QString &unitsHeader);
90
99{
100public:
136 [[nodiscard]] static InpMeshReadResult read(const QString &inpPath);
137};
138
139} // namespace mesh
140
141#endif // OPENSWMMVIS_MESH_INPMESHREADER_H
Stateless reader for the [2D_*] mesh sections of a SWMM .inp (inline or via [2D_MESH_FILE]),...
Definition inpmeshreader.h:99
static InpMeshReadResult read(const QString &inpPath)
Read inline/native-sidecar mesh data and resolve edge/infiltration overlays into owned values.
Definition inpmeshreader.cpp:1475
Slice §V.VA — per-edge boundary condition value, stored on the SWMM2DMeshLayer in a SoA QVector index...
value types for the 2D mesh generator.
The Qt-facing MeshKit API (meshkit::core_qt, meshkit::model_qt, meshkit::io_qt): mesh value types and...
bool unitsHeaderIsSI(const QString &unitsHeader)
Recognize the retained metric-mesh header vocabulary without converting geometry.
Definition inpmeshreader.cpp:1458
Outcome of InpMeshReader::read.
Definition inpmeshreader.h:39
bool isExternal
True when the mesh was loaded via [2D_MESH_FILE] FILE path.
Definition inpmeshreader.h:44
QString unitsHeader
Verbatim value of the ;; UNITS: header line (empty when absent).
Definition inpmeshreader.h:56
QVector< MeshEdgeBC > edgeBCs
Slice §V.VD.1 — per-edge boundary conditions parsed from a [2D_BOUNDARY_CONDITIONS] section.
Definition inpmeshreader.h:68
QString warning
Non-fatal warning (e.g. legacy file missing the ;; UNITS: header — caller may surface this).
Definition inpmeshreader.h:50
QString sourceCrsTag
Value of the optional ;; SOURCE_CRS: tag header line.
Definition inpmeshreader.h:59
bool hasMesh
True only when [2D_VERTICES] and [2D_TRIANGLES] (or [2D_QUADS]) were found and parsed into a non-empt...
Definition inpmeshreader.h:45
QString sourcePath
File the mesh was parsed from (the .inp itself for inline meshes, the resolved .2dm path otherwise).
Definition inpmeshreader.h:43
QString errorMsg
Non-empty only on read failure (missing referenced .2dm, malformed sections). An ....
Definition inpmeshreader.h:48
Result of MeshGenerator::generate.
Definition meshresult.h:203