Adjustment of the offset from the print bed STLs to their textures.
Changed the MK2.5 bed from MK2 to MK3.
This commit is contained in:
parent
8fd6194403
commit
5a707a66b9
1 changed files with 13 additions and 8 deletions
|
@ -513,15 +513,14 @@ GLCanvas3D::Bed::EType GLCanvas3D::Bed::_detect_type() const
|
||||||
{
|
{
|
||||||
if ((curr->vendor != nullptr) && (curr->vendor->name == "Prusa Research"))
|
if ((curr->vendor != nullptr) && (curr->vendor->name == "Prusa Research"))
|
||||||
{
|
{
|
||||||
if (boost::contains(curr->name, "MK2"))
|
if (boost::contains(curr->name, "MK3") || boost::contains(curr->name, "MK2.5"))
|
||||||
{
|
|
||||||
type = MK2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (boost::contains(curr->name, "MK3"))
|
|
||||||
{
|
{
|
||||||
type = MK3;
|
type = MK3;
|
||||||
break;
|
break;
|
||||||
|
} else if (boost::contains(curr->name, "MK2"))
|
||||||
|
{
|
||||||
|
type = MK2;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -590,8 +589,14 @@ void GLCanvas3D::Bed::_render_prusa(const std::string &key, float theta) const
|
||||||
if (theta <= 90.0f)
|
if (theta <= 90.0f)
|
||||||
{
|
{
|
||||||
filename = model_path + "_bed.stl";
|
filename = model_path + "_bed.stl";
|
||||||
if ((m_model.get_filename() != filename) && m_model.init_from_file(filename, useVBOs))
|
if ((m_model.get_filename() != filename) && m_model.init_from_file(filename, useVBOs)) {
|
||||||
m_model.center_around(m_bounding_box.center() - Vec3d(0.0, 0.0, 0.1 + 0.5 * m_model.get_bounding_box().size()(2)));
|
Vec3d offset = m_bounding_box.center() - Vec3d(0.0, 0.0, 0.1 + 0.5 * m_model.get_bounding_box().size()(2));
|
||||||
|
if (key == "mk2")
|
||||||
|
offset.y() += 15. / 2.;
|
||||||
|
else if (key == "mk3")
|
||||||
|
offset += Vec3d(0., (19. - 8.) / 2., 2.);
|
||||||
|
m_model.center_around(offset);
|
||||||
|
}
|
||||||
|
|
||||||
if (!m_model.get_filename().empty())
|
if (!m_model.get_filename().empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue