mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 01:25:59 +08:00
Added object gluing across beds for scheduling of individual beds.
This commit is contained in:
parent
1259d59098
commit
c1bef5eae0
@ -133,7 +133,7 @@ struct ScheduledPlate {
|
|||||||
bool check_ScheduledObjectsForSequentialPrintability(const SolverConfiguration &solver_configuration,
|
bool check_ScheduledObjectsForSequentialPrintability(const SolverConfiguration &solver_configuration,
|
||||||
const PrinterGeometry &printer_geometry,
|
const PrinterGeometry &printer_geometry,
|
||||||
const std::vector<ObjectToPrint> &objects_to_print,
|
const std::vector<ObjectToPrint> &objects_to_print,
|
||||||
const std::vector<ScheduledPlate> &scheduled_plates);
|
const std::vector<ScheduledPlate> &scheduled_plates);
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------*/
|
/*----------------------------------------------------------------*/
|
||||||
@ -147,18 +147,26 @@ bool check_ScheduledObjectsForSequentialPrintability(const SolverConfiguration
|
|||||||
is unable to scedule even single object on the plate. The latter case
|
is unable to scedule even single object on the plate. The latter case
|
||||||
is detected by timeout and should not normally happen. These failures
|
is detected by timeout and should not normally happen. These failures
|
||||||
are reported via exceptions.
|
are reported via exceptions.
|
||||||
|
|
||||||
|
The trans_bed_glue parameter should be set to false when scheduling
|
||||||
|
all objects. If only objects on a separate bed are scheduled, then
|
||||||
|
trans_bed_glue should be set to true when there is an object on the
|
||||||
|
previous bed that is temporally glued to the first scheduled object.
|
||||||
|
In such a case, the first object will be scheduled as first temporally.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
std::vector<ScheduledPlate> schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
std::vector<ScheduledPlate> schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
||||||
const PrinterGeometry &printer_geometry,
|
const PrinterGeometry &printer_geometry,
|
||||||
const std::vector<ObjectToPrint> &objects_to_print,
|
const std::vector<ObjectToPrint> &objects_to_print,
|
||||||
std::function<void(int)> progress_callback = [](int progress){});
|
std::function<void(int)> progress_callback = [](int progress){},
|
||||||
|
bool trans_bed_glue = false);
|
||||||
|
|
||||||
void schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
void schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
||||||
const PrinterGeometry &printer_geometry,
|
const PrinterGeometry &printer_geometry,
|
||||||
const std::vector<ObjectToPrint> &objects_to_print,
|
const std::vector<ObjectToPrint> &objects_to_print,
|
||||||
std::vector<ScheduledPlate> &scheduled_plates,
|
std::vector<ScheduledPlate> &scheduled_plates,
|
||||||
std::function<void(int)> progress_callback = [](int progress){});
|
std::function<void(int)> progress_callback = [](int progress){},
|
||||||
|
bool trans_bed_glue = false);
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------*/
|
/*----------------------------------------------------------------*/
|
||||||
@ -169,7 +177,8 @@ void schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver
|
|||||||
int schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
int schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
||||||
const std::vector<ObjectToPrint> &objects_to_print,
|
const std::vector<ObjectToPrint> &objects_to_print,
|
||||||
std::vector<ScheduledPlate> &scheduled_plates,
|
std::vector<ScheduledPlate> &scheduled_plates,
|
||||||
std::function<void(int)> progress_callback = [](int progress){});
|
std::function<void(int)> progress_callback = [](int progress){},
|
||||||
|
bool trans_bed_glue = false);
|
||||||
|
|
||||||
void setup_ExtruderUnreachableZones(const SolverConfiguration &solver_configuration,
|
void setup_ExtruderUnreachableZones(const SolverConfiguration &solver_configuration,
|
||||||
std::vector<std::vector<Slic3r::Polygon> > &convex_unreachable_zones,
|
std::vector<std::vector<Slic3r::Polygon> > &convex_unreachable_zones,
|
||||||
@ -180,7 +189,8 @@ int schedule_ObjectsForSequentialPrint(const SolverConfiguration
|
|||||||
const std::vector<std::vector<Slic3r::Polygon> > &convex_unreachable_zones,
|
const std::vector<std::vector<Slic3r::Polygon> > &convex_unreachable_zones,
|
||||||
const std::vector<std::vector<Slic3r::Polygon> > &box_unreachable_zones,
|
const std::vector<std::vector<Slic3r::Polygon> > &box_unreachable_zones,
|
||||||
std::vector<ScheduledPlate> &scheduled_plates,
|
std::vector<ScheduledPlate> &scheduled_plates,
|
||||||
std::function<void(int)> progress_callback = [](int progress){});
|
std::function<void(int)> progress_callback = [](int progress){},
|
||||||
|
bool trans_bed_glue = false);
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------*/
|
/*----------------------------------------------------------------*/
|
||||||
|
@ -319,7 +319,8 @@ bool check_ScheduledObjectsForSequentialPrintability(const SolverConfiguration
|
|||||||
std::vector<ScheduledPlate> schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
std::vector<ScheduledPlate> schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
||||||
const PrinterGeometry &printer_geometry,
|
const PrinterGeometry &printer_geometry,
|
||||||
const std::vector<ObjectToPrint> &objects_to_print,
|
const std::vector<ObjectToPrint> &objects_to_print,
|
||||||
std::function<void(int)> progress_callback)
|
std::function<void(int)> progress_callback,
|
||||||
|
bool trans_bed_glue)
|
||||||
{
|
{
|
||||||
std::vector<ScheduledPlate> scheduled_plates;
|
std::vector<ScheduledPlate> scheduled_plates;
|
||||||
|
|
||||||
@ -327,7 +328,8 @@ std::vector<ScheduledPlate> schedule_ObjectsForSequentialPrint(const SolverConfi
|
|||||||
printer_geometry,
|
printer_geometry,
|
||||||
objects_to_print,
|
objects_to_print,
|
||||||
scheduled_plates,
|
scheduled_plates,
|
||||||
progress_callback);
|
progress_callback,
|
||||||
|
trans_bed_glue);
|
||||||
return scheduled_plates;
|
return scheduled_plates;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +351,8 @@ void schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver
|
|||||||
const PrinterGeometry &printer_geometry,
|
const PrinterGeometry &printer_geometry,
|
||||||
const std::vector<ObjectToPrint> &objects_to_print,
|
const std::vector<ObjectToPrint> &objects_to_print,
|
||||||
std::vector<ScheduledPlate> &scheduled_plates,
|
std::vector<ScheduledPlate> &scheduled_plates,
|
||||||
std::function<void(int)> progress_callback)
|
std::function<void(int)> progress_callback,
|
||||||
|
bool trans_bed_glue)
|
||||||
{
|
{
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
clock_t start, finish;
|
clock_t start, finish;
|
||||||
@ -421,7 +424,7 @@ void schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver
|
|||||||
int progress_object_phases_done = 0;
|
int progress_object_phases_done = 0;
|
||||||
int progress_object_phases_total = SEQ_MAKE_EXTRA_PROGRESS((objects_to_print.size() * SEQ_PROGRESS_PHASES_PER_OBJECT));
|
int progress_object_phases_total = SEQ_MAKE_EXTRA_PROGRESS((objects_to_print.size() * SEQ_PROGRESS_PHASES_PER_OBJECT));
|
||||||
|
|
||||||
bool trans_bed_lepox = false;
|
bool trans_bed_lepox = trans_bed_glue;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -484,6 +487,7 @@ void schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver
|
|||||||
if (solvable_objects[i].lepox_to_next && !is_scheduled(i + 1, decided_polygons))
|
if (solvable_objects[i].lepox_to_next && !is_scheduled(i + 1, decided_polygons))
|
||||||
{
|
{
|
||||||
split = true;
|
split = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (split)
|
if (split)
|
||||||
@ -587,7 +591,8 @@ void schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver
|
|||||||
int schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
int schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_configuration,
|
||||||
const std::vector<ObjectToPrint> &objects_to_print,
|
const std::vector<ObjectToPrint> &objects_to_print,
|
||||||
std::vector<ScheduledPlate> &scheduled_plates,
|
std::vector<ScheduledPlate> &scheduled_plates,
|
||||||
std::function<void(int)> progress_callback)
|
std::function<void(int)> progress_callback,
|
||||||
|
bool trans_bed_glue)
|
||||||
{
|
{
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
clock_t start, finish;
|
clock_t start, finish;
|
||||||
@ -837,7 +842,7 @@ int schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_
|
|||||||
int progress_object_phases_done = 0;
|
int progress_object_phases_done = 0;
|
||||||
int progress_object_phases_total = SEQ_MAKE_EXTRA_PROGRESS((objects_to_print.size() * SEQ_PROGRESS_PHASES_PER_OBJECT));
|
int progress_object_phases_total = SEQ_MAKE_EXTRA_PROGRESS((objects_to_print.size() * SEQ_PROGRESS_PHASES_PER_OBJECT));
|
||||||
|
|
||||||
bool trans_bed_lepox = false;
|
bool trans_bed_lepox = trans_bed_glue;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -900,6 +905,7 @@ int schedule_ObjectsForSequentialPrint(const SolverConfiguration &solver_
|
|||||||
if (solvable_objects[i].lepox_to_next && !is_scheduled(i + 1, decided_polygons))
|
if (solvable_objects[i].lepox_to_next && !is_scheduled(i + 1, decided_polygons))
|
||||||
{
|
{
|
||||||
split = true;
|
split = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (split)
|
if (split)
|
||||||
@ -1038,7 +1044,8 @@ int schedule_ObjectsForSequentialPrint(const SolverConfiguration
|
|||||||
const std::vector<std::vector<Slic3r::Polygon> > &convex_unreachable_zones,
|
const std::vector<std::vector<Slic3r::Polygon> > &convex_unreachable_zones,
|
||||||
const std::vector<std::vector<Slic3r::Polygon> > &box_unreachable_zones,
|
const std::vector<std::vector<Slic3r::Polygon> > &box_unreachable_zones,
|
||||||
std::vector<ScheduledPlate> &scheduled_plates,
|
std::vector<ScheduledPlate> &scheduled_plates,
|
||||||
std::function<void(int)> progress_callback)
|
std::function<void(int)> progress_callback,
|
||||||
|
bool trans_bed_glue)
|
||||||
{
|
{
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
clock_t start, finish;
|
clock_t start, finish;
|
||||||
@ -1174,7 +1181,7 @@ int schedule_ObjectsForSequentialPrint(const SolverConfiguration
|
|||||||
int progress_object_phases_done = 0;
|
int progress_object_phases_done = 0;
|
||||||
int progress_object_phases_total = SEQ_MAKE_EXTRA_PROGRESS((objects_to_print.size() * SEQ_PROGRESS_PHASES_PER_OBJECT));
|
int progress_object_phases_total = SEQ_MAKE_EXTRA_PROGRESS((objects_to_print.size() * SEQ_PROGRESS_PHASES_PER_OBJECT));
|
||||||
|
|
||||||
bool trans_bed_lepox = false;
|
bool trans_bed_lepox = trans_bed_glue;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -1238,6 +1245,7 @@ int schedule_ObjectsForSequentialPrint(const SolverConfiguration
|
|||||||
if (solvable_objects[i].lepox_to_next && !is_scheduled(i + 1, decided_polygons))
|
if (solvable_objects[i].lepox_to_next && !is_scheduled(i + 1, decided_polygons))
|
||||||
{
|
{
|
||||||
split = true;
|
split = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (split)
|
if (split)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user