mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 16:27:54 -06:00
Fix some rotation-related issues (#3890)
* Fix issue with max_z after rotation * Don't use `object.bounding_box()`, use `bounding_box_exact()` instead. * Fix auto-orient --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
d1eea4c677
commit
73ab032e82
12 changed files with 186 additions and 137 deletions
|
@ -108,6 +108,7 @@ PrintObject::PrintObject(Print* print, ModelObject* model_object, const Transfor
|
|||
m_center_offset = Point::new_scale(bbox_center.x(), bbox_center.y());
|
||||
// Size of the transformed mesh. This bounding may not be snug in XY plane, but it is snug in Z.
|
||||
m_size = (bbox.size() * (1. / SCALING_FACTOR)).cast<coord_t>();
|
||||
m_size.z() = coord_t(model_object->max_z() * (1. / SCALING_FACTOR));
|
||||
|
||||
this->set_instances(std::move(instances));
|
||||
}
|
||||
|
@ -2932,7 +2933,7 @@ void PrintObject::update_slicing_parameters()
|
|||
{
|
||||
if (!m_slicing_params.valid)
|
||||
m_slicing_params = SlicingParameters::create_from_config(
|
||||
this->print()->config(), m_config, this->model_object()->bounding_box().max.z(), this->object_extruders());
|
||||
this->print()->config(), m_config, this->model_object()->max_z(), this->object_extruders());
|
||||
}
|
||||
|
||||
SlicingParameters PrintObject::slicing_parameters(const DynamicPrintConfig& full_config, const ModelObject& model_object, float object_max_z)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue