mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
Fix skirt and brim handling for duplicated objects (instances) (#14683)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "GCode/ThumbnailData.hpp"
|
||||
#include "GCode/GCodeProcessor.hpp"
|
||||
#include "MultiMaterialSegmentation.hpp"
|
||||
#include "ObjectID.hpp"
|
||||
#include "libslic3r.h"
|
||||
|
||||
#include <Eigen/Geometry>
|
||||
@@ -974,7 +975,7 @@ public:
|
||||
[object_id](const PrintObject *obj) { return obj->id() == object_id; });
|
||||
return (it == m_objects.end()) ? nullptr : *it;
|
||||
}
|
||||
//BBS: Function to get m_brimMap;
|
||||
// Orca: Old callers still expect object-keyed brim paths.
|
||||
std::map<ObjectID, ExtrusionEntityCollection>&
|
||||
get_brimMap() { return m_brimMap; }
|
||||
|
||||
@@ -989,11 +990,11 @@ public:
|
||||
struct SkirtBrimGroup {
|
||||
struct Brim {
|
||||
ExtrusionEntityCollection brim;
|
||||
std::vector<ObjectID> object_ids;
|
||||
std::vector<ObjectInstanceID> instances;
|
||||
};
|
||||
|
||||
ExtrusionEntityCollection skirt;
|
||||
std::vector<ObjectID> object_ids;
|
||||
std::vector<ObjectInstanceID> instances;
|
||||
// Brims stay separate unless Combine brims merges colliding brims inside this group.
|
||||
std::vector<Brim> brims;
|
||||
};
|
||||
@@ -1296,12 +1297,12 @@ private:
|
||||
ExtrusionEntityCollection m_skirt;
|
||||
std::vector<SkirtBrimGroup> m_skirt_brim_groups;
|
||||
bool m_has_shared_per_object_skirt { false };
|
||||
// BBS: collecting extrusion paths to build brim by objs
|
||||
// Orca: Object-keyed brim paths kept for existing code.
|
||||
std::map<ObjectID, ExtrusionEntityCollection> m_brimMap;
|
||||
std::map<ObjectID, ExtrusionEntityCollection> m_supportBrimMap;
|
||||
// Orca: cached occupied brim footprints used when grouping per-object skirts.
|
||||
std::map<ObjectID, ExPolygons> m_objectBrimAreas;
|
||||
std::map<ObjectID, ExPolygons> m_supportBrimAreas;
|
||||
// Orca: Actual brim paths keyed by object instance.
|
||||
std::map<ObjectInstanceID, ExtrusionEntityCollection> m_brimMapByInstance;
|
||||
// Orca: Translated brim areas keyed by instance, used to find touching brims.
|
||||
std::map<ObjectInstanceID, ExPolygons> m_objectBrimAreasByInstance;
|
||||
// Convex hull of the 1st layer extrusions.
|
||||
// It encompasses the object extrusions, support extrusions, skirt, brim, wipe tower.
|
||||
// It does NOT encompass user extrusions generated by custom G-code,
|
||||
|
||||
Reference in New Issue
Block a user