From 9cf483fe0822caf432f86edde38db8f423ceeae5 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 1 Dec 2021 19:02:37 +0100 Subject: [PATCH] WIP Lightning infil: Cleaning up some compiler errors --- src/libslic3r/Fill/Lightning/DistanceField.hpp | 2 +- src/libslic3r/Fill/Lightning/Generator.cpp | 2 +- src/libslic3r/Fill/Lightning/Layer.cpp | 4 ++-- src/libslic3r/Layer.hpp | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/Fill/Lightning/DistanceField.hpp b/src/libslic3r/Fill/Lightning/DistanceField.hpp index 6e550a7e25..efb073a0d2 100644 --- a/src/libslic3r/Fill/Lightning/DistanceField.hpp +++ b/src/libslic3r/Fill/Lightning/DistanceField.hpp @@ -73,7 +73,7 @@ protected: */ struct UnsupportedCell { - UnsupportedCell(Point grid_loc, coord_t dist_to_boundary) : loc(loc), dist_to_boundary(dist_to_boundary) {} + UnsupportedCell(Point loc, coord_t dist_to_boundary) : loc(loc), dist_to_boundary(dist_to_boundary) {} // The position of the center of this cell. Point loc; // How far this cell is removed from the ``current_outline`` polygon, the edge of the infill area. diff --git a/src/libslic3r/Fill/Lightning/Generator.cpp b/src/libslic3r/Fill/Lightning/Generator.cpp index 5d935b1042..87b593f89b 100644 --- a/src/libslic3r/Fill/Lightning/Generator.cpp +++ b/src/libslic3r/Fill/Lightning/Generator.cpp @@ -32,7 +32,7 @@ Generator::Generator(const PrintObject &print_object) const PrintRegionConfig ®ion_config = print_object.shared_regions()->all_regions.front()->config(); const std::vector &nozzle_diameters = print_config.nozzle_diameter.values; double max_nozzle_diameter = *std::max_element(nozzle_diameters.begin(), nozzle_diameters.end()); - const int infill_extruder = region_config.infill_extruder.value; +// const int infill_extruder = region_config.infill_extruder.value; const double default_infill_extrusion_width = Flow::auto_extrusion_width(FlowRole::frInfill, float(max_nozzle_diameter)); // Note: There's not going to be a layer below the first one, so the 'initial layer height' doesn't have to be taken into account. const double layer_thickness = object_config.layer_height; diff --git a/src/libslic3r/Fill/Lightning/Layer.cpp b/src/libslic3r/Fill/Lightning/Layer.cpp index 19bf7ec481..1b3936e340 100644 --- a/src/libslic3r/Fill/Lightning/Layer.cpp +++ b/src/libslic3r/Fill/Lightning/Layer.cpp @@ -193,7 +193,7 @@ void Layer::reconnectRoots if (root_ptr->getLastGroundingLocation()) { - const Point& ground_loc = root_ptr->getLastGroundingLocation().value(); + const Point& ground_loc = *root_ptr->getLastGroundingLocation(); if (ground_loc != root_ptr->getLocation()) { Point new_root_pt; @@ -225,7 +225,7 @@ void Layer::reconnectRoots ); if (ground.boundary_location) { - if (ground.boundary_location.value() == root_ptr->getLocation()) + if (*ground.boundary_location == root_ptr->getLocation()) continue; // Already on the boundary. auto new_root = Node::create(ground.p(), ground.p()); diff --git a/src/libslic3r/Layer.hpp b/src/libslic3r/Layer.hpp index 60440de97f..bb652d8a04 100644 --- a/src/libslic3r/Layer.hpp +++ b/src/libslic3r/Layer.hpp @@ -148,7 +148,6 @@ public: return false; } void make_perimeters(); - void make_fills() { this->make_fills(nullptr, nullptr); }; void make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive::Octree* support_fill_octree); void make_ironing();