mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
FIX: the convexhull of first layer is wrong during making skrit
to avoid integer overflow during the polygon operations in make_brim(), plateoffset is applied during gcode generation. This results in a wrong first layer convexhull "m_first_layer_convex_hull" which is used in _make_skrit(). This patch fixs this issue. JIRA: https://jira.bambooolab.com/browse/STUDIO-3719 Change-Id: Icfe21f4dbab05cc9e1c6f668791a62f954c2e0e5 (cherry picked from commit 6286b3e447b7ac7cbc061dca435091094783f74b)
This commit is contained in:
parent
c52365cec3
commit
7430700b8e
2 changed files with 8 additions and 1 deletions
|
@ -1622,6 +1622,13 @@ void make_brim(const Print& print, PrintTryCancel try_cancel, Polygons& islands_
|
||||||
}
|
}
|
||||||
|
|
||||||
islands_area = to_polygons(islands_area_ex);
|
islands_area = to_polygons(islands_area_ex);
|
||||||
|
|
||||||
|
// BBS: plate offset is applied
|
||||||
|
const Vec3d plate_offset = print.get_plate_origin();
|
||||||
|
Point plate_shift = Point(scaled(plate_offset.x()), scaled(plate_offset.y()));
|
||||||
|
for (size_t iia = 0; iia < islands_area.size(); ++iia)
|
||||||
|
islands_area[iia].translate(plate_shift);
|
||||||
|
|
||||||
for (auto iter = brimAreaMap.begin(); iter != brimAreaMap.end(); ++iter) {
|
for (auto iter = brimAreaMap.begin(); iter != brimAreaMap.end(); ++iter) {
|
||||||
if (!iter->second.empty()) {
|
if (!iter->second.empty()) {
|
||||||
brimMap.insert(std::make_pair(iter->first, makeBrimInfill(iter->second, print, islands_area)));
|
brimMap.insert(std::make_pair(iter->first, makeBrimInfill(iter->second, print, islands_area)));
|
||||||
|
|
|
@ -1731,7 +1731,7 @@ void Print::process(bool use_cache)
|
||||||
// BBS: m_brimMap and m_supportBrimMap are used instead of m_brim to generate brim of objs and supports seperately
|
// BBS: m_brimMap and m_supportBrimMap are used instead of m_brim to generate brim of objs and supports seperately
|
||||||
m_brimMap.clear();
|
m_brimMap.clear();
|
||||||
m_supportBrimMap.clear();
|
m_supportBrimMap.clear();
|
||||||
m_first_layer_convex_hull.points.clear();
|
m_first_layer_convex_hull.points.clear(); // BBS: plate offset is contained in this convexhull
|
||||||
if (this->has_brim()) {
|
if (this->has_brim()) {
|
||||||
Polygons islands_area;
|
Polygons islands_area;
|
||||||
make_brim(*this, this->make_try_cancel(), islands_area, m_brimMap,
|
make_brim(*this, this->make_try_cancel(), islands_area, m_brimMap,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue