Fixes after merge with master.

This commit is contained in:
tamasmeszaros 2019-07-17 18:10:08 +02:00
parent a695dec51a
commit 6949543912
3 changed files with 17 additions and 9 deletions

View File

@ -1992,4 +1992,4 @@ CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::ObjectBase, Slic3r::ModelObject)
CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::ObjectBase, Slic3r::ModelVolume) CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::ObjectBase, Slic3r::ModelVolume)
CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::ObjectBase, Slic3r::ModelInstance) CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::ObjectBase, Slic3r::ModelInstance)
CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::ObjectBase, Slic3r::Model) CEREAL_REGISTER_POLYMORPHIC_RELATION(Slic3r::ObjectBase, Slic3r::Model)
#endif #endif

View File

@ -623,10 +623,18 @@ private:
ModelObject* object; ModelObject* object;
// Constructor, which assigns a new unique ID. // Constructor, which assigns a new unique ID.
explicit ModelInstance(ModelObject *object) : object(object), print_volume_state(PVS_Inside) { assert(this->id().valid()); } explicit ModelInstance(ModelObject *object) : print_volume_state(PVS_Inside), object(object)
{
assert(this->id().valid());
get_arrange_polygon(); // initialize the cache
}
// Constructor, which assigns a new unique ID. // Constructor, which assigns a new unique ID.
explicit ModelInstance(ModelObject *object, const ModelInstance &other) : explicit ModelInstance(ModelObject *object, const ModelInstance &other) :
m_transformation(other.m_transformation), object(object), print_volume_state(PVS_Inside) { assert(this->id().valid() && this->id() != other.id()); } m_transformation(other.m_transformation), print_volume_state(PVS_Inside), object(object)
{
assert(this->id().valid() && this->id() != other.id());
get_arrange_polygon(); // initialize the cache
}
explicit ModelInstance(ModelInstance &&rhs) = delete; explicit ModelInstance(ModelInstance &&rhs) = delete;
ModelInstance& operator=(const ModelInstance &rhs) = delete; ModelInstance& operator=(const ModelInstance &rhs) = delete;
@ -641,10 +649,10 @@ private:
} }
// Warning! This object is not guarded against concurrency. // Warning! This object is not guarded against concurrency.
// mutable struct ArrangeCache { mutable struct ArrangeCache {
// bool valid = false; bool valid = false;
// ExPolygon poly; ExPolygon poly;
// } m_arrange_cache; } m_arrange_cache;
}; };
// The print bed content. // The print bed content.

View File

@ -3410,9 +3410,9 @@ GLCanvas3D::WipeTowerInfo GLCanvas3D::get_wipe_tower_info() const
if (vol->is_wipe_tower) { if (vol->is_wipe_tower) {
wti.m_pos = Vec2d(m_config->opt_float("wipe_tower_x"), wti.m_pos = Vec2d(m_config->opt_float("wipe_tower_x"),
m_config->opt_float("wipe_tower_y")); m_config->opt_float("wipe_tower_y"));
wti.rotation = (M_PI/180.) * m_config->opt_float("wipe_tower_rotation_angle"); wti.m_rotation = (M_PI/180.) * m_config->opt_float("wipe_tower_rotation_angle");
const BoundingBoxf3& bb = vol->bounding_box(); const BoundingBoxf3& bb = vol->bounding_box();
wti.bb_size = Vec2d(bb.size()(0), bb.size()(1)); wti.m_bb_size = Vec2d(bb.size().x(), bb.size().y());
break; break;
} }
} }