mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-20 01:12:09 +00:00
Refactor skirt and brim ownership and emission flow Refactor skirt and brim generation around a common object/group ownership model. Skirts and brims are now emitted as a coordinated preamble (skirt -> brim -> object) instead of being generated and emitted through multiple independent code paths. Changes: - Fix repeated skirt emission caused by the previous skirt state tracking logic. - Restore local skirt/brim ordering for per-object skirts in By Layer mode. - Emit brims together with their owning object or object group. - Handle combined brims independently from skirt grouping. - Handle draft shields through the same ownership model as skirts. - Fix draft shield generation when skirt height is zero. - Generate draft shields after brim geometry is known, preventing draft shields from overlapping brims. - Reject unsafe grouped per-object skirt configurations in By Object mode. - Remove legacy skirt emission paths and state-management workarounds. Support brim generation remains unchanged. Co-authored-by: SoftFever <softfeverever@gmail.com>
36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
#ifndef slic3r_Brim_hpp_
|
|
#define slic3r_Brim_hpp_
|
|
|
|
#include "ExPolygon.hpp"
|
|
#include "Point.hpp"
|
|
|
|
#include<map>
|
|
#include<vector>
|
|
|
|
namespace Slic3r {
|
|
|
|
class Print;
|
|
class ExtrusionEntityCollection;
|
|
class PrintTryCancel;
|
|
class ObjectID;
|
|
|
|
// Produce brim lines around those objects, that have the brim enabled.
|
|
// Collect islands_area to be merged into the final 1st layer convex hull.
|
|
void make_brim(const Print& print, PrintTryCancel try_cancel,
|
|
Polygons& islands_area, std::map<ObjectID, ExtrusionEntityCollection>& brimMap,
|
|
std::map<ObjectID, ExtrusionEntityCollection>& supportBrimMap,
|
|
std::vector<std::pair<ObjectID, unsigned int>>& objPrintVec,
|
|
std::vector<unsigned int>& printExtruders,
|
|
std::map<ObjectID, ExPolygons>* objectBrimAreasOut = nullptr,
|
|
std::map<ObjectID, ExPolygons>* supportBrimAreasOut = nullptr);
|
|
|
|
ExtrusionEntityCollection makeBrimInfill(const ExPolygons& singleBrimArea, const Print& print, const Polygons& islands_area);
|
|
ExtrusionEntityCollection makeBrimInfillFromPlateCoordinates(const ExPolygons& singleBrimArea, const Print& print, const Polygons& islands_area);
|
|
|
|
// BBS: automatically make brim
|
|
ExtrusionEntityCollection make_brim_auto(const Print &print, PrintTryCancel try_cancel, Polygons &islands_area);
|
|
|
|
} // Slic3r
|
|
|
|
#endif // slic3r_Brim_hpp_
|