Replaced CONFESS with throw std::exception in libslic3r, so now

libslic3r should be compilable without Perl.
This commit is contained in:
bubnikv 2018-09-18 10:09:58 +02:00
parent 27bba45331
commit 3ddaccb641
30 changed files with 261 additions and 246 deletions

View file

@ -340,7 +340,7 @@ void Model::duplicate(size_t copies_num, coordf_t dist, const BoundingBoxf* bb)
Pointfs model_sizes(copies_num-1, to_2d(this->bounding_box().size()));
Pointfs positions;
if (! _arrange(model_sizes, dist, bb, positions))
CONFESS("Cannot duplicate part as the resulting objects would not fit on the print bed.\n");
throw std::invalid_argument("Cannot duplicate part as the resulting objects would not fit on the print bed.\n");
// note that this will leave the object count unaltered
@ -671,7 +671,8 @@ BoundingBoxf3 ModelObject::raw_bounding_box() const
BoundingBoxf3 bb;
for (const ModelVolume *v : this->volumes)
if (v->is_model_part()) {
if (this->instances.empty()) CONFESS("Can't call raw_bounding_box() with no instances");
if (this->instances.empty())
throw std::invalid_argument("Can't call raw_bounding_box() with no instances");
bb.merge(this->instances.front()->transform_mesh_bounding_box(&v->mesh, true));
}
return bb;