OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
MeshBuilder.cpp File Reference

Implementation of mesh topology construction and geometry computation. More...

#include "MeshBuilder.hpp"
#include "QuadVfr.hpp"
#include <unordered_map>
#include <cmath>
#include <algorithm>
#include <sstream>
#include <utility>
#include <cstdint>
Include dependency graph for MeshBuilder.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Functions

void openswmm::twoD::buildMeshTopology (MeshData &mesh)
 Build mesh topology and precompute geometry from raw vertex/triangle data.
 
std::string openswmm::twoD::validateMesh (const MeshData &mesh)
 Validate mesh data for consistency.
 
void openswmm::twoD::recomputeVertexZDependents (MeshData &mesh, int vidx)
 Recompute Z-derived per-triangle / per-edge geometry for triangles incident to a vertex whose Z just changed.
 
void openswmm::twoD::recomputeAllZDependents (MeshData &mesh)
 Whole-mesh form of recomputeVertexZDependents.
 

Detailed Description

Implementation of mesh topology construction and geometry computation.

Mixed triangle / quadrilateral cells (kMaxCellVerts = 4 padded layout, see MeshData.hpp). Triangle arithmetic is kept expression-for-expression identical to the triangle-only builder so an all-triangle mesh reproduces its geometry bit-for-bit; quads use the shoelace area and the area-weighted centroid of their two sub-triangles (the vertex mean is NOT the centroid of a skewed quad, and the Perot arms / ghost distances need the real one).

See also
MeshBuilder.hpp