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
inpmeshreader.h
Go to the documentation of this file.
1
17#ifndef OPENSWMMVIS_MESH_INPMESHREADER_H
18#define OPENSWMMVIS_MESH_INPMESHREADER_H
19
20#include "meshresult.h"
21#include "meshedgebc.h"
22
23#include <QString>
24#include <QVector>
25
26namespace mesh {
27
30{
32 QString sourcePath;
33 bool isExternal = false;
34 bool hasMesh = false;
35 QString errorMsg;
36 QString warning;
37
42 QString unitsHeader;
43
45 QString sourceCrsTag;
46
54 QVector<MeshEdgeBC> edgeBCs;
55};
56
66[[nodiscard]] bool unitsHeaderIsSI(const QString &unitsHeader);
67
69{
70public:
83 [[nodiscard]] static InpMeshReadResult read(const QString &inpPath);
84};
85
86} // namespace mesh
87
88#endif // OPENSWMMVIS_MESH_INPMESHREADER_H
Definition inpmeshreader.h:69
static InpMeshReadResult read(const QString &inpPath)
Look up the 2D mesh associated with inpPath.
Definition inpmeshreader.cpp:745
Definition meshcommands.h:302
bool unitsHeaderIsSI(const QString &unitsHeader)
True when unitsHeader (the verbatim ;; UNITS: value) declares a metric mesh, i.e. one the engine will...
Definition inpmeshreader.cpp:728
Outcome of InpMeshReader::read.
Definition inpmeshreader.h:30
bool isExternal
True when the mesh was loaded via [2D_MESH_FILE] FILE <path>.
Definition inpmeshreader.h:33
MeshResult mesh
Parsed mesh; mesh.ok mirrors hasMesh. XY are in SI metres (the engine contract); caller divides back ...
Definition inpmeshreader.h:31
QString unitsHeader
Verbatim value of the ;; UNITS: header line (empty when absent). XY in mesh.vertices are left unchang...
Definition inpmeshreader.h:42
QVector< MeshEdgeBC > edgeBCs
Slice §V.VD.1 — per-edge boundary conditions parsed from a [2D_BOUNDARY_CONDITIONS] section....
Definition inpmeshreader.h:54
QString warning
Non-fatal warning (e.g. legacy file missing the ;; UNITS: header — caller may surface this).
Definition inpmeshreader.h:36
QString sourceCrsTag
Value of the optional ;; SOURCE_CRS: <tag> header line.
Definition inpmeshreader.h:45
bool hasMesh
True only when [2D_VERTICES] and [2D_TRIANGLES] (or [2D_QUADS]) were found and parsed into a non-empt...
Definition inpmeshreader.h:34
QString sourcePath
File the mesh was parsed from (the .inp itself for inline meshes, the resolved .2dm path otherwise).
Definition inpmeshreader.h:32
QString errorMsg
Non-empty only on read failure (missing referenced .2dm, malformed sections). An ....
Definition inpmeshreader.h:35
Result of MeshGenerator::generate.
Definition meshresult.h:116