Fix for normal averaging and hidden parameter for max normal Z angle.

This commit is contained in:
tamasmeszaros 2019-01-02 15:48:38 +01:00
parent a7d8146198
commit 760b1cd9bc
3 changed files with 15 additions and 2 deletions

View file

@ -1085,7 +1085,8 @@ bool SLASupportTree::generate(const PointSet &points,
double polar = std::acos(z / r);
double azimuth = std::atan2(n(1), n(0));
if(polar >= PI / 2) { // skip if the tilt is not sane
// skip if the tilt is not sane
if(polar >= PI - cfg.normal_cutoff_angle) {
// We saturate the polar angle to 3pi/4
polar = std::max(polar, 3*PI / 4);