Reworked pad creation algorithm with new parameters:

* brim size
* force pad around object everywhere
This commit is contained in:
tamasmeszaros
2019-09-24 15:15:49 +02:00
parent 9d775d0a43
commit e675a5d5c6
27 changed files with 1410 additions and 1448 deletions

View File

@@ -11,20 +11,22 @@
// #define SLA_AUTOSUPPORTS_DEBUG
namespace Slic3r {
namespace sla {
class SLAAutoSupports {
public:
struct Config {
float density_relative;
float minimal_distance;
float head_diameter;
float density_relative {1.f};
float minimal_distance {1.f};
float head_diameter {0.4f};
///////////////
inline float support_force() const { return 7.7f / density_relative; } // a force one point can support (arbitrary force unit)
inline float tear_pressure() const { return 1.f; } // pressure that the display exerts (the force unit per mm2)
};
SLAAutoSupports(const TriangleMesh& mesh, const sla::EigenMesh3D& emesh, const std::vector<ExPolygons>& slices,
SLAAutoSupports(const sla::EigenMesh3D& emesh, const std::vector<ExPolygons>& slices,
const std::vector<float>& heights, const Config& config, std::function<void(void)> throw_on_cancel, std::function<void(int)> statusfn);
const std::vector<sla::SupportPoint>& output() { return m_output; }
struct MyLayer;
@@ -199,7 +201,9 @@ private:
std::function<void(int)> m_statusfn;
};
void remove_bottom_points(std::vector<SupportPoint> &pts, double gnd_lvl, double tolerance);
} // namespace sla
} // namespace Slic3r