mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH: support exclude objects for klipper printer
Thanks OrcaSlicer. This is just function for klipper printer. NEVER used for BBL printer. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: I910abceb67f4dcb4260f74f5dd1b4fb614812670
This commit is contained in:
parent
0daca9d329
commit
e567afdcb5
11 changed files with 146 additions and 5 deletions
|
@ -1384,6 +1384,16 @@ BoundingBoxf3 ModelObject::instance_bounding_box(size_t instance_idx, bool dont_
|
|||
return bb;
|
||||
}
|
||||
|
||||
BoundingBoxf3 ModelObject::instance_bounding_box(const ModelInstance& instance, bool dont_translate) const {
|
||||
BoundingBoxf3 bbox;
|
||||
const auto& inst_mat = instance.get_transformation().get_matrix(dont_translate);
|
||||
for (auto vol : this->volumes) {
|
||||
if (vol->is_model_part())
|
||||
bbox.merge(vol->mesh().transformed_bounding_box(inst_mat * vol->get_matrix()));
|
||||
}
|
||||
return bbox;
|
||||
}
|
||||
|
||||
//BBS: add convex bounding box
|
||||
BoundingBoxf3 ModelObject::instance_convex_hull_bounding_box(size_t instance_idx, bool dont_translate) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue