◆ RadialScale()
| Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::RadialScale::RadialScale |
( |
const AdaptiveTpms & | tpms, |
|
|
int | dimensions ) |
|
inline |
184 {
185 const double ratio = std::max(tpms.interior_frequency / tpms.surface_frequency, 1e-3);
186 auto target = [&tpms, ratio](
double depth) {
return target_scale(ratio, tpms.gradient, depth); };
188 double volume = 0.;
189 for (
size_t i = 1; i <
m_scale.size(); ++i) {
190 const double t0 = double(i - 1) / double(
m_scale.size() - 1);
191 const double t1 = double(i) / double(
m_scale.size() - 1);
194 }
195 }
int m_dimensions
Definition AdaptiveInfillField.cpp:209
std::array< double, 257 > m_scale
Definition AdaptiveInfillField.cpp:210
double target_scale(double ratio, AdaptiveInfillGradient gradient, double depth)
Definition AdaptiveInfillField.cpp:149
References Slic3r::AdaptiveTpms::gradient, Slic3r::AdaptiveTpms::interior_frequency, m_dimensions, m_scale, Slic3r::AdaptiveTpms::surface_frequency, and Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::target_scale().
◆ operator()()
| double Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::RadialScale::operator() |
( |
double | t | ) |
const |
|
inline |
198 {
199 if (t >= 1.) {
201 return (
m_scale.back() + volume - 1.) / volume;
202 }
203 const double x = t * double(
m_scale.size() - 1);
204 const size_t i = std::min(
size_t(x),
m_scale.size() - 2);
206 }
References m_dimensions, and m_scale.
◆ m_dimensions
| int Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::RadialScale::m_dimensions |
|
private |
◆ m_scale
| std::array<double, 257> Slic3r::anonymous_namespace{AdaptiveInfillField.cpp}::RadialScale::m_scale |
|
private |
The documentation for this class was generated from the following file: