mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-24 01:14:28 +08:00
Hacked height calculation when making object slices for sequential scheduling.
This commit is contained in:
parent
89758e9832
commit
dc8c53e82e
@ -77,7 +77,9 @@ static std::vector<Sequential::ObjectToPrint> get_objects_to_print(const Model&
|
||||
objects.emplace_back(Sequential::ObjectToPrint{int(inst_id == 0 ? mo->id().id : mi->id().id), inst_id + 1 < mo->instances.size(),
|
||||
scaled(mo->instance_bounding_box(inst_id).size().z()), {}});
|
||||
for (double height : heights) {
|
||||
Polygon pgn = its_convex_hull_2d_above(raw_mesh.its, mi->get_matrix_no_offset().cast<float>(), height);
|
||||
// It seems that zero level in the object instance is mi->get_offset().z(), however need to have bed as zero level,
|
||||
// hence substracting mi->get_offset().z() from height seems to be an easy hack
|
||||
Polygon pgn = its_convex_hull_2d_above(raw_mesh.its, mi->get_matrix_no_offset().cast<float>(), height - mi->get_offset().z());
|
||||
objects.back().pgns_at_height.emplace_back(std::make_pair(scaled(height), pgn));
|
||||
}
|
||||
++inst_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user