Test of importing non-standard ASCII STL (broken normals, junk

after the ending tags)
This commit is contained in:
bubnikv 2019-10-18 14:42:03 +02:00
parent 7a47784ddf
commit 6e6b137151
3 changed files with 95 additions and 1 deletions

View file

@ -44,6 +44,14 @@ SCENARIO("Reading an STL file", "[stl]") {
REQUIRE(is_approx(model.objects.front()->volumes.front()->mesh().size(), Vec3d(20, 20, 20)));
}
}
#endif
WHEN("nonstandard STL file (text after ending tags, invalid normals, for example infinities)") {
Slic3r::Model model;
THEN("load should succeed") {
REQUIRE(Slic3r::load_stl(stl_path("ASCII/20mmbox-nonstandard.stl").c_str(), &model));
REQUIRE(is_approx(model.objects.front()->volumes.front()->mesh().size(), Vec3d(20, 20, 20)));
}
}
}
}