mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
support Klipper Exclude objects
natively.
Also remove fake slicer info
This commit is contained in:
parent
32d952587d
commit
22a24168e6
11 changed files with 141 additions and 34 deletions
|
@ -1286,18 +1286,21 @@ const BoundingBoxf3& ModelObject::raw_bounding_box() const
|
|||
}
|
||||
|
||||
// This returns an accurate snug bounding box of the transformed object instance, without the translation applied.
|
||||
BoundingBoxf3 ModelObject::instance_bounding_box(size_t instance_idx, bool dont_translate) const
|
||||
{
|
||||
BoundingBoxf3 bb;
|
||||
const Transform3d& inst_matrix = this->instances[instance_idx]->get_transformation().get_matrix(dont_translate);
|
||||
for (ModelVolume *v : this->volumes)
|
||||
{
|
||||
if (v->is_model_part())
|
||||
bb.merge(v->mesh().transformed_bounding_box(inst_matrix * v->get_matrix()));
|
||||
}
|
||||
return bb;
|
||||
BoundingBoxf3 ModelObject::instance_bounding_box(size_t instance_idx, bool dont_translate) const {
|
||||
return instance_bounding_box(*this->instances[instance_idx], dont_translate);
|
||||
}
|
||||
|
||||
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