Replaced eval { die } construct with a bool return value indicating
success or failure of an automatic arrangement of parts on the print bed.

Don't know exactly what is happening here, but throwing a "die" inside
a XS function and then catching it inside an eval {} block is suspcious.
This commit is contained in:
bubnikv 2016-11-04 15:03:51 +01:00
parent 3fc57ba8d8
commit 6217622865
7 changed files with 35 additions and 20 deletions

View file

@ -64,8 +64,9 @@ public:
void translate(coordf_t x, coordf_t y, coordf_t z);
TriangleMesh mesh() const;
TriangleMesh raw_mesh() const;
Pointfs _arrange(const Pointfs &sizes, coordf_t dist, const BoundingBoxf* bb = NULL) const;
void arrange_objects(coordf_t dist, const BoundingBoxf* bb = NULL);
bool _arrange(const Pointfs &sizes, coordf_t dist, const BoundingBoxf* bb, Pointfs &out) const;
bool arrange_objects(coordf_t dist, const BoundingBoxf* bb = NULL);
// Croaks if the duplicated objects do not fit the print bed.
void duplicate(size_t copies_num, coordf_t dist, const BoundingBoxf* bb = NULL);
void duplicate_objects(size_t copies_num, coordf_t dist, const BoundingBoxf* bb = NULL);
void duplicate_objects_grid(size_t x, size_t y, coordf_t dist);