#include <sms2dmreader.h>
|
| 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.
|
| |
◆ 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.
◆ parse()
| MeshResult mesh::Sms2dmReader::parse |
( |
const QString & |
text, |
|
|
bool |
splitQuads = false |
|
) |
| |
|
static |
Same as read, on already-loaded text.
◆ 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
-
| splitQuads | Split 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.
The documentation for this class was generated from the following files: