From f58d1d1fc5f1d84f2a5d785c9f18691b5872b5f1 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 12 Dec 2016 11:25:04 +0100 Subject: [PATCH] Minor fixes to the new rectilinear implementation --- xs/src/libslic3r/Fill/Fill.cpp | 2 +- xs/src/libslic3r/Point.cpp | 6 ------ xs/src/libslic3r/Point.hpp | 1 - xs/t/15_config.t | 8 ++++---- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/xs/src/libslic3r/Fill/Fill.cpp b/xs/src/libslic3r/Fill/Fill.cpp index d0fee59f7..82a392943 100644 --- a/xs/src/libslic3r/Fill/Fill.cpp +++ b/xs/src/libslic3r/Fill/Fill.cpp @@ -86,7 +86,7 @@ Fill::adjust_solid_spacing(const coord_t width, const coord_t distance) // How much could the extrusion width be increased? By 20%. const coordf_t factor_max = 1.2; - if (false && factor > factor_max) + if (factor > factor_max) distance_new = floor((double)distance * factor_max + 0.5); assert((distance_new * number_of_intervals) <= width); diff --git a/xs/src/libslic3r/Point.cpp b/xs/src/libslic3r/Point.cpp index 803549949..5269a4c11 100644 --- a/xs/src/libslic3r/Point.cpp +++ b/xs/src/libslic3r/Point.cpp @@ -18,12 +18,6 @@ Point::operator==(const Point& rhs) const return this->coincides_with(rhs); } -bool -Point::operator<(const Point& rhs) const -{ - return this->x < rhs.x || this->y < rhs.y; -} - std::string Point::wkt() const { diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp index daafe728e..7fd05ff48 100644 --- a/xs/src/libslic3r/Point.hpp +++ b/xs/src/libslic3r/Point.hpp @@ -37,7 +37,6 @@ class Point return Point(scale_(x), scale_(y)); }; bool operator==(const Point& rhs) const; - bool operator<(const Point& rhs) const; std::string wkt() const; std::string dump_perl() const; void scale(double factor); diff --git a/xs/t/15_config.t b/xs/t/15_config.t index a4c5d5925..3a7ad0de6 100644 --- a/xs/t/15_config.t +++ b/xs/t/15_config.t @@ -97,8 +97,8 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintCo $config->set_deserialize('gcode_flavor', 'machinekit'); is $config->get('gcode_flavor'), 'machinekit', 'deserialize enum (gcode_flavor)'; - $config->set_deserialize('fill_pattern', 'line'); - is $config->get('fill_pattern'), 'line', 'deserialize enum (fill_pattern)'; + $config->set_deserialize('fill_pattern', 'stars'); + is $config->get('fill_pattern'), 'stars', 'deserialize enum (fill_pattern)'; $config->set_deserialize('support_material_pattern', 'pillars'); is $config->get('support_material_pattern'), 'pillars', 'deserialize enum (support_material_pattern)'; @@ -199,12 +199,12 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintCo { my $config = Slic3r::Config->new; - $config->set('fill_pattern', 'line'); + $config->set('fill_pattern', 'stars'); my $config2 = Slic3r::Config->new; $config2->set('fill_pattern', 'hilbertcurve'); - is $config->get('fill_pattern'), 'line', 'no interferences between DynamicConfig objects'; + is $config->get('fill_pattern'), 'stars', 'no interferences between DynamicConfig objects'; } {