62 static void iBuildStamperIo(
const std::string& a_path,
XmStamperIo& a_io)
64 std::string fname(a_path +
"xmsng_StamperIo.txt");
65 std::ifstream is(fname.c_str());
72 std::ofstream outFile(a_path +
"StamperIo_out.txt");
80 static void iOutputToFile(
const std::string& a_fileName,
const XmStamperIo &a_io)
82 std::ofstream ofs(a_fileName);
88 static void iDoTest(
const std::string& a_relPath)
90 std::string path(XMS_TEST_PATH);
91 path +=
"stamping/" + a_relPath;
93 iBuildStamperIo(path, io);
96 std::string baseFile(path +
"xmsng_base.txt");
97 std::string outFile(path +
"xmsng_out.txt");
98 iOutputToFile(outFile, io);
99 std::string outTin(path +
"tin_out.tin");
103 os.open(outTin.c_str(), std::fstream::out);
116 iDoTest(
"test_WingWall01/");
123 iDoTest(
"test_WingWall02/");
130 iDoTest(
"test_WingWall03/");
137 iDoTest(
"test_wingWall04_cut/");
144 iDoTest(
"test_SlopedAbutment01/");
151 iDoTest(
"test_SlopedAbutment02/");
158 iDoTest(
"test_SlopedAbutment03/");
165 iDoTest(
"test_SlopedAbutment04_cut/");
172 std::string path(XMS_TEST_PATH);
173 path +=
"/stamping/test_intersections/";
175 iBuildStamperIo(path, io);
182 "---Intersection found in stamp outputs. Stamping operation aborted.\n\n");
190 iDoTest(
"test_GuideBank01/");
198 iDoTest(
"test_GuideBank02/");
205 iDoTest(
"test_GuideBank03/");
212 iDoTest(
"test_GuideBank04/");
219 iDoTest(
"test_GuideBank05/");
226 iDoTest(
"test_GuideBank06/");
233 iDoTest(
"test_GuideBank07/");
240 iDoTest(
"test_GuideBank08_cut/");
248 iDoTest(
"test_intersectBathymetry01/");
255 iDoTest(
"test_intersectBathymetry02/");
263 iDoTest(
"test_intersectBathymetry03/");
270 iDoTest(
"test_intersectBathymetry04/");
277 iDoTest(
"test_intersectBathymetry05/");
285 iDoTest(
"test_intersectBathymetry06/");
293 iDoTest(
"test_intersectBathymetry07/");
301 iDoTest(
"test_intersectBathymetry08/");
310 iDoTest(
"test_intersectBathymetry09/");
319 iDoTest(
"test_intersectBathymetry10/");
326 std::vector<double> rasterVals = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
330 TS_ASSERT_EQUALS(lastCell, 5);
331 TS_ASSERT_EQUALS(raster.
m_vals[lastCell], 5.0);
static BSHP< XmStamper > New()
Creates a XmStamper class.
VecInt2d m_outBreakLines
break lines that are honored in the TIN
int GetCellIndexFromColRow(const int a_col, const int a_row) const
Gets the zero-based cell index from the given column and row.
bool ReadFromFile(std::ifstream &a_file)
Reads the XmStamperIo class information from a file.
#define XM_ENSURE_TRUE(...)
std::vector< double > m_vals
Stamping inputs/outputs class.
void WriteToFile(std::ofstream &a_file, const std::string &a_cardName) const
Writes the XmStamperIo class information to a file.
bool stEqualNoCase(const std::string &a, const std::string &b)
Raster defined using a non-rotated cartesian axis for use in XmStamper.