mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06: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:
parent
3fc57ba8d8
commit
6217622865
7 changed files with 35 additions and 20 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue