Disable "brim" offset heuristic for sla objects

Fixes bug 1 in SPE-1824
This commit is contained in:
tamasmeszaros 2023-08-14 19:14:49 +02:00
parent 3455c8cc1a
commit 5b9d5b55b6

View File

@ -653,22 +653,6 @@ ExPolygons ArrangeableSLAPrintObject::full_envelope() const
Polygons ptmp = project_mesh(pmesh.its, trafo_instance, [] {});
ret = union_ex(ret, ptmp);
}
} else {
// The 1.1 multiplier is a safety gap, as the offset might be bigger
// in sharp edges of a polygon, depending on clipper's offset algorithm
coord_t pad_infl = 0;
{
double infl = m_po->config().pad_enable.getBool() *
(m_po->config().pad_brim_size.getFloat() +
m_po->config().pad_around_object.getBool() *
m_po->config().pad_object_gap.getFloat());
pad_infl = scaled(1.1 * infl);
}
if (pad_infl > 0) {
ret = offset_ex(ret, pad_infl);
}
}
return ret;
@ -722,22 +706,6 @@ Polygon ArrangeableSLAPrintObject::convex_envelope() const
polys.emplace_back(
its_convex_hull_2d_above(pmesh.its, trafo_instance, zlvl));
}
} else {
// The 1.1 multiplier is a safety gap, as the offset might be bigger
// in sharp edges of a polygon, depending on clipper's offset algorithm
coord_t pad_infl = 0;
{
double infl = m_po->config().pad_enable.getBool() *
(m_po->config().pad_brim_size.getFloat() +
m_po->config().pad_around_object.getBool() *
m_po->config().pad_object_gap.getFloat());
pad_infl = scaled(1.1 * infl);
}
if (pad_infl > 0) {
polys = offset(polys, pad_infl);
}
}
return Geometry::convex_hull(polys);