mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 08:52:01 +08:00
Draw clearance area if necessary.
This commit is contained in:
parent
50f1b40fa2
commit
0726e896ce
@ -134,6 +134,16 @@ void Plate2D::repaint(wxPaintEvent& e) {
|
||||
for (const auto& points : obj.instance_thumbnails.back().expolygons) {
|
||||
auto poly { this->scaled_points_to_pixel(Polygon(points), true) };
|
||||
dc->DrawPolygon(poly.size(), poly.data(), 0, 0);
|
||||
// TODO draw bounding box if that debug option is turned on.
|
||||
|
||||
// if sequential printing is enabled and more than one object, draw clearance area
|
||||
if (this->config->get<ConfigOptionBool>("complete_objects") &&
|
||||
std::count_if(this->model->objects.cbegin(), this->model->objects.cend(), [](const ModelObject* o){ return o->instances.size() > 0; }) > 1) {
|
||||
auto clearance {offset(thumbnail.convex_hull(), (scale_(this->config->get<ConfigOptionFloat>("extruder_clearance_radius")) / 2.0), 1.0, ClipperLib::jtRound, scale_(0.1))};
|
||||
dc->SetPen(this->clearance_pen);
|
||||
dc->SetBrush(this->transparent_brush);
|
||||
auto poly { this->scaled_points_to_pixel(Polygon(clearance.front()), true) };
|
||||
dc->DrawPolygon(poly.size(), poly.data(), 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user