mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Tech ENABLE_SEQUENTIAL_LIMITS set as default
This commit is contained in:
parent
e6c361ec5e
commit
c61785f775
18 changed files with 6 additions and 668 deletions
|
@ -352,18 +352,12 @@ bool Print::has_brim() const
|
|||
return std::any_of(m_objects.begin(), m_objects.end(), [](PrintObject *object) { return object->has_brim(); });
|
||||
}
|
||||
|
||||
#if ENABLE_SEQUENTIAL_LIMITS
|
||||
bool Print::sequential_print_horizontal_clearance_valid(const Print& print, Polygons* polygons)
|
||||
#else
|
||||
static inline bool sequential_print_horizontal_clearance_valid(const Print &print)
|
||||
#endif // ENABLE_SEQUENTIAL_LIMITS
|
||||
{
|
||||
Polygons convex_hulls_other;
|
||||
#if ENABLE_SEQUENTIAL_LIMITS
|
||||
if (polygons != nullptr)
|
||||
polygons->clear();
|
||||
std::vector<size_t> intersecting_idxs;
|
||||
#endif // ENABLE_SEQUENTIAL_LIMITS
|
||||
|
||||
std::map<ObjectID, Polygon> map_model_object_to_convex_hull;
|
||||
for (const PrintObject *print_object : print.objects()) {
|
||||
|
@ -408,7 +402,6 @@ static inline bool sequential_print_horizontal_clearance_valid(const Print &prin
|
|||
// instance.shift is a position of a centered object, while model object may not be centered.
|
||||
// Convert the shift from the PrintObject's coordinates into ModelObject's coordinates by removing the centering offset.
|
||||
convex_hull.translate(instance.shift - print_object->center_offset());
|
||||
#if ENABLE_SEQUENTIAL_LIMITS
|
||||
// if output needed, collect indices (inside convex_hulls_other) of intersecting hulls
|
||||
for (size_t i = 0; i < convex_hulls_other.size(); ++i) {
|
||||
if (!intersection((Polygons)convex_hulls_other[i], (Polygons)convex_hull).empty()) {
|
||||
|
@ -420,15 +413,10 @@ static inline bool sequential_print_horizontal_clearance_valid(const Print &prin
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (!intersection(convex_hulls_other, (Polygons)convex_hull).empty())
|
||||
return false;
|
||||
#endif // ENABLE_SEQUENTIAL_LIMITS
|
||||
convex_hulls_other.emplace_back(std::move(convex_hull));
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_SEQUENTIAL_LIMITS
|
||||
if (!intersecting_idxs.empty()) {
|
||||
// use collected indices (inside convex_hulls_other) to update output
|
||||
std::sort(intersecting_idxs.begin(), intersecting_idxs.end());
|
||||
|
@ -438,7 +426,6 @@ static inline bool sequential_print_horizontal_clearance_valid(const Print &prin
|
|||
}
|
||||
return false;
|
||||
}
|
||||
#endif // ENABLE_SEQUENTIAL_LIMITS
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -583,9 +583,7 @@ public:
|
|||
const PrintRegion& get_print_region(size_t idx) const { return *m_print_regions[idx]; }
|
||||
const ToolOrdering& get_tool_ordering() const { return m_wipe_tower_data.tool_ordering; }
|
||||
|
||||
#if ENABLE_SEQUENTIAL_LIMITS
|
||||
static bool sequential_print_horizontal_clearance_valid(const Print& print, Polygons* polygons = nullptr);
|
||||
#endif // ENABLE_SEQUENTIAL_LIMITS
|
||||
|
||||
protected:
|
||||
// Invalidates the step, and its depending steps in Print.
|
||||
|
|
|
@ -66,8 +66,6 @@
|
|||
// Enable to push object instances under the bed
|
||||
#define ENABLE_ALLOW_NEGATIVE_Z (1 && ENABLE_2_4_0_ALPHA0)
|
||||
#define DISABLE_ALLOW_NEGATIVE_Z_FOR_SLA (1 && ENABLE_ALLOW_NEGATIVE_Z)
|
||||
// Enable visualization of objects clearance for sequential prints
|
||||
#define ENABLE_SEQUENTIAL_LIMITS (1 && ENABLE_2_4_0_ALPHA0)
|
||||
// Enable delayed rendering of transparent volumes
|
||||
#define ENABLE_DELAYED_TRANSPARENT_VOLUMES_RENDERING (1 && ENABLE_2_4_0_ALPHA0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue