Merge remote-tracking branch 'origin/master' into tm_pad_speedup

This commit is contained in:
tamasmeszaros 2019-02-14 11:24:00 +01:00
commit baf2dede88
37 changed files with 1202 additions and 879 deletions

View file

@ -1333,6 +1333,8 @@ void Transformation::set_rotation(const Vec3d& rotation)
void Transformation::set_rotation(Axis axis, double rotation)
{
rotation = angle_to_0_2PI(rotation);
if (is_approx(std::abs(rotation), 2.0 * (double)PI))
rotation = 0.0;
if (m_rotation(axis) != rotation)
{

View file

@ -1445,7 +1445,7 @@ int ModelVolume::extruder_id() const
int extruder_id = -1;
if (this->is_model_part()) {
const ConfigOption *opt = this->config.option("extruder");
if (opt == nullptr)
if ((opt == nullptr) || (opt->getInt() == 0))
opt = this->object->config.option("extruder");
extruder_id = (opt == nullptr) ? 0 : opt->getInt();
}

View file

@ -1137,6 +1137,9 @@ std::string Print::validate() const
// Apply the same transformations we apply to the actual meshes when slicing them.
object->model_object()->instances.front()->transform_polygon(&convex_hull);
// Grow convex hull with the clearance margin.
// FIXME: Arrangement has different parameters for offsetting (jtMiter, limit 2)
// which causes that the warning will be showed after arrangement with the
// appropriate object distance. Even if I set this to jtMiter the warning still shows up.
convex_hull = offset(convex_hull, scale_(m_config.extruder_clearance_radius.value)/2, jtRound, scale_(0.1)).front();
// Now we check that no instance of convex_hull intersects any of the previously checked object instances.
for (const Point &copy : object->m_copies) {