Merge remote-tracking branch 'origin/eigenize' into sla_base_pool

This commit is contained in:
tamasmeszaros 2018-08-21 13:50:09 +02:00
commit 6e77307880
188 changed files with 3351 additions and 3305 deletions

View file

@ -540,9 +540,9 @@ bool Print::has_skirt() const
std::string Print::validate() const
{
BoundingBox bed_box_2D = get_extents(Polygon::new_scale(config.bed_shape.values));
BoundingBoxf3 print_volume(Pointf3(unscale(bed_box_2D.min.x), unscale(bed_box_2D.min.y), 0.0), Pointf3(unscale(bed_box_2D.max.x), unscale(bed_box_2D.max.y), config.max_print_height));
BoundingBoxf3 print_volume(Pointf3(unscale(bed_box_2D.min(0)), unscale(bed_box_2D.min(1)), 0.0), Pointf3(unscale(bed_box_2D.max(0)), unscale(bed_box_2D.max(1)), config.max_print_height));
// Allow the objects to protrude below the print bed, only the part of the object above the print bed will be sliced.
print_volume.min.z = -1e10;
print_volume.min(2) = -1e10;
unsigned int printable_count = 0;
for (PrintObject *po : this->objects) {
po->model_object()->check_instances_print_volume_state(print_volume);
@ -587,7 +587,7 @@ std::string Print::validate() const
{
std::vector<coord_t> object_height;
for (const PrintObject *object : this->objects)
object_height.insert(object_height.end(), object->copies().size(), object->size.z);
object_height.insert(object_height.end(), object->copies().size(), object->size(2));
std::sort(object_height.begin(), object_height.end());
// Ignore the tallest *copy* (this is why we repeat height for all of them):
// it will be printed as last one so its height doesn't matter.
@ -728,7 +728,7 @@ BoundingBox Print::bounding_box() const
for (const PrintObject *object : this->objects)
for (Point copy : object->_shifted_copies) {
bb.merge(copy);
copy.translate(object->size);
copy += object->size.xy();
bb.merge(copy);
}
return bb;
@ -904,7 +904,7 @@ void Print::_make_skirt()
for (const Point &shift : object->_shifted_copies) {
Points copy_points = object_points;
for (Point &pt : copy_points)
pt.translate(shift);
pt += shift;
append(points, copy_points);
}
}
@ -1056,7 +1056,7 @@ void Print::_make_wipe_tower()
m_wipe_tower_depth = 0.f;
// Get wiping matrix to get number of extruders and convert vector<double> to vector<float>:
std::vector<float> wiping_matrix((this->config.wiping_volumes_matrix.values).begin(),(this->config.wiping_volumes_matrix.values).end());
std::vector<float> wiping_matrix(cast<float>(this->config.wiping_volumes_matrix.values));
// Extract purging volumes for each extruder pair:
std::vector<std::vector<float>> wipe_volumes;
const unsigned int number_of_extruders = (unsigned int)(sqrt(wiping_matrix.size())+EPSILON);