OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::DensityLevels Struct Reference

Public Member Functions

 DensityLevels (double ratio, double step, AdaptiveInfillGradient gradient)
double scale (int level) const
double level (double depth) const

Public Attributes

double ratio
AdaptiveInfillGradient gradient
int count

Detailed Description

Constructor & Destructor Documentation

◆ DensityLevels()

Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::DensityLevels::DensityLevels ( double ratio,
double step,
AdaptiveInfillGradient gradient )
inline
163 : ratio(ratio), gradient(gradient), count(int(std::ceil(std::abs(std::log(ratio)) / std::log(step) - EPSILON)))
164 {}
#define EPSILON
Definition ColorUtils.cpp:64
double ratio
Definition AdaptiveInfillField.cpp:172
AdaptiveInfillGradient gradient
Definition AdaptiveInfillField.cpp:173

References count, EPSILON, gradient, and ratio.

Member Function Documentation

◆ level()

double Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::DensityLevels::level ( double depth) const
inline
168 {
169 return count == 0 ? 0. : count * std::log(target_scale(ratio, gradient, depth)) / std::log(ratio);
170 }
double target_scale(double ratio, AdaptiveInfillGradient gradient, double depth)
Definition AdaptiveInfillField.cpp:149

References count, gradient, ratio, and Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::target_scale().

Referenced by scale().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scale()

double Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::DensityLevels::scale ( int level) const
inline
166{ return count == 0 ? 1. : std::pow(ratio, double(level) / count); }
double level(double depth) const
Definition AdaptiveInfillField.cpp:167

References count, level(), and ratio.

Here is the call graph for this function:

Member Data Documentation

◆ count

int Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::DensityLevels::count

Referenced by DensityLevels(), level(), and scale().

◆ gradient

AdaptiveInfillGradient Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::DensityLevels::gradient

Referenced by DensityLevels(), and level().

◆ ratio

double Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::DensityLevels::ratio

Referenced by DensityLevels(), level(), and scale().


The documentation for this struct was generated from the following file: