mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 19:05:54 +08:00
Fixed bug in polygon test within printable area - the test is going to be removed anyway.
This commit is contained in:
parent
edc82445f5
commit
6480d8cf12
@ -237,7 +237,7 @@ bool check_ScheduledObjectsForSequentialPrintability(const SolverConfiguration
|
|||||||
const auto& flat_index = flat_index_map.find(scheduled_object.id)->second;
|
const auto& flat_index = flat_index_map.find(scheduled_object.id)->second;
|
||||||
|
|
||||||
assert(!objects_to_print[flat_index].pgns_at_height.empty());
|
assert(!objects_to_print[flat_index].pgns_at_height.empty());
|
||||||
|
|
||||||
if (!check_PolygonPositionWithinPlate(solver_configuration,
|
if (!check_PolygonPositionWithinPlate(solver_configuration,
|
||||||
SEQ_SLICER_SCALE_FACTOR,
|
SEQ_SLICER_SCALE_FACTOR,
|
||||||
scheduled_object.x,
|
scheduled_object.x,
|
||||||
@ -286,6 +286,7 @@ bool check_ScheduledObjectsForSequentialPrintability(const SolverConfiguration
|
|||||||
printf("Line check ...\n");
|
printf("Line check ...\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!check_PolygonLineIntersections(dec_values_X,
|
if (!check_PolygonLineIntersections(dec_values_X,
|
||||||
dec_values_Y,
|
dec_values_Y,
|
||||||
dec_values_T,
|
dec_values_T,
|
||||||
|
@ -984,16 +984,18 @@ bool check_PolygonPositionWithinPlate(const SolverConfiguration &solver_configur
|
|||||||
printf("Y: %d\n", solver_configuration.y_plate_bounding_box_size * scale_factor);
|
printf("Y: %d\n", solver_configuration.y_plate_bounding_box_size * scale_factor);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (x + polygon_box.min.x() < solver_configuration.plate_bounding_box.min.x() * scale_factor || x + polygon_box.max.x() > solver_configuration.plate_bounding_box.max.x() * scale_factor)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (y + polygon_box.min.y() < solver_configuration.plate_bounding_box.min.y() * scale_factor || y + polygon_box.max.y() > solver_configuration.plate_bounding_box.max.y() * scale_factor)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (solver_configuration.plate_bounding_polygon.points.size() == 0)
|
||||||
|
{
|
||||||
|
if (x + polygon_box.min.x() < solver_configuration.plate_bounding_box.min.x() * scale_factor || x + polygon_box.max.x() > solver_configuration.plate_bounding_box.max.x() * scale_factor)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (y + polygon_box.min.y() < solver_configuration.plate_bounding_box.min.y() * scale_factor || y + polygon_box.max.y() > solver_configuration.plate_bounding_box.max.y() * scale_factor)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Polygon plate_polygon = solver_configuration.plate_bounding_polygon;
|
Polygon plate_polygon = solver_configuration.plate_bounding_polygon;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user