Refactored admesh to get rid of the error and fp members of stl_file.

This commit is contained in:
bubnikv 2019-06-10 17:17:36 +02:00
parent 40b27e8332
commit a1c38794fb
12 changed files with 213 additions and 429 deletions

View file

@ -161,7 +161,6 @@ static void extract_model_from_archive(
else {
// Header has been extracted. Now read the faces.
stl_file &stl = mesh.stl;
stl.error = 0;
stl.stats.type = inmemory;
stl.stats.number_of_facets = header.nTriangles;
stl.stats.original_num_facets = header.nTriangles;

View file

@ -17,8 +17,7 @@ namespace Slic3r {
bool load_stl(const char *path, Model *model, const char *object_name_in)
{
TriangleMesh mesh;
mesh.ReadSTLFile(path);
if (mesh.stl.error) {
if (! mesh.ReadSTLFile(path)) {
// die "Failed to open $file\n" if !-e $path;
return false;
}