mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 04:15:51 +08:00
Minor fixes to the new rectilinear implementation
This commit is contained in:
parent
4b0766a82e
commit
f58d1d1fc5
@ -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%.
|
// How much could the extrusion width be increased? By 20%.
|
||||||
const coordf_t factor_max = 1.2;
|
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);
|
distance_new = floor((double)distance * factor_max + 0.5);
|
||||||
|
|
||||||
assert((distance_new * number_of_intervals) <= width);
|
assert((distance_new * number_of_intervals) <= width);
|
||||||
|
@ -18,12 +18,6 @@ Point::operator==(const Point& rhs) const
|
|||||||
return this->coincides_with(rhs);
|
return this->coincides_with(rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
Point::operator<(const Point& rhs) const
|
|
||||||
{
|
|
||||||
return this->x < rhs.x || this->y < rhs.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
Point::wkt() const
|
Point::wkt() const
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,6 @@ class Point
|
|||||||
return Point(scale_(x), scale_(y));
|
return Point(scale_(x), scale_(y));
|
||||||
};
|
};
|
||||||
bool operator==(const Point& rhs) const;
|
bool operator==(const Point& rhs) const;
|
||||||
bool operator<(const Point& rhs) const;
|
|
||||||
std::string wkt() const;
|
std::string wkt() const;
|
||||||
std::string dump_perl() const;
|
std::string dump_perl() const;
|
||||||
void scale(double factor);
|
void scale(double factor);
|
||||||
|
@ -97,8 +97,8 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintCo
|
|||||||
$config->set_deserialize('gcode_flavor', 'machinekit');
|
$config->set_deserialize('gcode_flavor', 'machinekit');
|
||||||
is $config->get('gcode_flavor'), 'machinekit', 'deserialize enum (gcode_flavor)';
|
is $config->get('gcode_flavor'), 'machinekit', 'deserialize enum (gcode_flavor)';
|
||||||
|
|
||||||
$config->set_deserialize('fill_pattern', 'line');
|
$config->set_deserialize('fill_pattern', 'stars');
|
||||||
is $config->get('fill_pattern'), 'line', 'deserialize enum (fill_pattern)';
|
is $config->get('fill_pattern'), 'stars', 'deserialize enum (fill_pattern)';
|
||||||
|
|
||||||
$config->set_deserialize('support_material_pattern', 'pillars');
|
$config->set_deserialize('support_material_pattern', 'pillars');
|
||||||
is $config->get('support_material_pattern'), 'pillars', 'deserialize enum (support_material_pattern)';
|
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;
|
my $config = Slic3r::Config->new;
|
||||||
$config->set('fill_pattern', 'line');
|
$config->set('fill_pattern', 'stars');
|
||||||
|
|
||||||
my $config2 = Slic3r::Config->new;
|
my $config2 = Slic3r::Config->new;
|
||||||
$config2->set('fill_pattern', 'hilbertcurve');
|
$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';
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user