Reworked polygon sampling for SLA auto support generation.

Conditional compilation of an igl winding number tree for SLA support generator, as it is not used as of now and initialization of the tree is expensive.
Fixed issue with passing the new SLA point definition to the back end and back to the UI.
This commit is contained in:
bubnikv 2019-02-17 13:05:22 +01:00
parent d0553ece0e
commit fcc1b2ad69
7 changed files with 225 additions and 76 deletions

View file

@ -3,6 +3,7 @@
#include <Eigen/Geometry>
// #define SLIC3R_SLA_NEEDS_WINDTREE
namespace Slic3r {
@ -11,6 +12,7 @@ typedef Eigen::Matrix<float, 3, 1, Eigen::DontAlign> Vec3f;
typedef Eigen::Matrix<double, 3, 1, Eigen::DontAlign> Vec3d;
class TriangleMesh;
namespace sla {
struct SupportPoint {
@ -115,11 +117,13 @@ public:
int F_idx() const { return m_fidx; }
};
#ifdef SLIC3R_SLA_NEEDS_WINDTREE
// The signed distance from a point to the mesh. Outputs the distance,
// the index of the triangle and the closest point in mesh coordinate space.
si_result signed_distance(const Vec3d& p) const;
bool inside(const Vec3d& p) const;
#endif /* SLIC3R_SLA_NEEDS_WINDTREE */
};