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
mesh::Sms2dmReader Class Reference

#include <sms2dmreader.h>

Collaboration diagram for mesh::Sms2dmReader:

Static Public Member Functions

static MeshResult read (const QString &path, bool splitQuads=false)
 Parse the SMS 2DM file at path into a MeshResult.
 
static MeshResult parse (const QString &text, bool splitQuads=false)
 Same as read, on already-loaded text.
 
static bool looksLikeSms2dm (const QString &path)
 Cheap format sniff: true when the first non-blank lines of the file carry SMS cards (MESH2D, ND, E3T, E4Q) and no SWMMVis [2D_*] section header. Both formats share the .2dm extension.
 

Member Function Documentation

◆ looksLikeSms2dm()

bool mesh::Sms2dmReader::looksLikeSms2dm ( const QString &  path)
static

Cheap format sniff: true when the first non-blank lines of the file carry SMS cards (MESH2D, ND, E3T, E4Q) and no SWMMVis [2D_*] section header. Both formats share the .2dm extension.

Here is the caller graph for this function:

◆ parse()

MeshResult mesh::Sms2dmReader::parse ( const QString &  text,
bool  splitQuads = false 
)
static

Same as read, on already-loaded text.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read()

MeshResult mesh::Sms2dmReader::read ( const QString &  path,
bool  splitQuads = false 
)
static

Parse the SMS 2DM file at path into a MeshResult.

Nodes land in vertices in file order (ids are remapped to 0-based indices, so gaps or out-of-order ids are fine); every element's node references are resolved through that map. Cells land in triangles in the engine's order — E3T rows first, then E4Q rows (as quads with v3 >= 0), each in file order. The material id becomes the cell tag mat<n> (empty when the column is absent); Manning's n is left unset.

Parameters
splitQuadsSplit every E4Q into two triangles along the mesh::cellGeom diagonal (the same elevation-ordered split the engine's quad storage model uses) — for engines without quad support. Cells are then all triangles: the E3T rows, then each E4Q's two halves (adjacent, carrying the quad's tag).

On failure ok is false and errorMsg names the offending line.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: