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

@ -26,7 +26,11 @@ double deg2rad(double angle);
void simplify_polygons(const Polygons &polygons, double tolerance, Polygons* retval);
double linint(double value, double oldmin, double oldmax, double newmin, double newmax);
Pointfs arrange(size_t num_parts, const Pointf &part_size, coordf_t gap, const BoundingBoxf* bed_bounding_box);
bool arrange(
// input
size_t num_parts, const Pointf &part_size, coordf_t gap, const BoundingBoxf* bed_bounding_box,
// output
Pointfs &positions);
class MedialAxis {
public: