mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 01:22:37 -07:00
Tech ENABLE_ALLOW_NEGATIVE_Z -> ModelObject::convex_hull_2d() and sequential_print_horizontal_clearance_valid() modified to take in account for sinking instances
This commit is contained in:
@@ -901,13 +901,19 @@ Polygon ModelObject::convex_hull_2d(const Transform3d &trafo_instance) const
|
||||
for (const stl_facet &facet : stl.facet_start)
|
||||
for (size_t j = 0; j < 3; ++ j) {
|
||||
Vec3d p = trafo * facet.vertex[j].cast<double>();
|
||||
pts.emplace_back(coord_t(scale_(p.x())), coord_t(scale_(p.y())));
|
||||
#if ENABLE_ALLOW_NEGATIVE_Z
|
||||
if (p.z() >= 0.0)
|
||||
#endif // ENABLE_ALLOW_NEGATIVE_Z
|
||||
pts.emplace_back(coord_t(scale_(p.x())), coord_t(scale_(p.y())));
|
||||
}
|
||||
} else {
|
||||
// Using the shared vertices should be a bit quicker than using the STL faces.
|
||||
for (size_t i = 0; i < its.vertices.size(); ++ i) {
|
||||
Vec3d p = trafo * its.vertices[i].cast<double>();
|
||||
pts.emplace_back(coord_t(scale_(p.x())), coord_t(scale_(p.y())));
|
||||
#if ENABLE_ALLOW_NEGATIVE_Z
|
||||
if (p.z() >= 0.0)
|
||||
#endif // ENABLE_ALLOW_NEGATIVE_Z
|
||||
pts.emplace_back(coord_t(scale_(p.x())), coord_t(scale_(p.y())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user