mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Hopefully a fix of https://github.com/prusa3d/Slic3r/issues/11
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:
@@ -9,7 +9,12 @@
|
||||
%package{Slic3r::Geometry};
|
||||
|
||||
Pointfs arrange(size_t total_parts, Pointf* part, coordf_t dist, BoundingBoxf* bb = NULL)
|
||||
%code{% RETVAL = Slic3r::Geometry::arrange(total_parts, *part, dist, bb); %};
|
||||
%code{%
|
||||
Pointfs points;
|
||||
if (! Slic3r::Geometry::arrange(total_parts, *part, dist, bb, points))
|
||||
CONFESS(PRINTF_ZU " parts won't fit in your print area!\n", total_parts);
|
||||
RETVAL = points;
|
||||
%};
|
||||
|
||||
%{
|
||||
|
||||
|
||||
@@ -66,8 +66,7 @@
|
||||
ModelObjectPtrs* objects()
|
||||
%code%{ RETVAL = &THIS->objects; %};
|
||||
|
||||
Pointfs _arrange(Pointfs sizes, double dist, BoundingBoxf* bb = NULL);
|
||||
void arrange_objects(double dist, BoundingBoxf* bb = NULL);
|
||||
bool arrange_objects(double dist, BoundingBoxf* bb = NULL);
|
||||
void duplicate(unsigned int copies_num, double dist, BoundingBoxf* bb = NULL);
|
||||
void duplicate_objects(unsigned int copies_num, double dist, BoundingBoxf* bb = NULL);
|
||||
void duplicate_objects_grid(unsigned int x, unsigned int y, double dist);
|
||||
|
||||
Reference in New Issue
Block a user