Make Gyroid::PatternTolerance match the description

Move the division out of the switch in order to make the tolerance match
the expected unit.
This commit is contained in:
Yuri D'Elia 2019-08-08 16:53:26 +02:00
parent 90c85b7c8a
commit 753b34a0d3
2 changed files with 4 additions and 4 deletions

View file

@ -108,7 +108,7 @@ static Polylines make_gyroid_waves(double gridZ, double density_adjusted, double
// tolerance in scaled units. clamp the maximum tolerance as there's
// no processing-speed benefit to do so beyond a certain point
const double tolerance = std::min(line_spacing, FillGyroid::PatternTolerance) / 2 / unscale<double>(scaleFactor);
const double tolerance = std::min(line_spacing / 2, FillGyroid::PatternTolerance) / unscale<double>(scaleFactor);
//scale factor for 5% : 8 712 388
// 1z = 10^-6 mm ?

View file

@ -24,7 +24,7 @@ public:
static constexpr double DensityAdjust = 2.44;
// Gyroid upper resolution tolerance (mm^-2)
static constexpr double PatternTolerance = 0.4;
static constexpr double PatternTolerance = 0.2;
protected: