Merge remote-tracking branch 'origin/master' into pm_anchor_bridges_on_sparse_infill
This commit is contained in:
commit
b90e8eb6ec
14 changed files with 288 additions and 179 deletions
|
@ -91,7 +91,7 @@ PrintObject::PrintObject(Print* print, ModelObject* model_object, const Transfor
|
|||
Vec3d bbox_center = bbox.center();
|
||||
// We may need to rotate the bbox / bbox_center from the original instance to the current instance.
|
||||
double z_diff = Geometry::rotation_diff_z(model_object->instances.front()->get_matrix(), instances.front().model_instance->get_matrix());
|
||||
if (std::abs(z_diff) > EPSILON) {
|
||||
if (std::abs(z_diff) > EPSILON) {
|
||||
auto z_rot = Eigen::AngleAxisd(z_diff, Vec3d::UnitZ());
|
||||
bbox = bbox.transformed(Transform3d(z_rot));
|
||||
bbox_center = (z_rot * bbox_center).eval();
|
||||
|
@ -101,6 +101,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() = model_object->max_z();
|
||||
|
||||
this->set_instances(std::move(instances));
|
||||
}
|
||||
|
@ -2251,7 +2252,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