Small improvement of tpmsd infill (#10049)

* smooth tpmsd

Changed the number of initial segments in the make_waves function from 4 to 16 for finer wave discretization. This should improve the accuracy of the generated wave polylines.

* Update param_tpmsd.svg
This commit is contained in:
Rodrigo
2025-07-04 03:09:44 -03:00
committed by GitHub
parent a8141ef360
commit f8ef9bc363
2 changed files with 45 additions and 155 deletions

View File

@@ -55,8 +55,9 @@ static Polylines make_waves(double gridZ, double density_adjusted, double line_s
std::vector<std::pair<double,double>> wave;
{//fill one wave
const auto v=[&](double u){return acos(a/b*cos(u));};
for(int c=0;c<=4;++c){
const double u=minU+2*M_PI*c/4;
const int initialSegments=16;
for(int c=0;c<=initialSegments;++c){
const double u=minU+2*M_PI*c/initialSegments;
wave.emplace_back(u,v(u));
}
{//refine