Stateless reader that turns an SMS 2DM mesh (file or text) into a MeshResult. More...
#include <mesh/sms2dmreader.h>
Static Public Member Functions | |
| static MeshResult | read (const QString &path, bool splitQuads=false, QStringList *warnings=nullptr) |
| Stream a bounded two-pass SMS file through meshkit::io. | |
| static MeshResult | parse (const QString &text, bool splitQuads=false) |
| Decode case-sensitive ND/E3T/E4Q cards into owned vertices and engine-ordered cells. | |
| static bool | looksLikeSms2dm (const QString &path) |
| Perform an early-card format sniff on at most 200 nonblank file lines. | |
Stateless reader that turns an SMS 2DM mesh (file or text) into a MeshResult.
All members are static and hold no state, so concurrent calls are independent. Results carry vertices, cells (triangles before quads) and, for read(), node strings as boundaryEdges; ok/errorMsg report failure. No unit or CRS conversion is applied.
|
staticnodiscard |
Perform an early-card format sniff on at most 200 nonblank file lines.
| [in] | path | Borrowed input pathname, unchanged; opened read-only/text, no result retained. |
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.
|
staticnodiscard |
Decode case-sensitive ND/E3T/E4Q cards into owned vertices and engine-ordered cells.
| [in] | text | Borrowed whole text, unchanged; whitespace simplified per line, no inline-comment grammar. Other card names are ignored; geometry card names must be uppercase despite case-insensitive sniffing. |
| [in] | splitQuads | True emits two adjacent triangle halves for each quad using cellGeom()'s z-selected storage fan; false emits v3>=0 quads after all triangles. |
Same as read, on already-loaded text.
|
staticnodiscard |
Stream a bounded two-pass SMS file through meshkit::io.
Sparse identifiers and forward references are resolved before returning geometry. Cells are finite, convex and counterclockwise; clockwise input is reoriented. Failure returns no partial mesh. NS node strings become tagged constraint edges. The GUI compatibility mode retains optional/text material tags; unsupported cards and winding changes are reported through warnings when supplied. Coordinates stay in file units. The legacy parse(text) helper remains below.