Fixed position of newly created modifiers
This commit is contained in:
parent
74f350c84e
commit
34cf541e0d
2 changed files with 7 additions and 3 deletions
|
@ -2248,9 +2248,12 @@ void GLCanvas3D::Selection::_ensure_on_bed()
|
||||||
for (unsigned int i : m_list)
|
for (unsigned int i : m_list)
|
||||||
{
|
{
|
||||||
GLVolume* volume = (*m_volumes)[i];
|
GLVolume* volume = (*m_volumes)[i];
|
||||||
double min_z = volume->transformed_convex_hull_bounding_box().min(2);
|
if (!volume->is_modifier)
|
||||||
if (min_z != 0.0)
|
{
|
||||||
volume->set_instance_offset(Z, volume->get_instance_offset(Z) - min_z);
|
double min_z = volume->transformed_convex_hull_bounding_box().min(2);
|
||||||
|
if (min_z != 0.0)
|
||||||
|
volume->set_instance_offset(Z, volume->get_instance_offset(Z) - min_z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // ENABLE_ENSURE_ON_BED_WHILE_SCALING
|
#endif // ENABLE_ENSURE_ON_BED_WHILE_SCALING
|
||||||
|
|
|
@ -814,6 +814,7 @@ void ObjectList::load_generic_subobject(const std::string& type_name, const int
|
||||||
new_volume->set_type(static_cast<ModelVolume::Type>(type));
|
new_volume->set_type(static_cast<ModelVolume::Type>(type));
|
||||||
|
|
||||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||||
|
new_volume->set_offset((*m_objects)[obj_idx]->origin_translation + Vec3d(0.0, 0.0, -mesh.stl.stats.min(2)));
|
||||||
new_volume->center_geometry();
|
new_volume->center_geometry();
|
||||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue