mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-05 19:42:47 +00:00
First version of SLA support points generation
This commit is contained in:
41
src/libslic3r/SLA/SLAAutoSupports.hpp
Normal file
41
src/libslic3r/SLA/SLAAutoSupports.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef SLAAUTOSUPPORTS_HPP_
|
||||
#define SLAAUTOSUPPORTS_HPP_
|
||||
|
||||
#include <libslic3r/Point.hpp>
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class ModelObject;
|
||||
|
||||
|
||||
|
||||
|
||||
class SLAAutoSupports {
|
||||
public:
|
||||
struct Config {
|
||||
float density_at_horizontal;
|
||||
float density_at_45;
|
||||
float minimal_z;
|
||||
};
|
||||
|
||||
SLAAutoSupports(ModelObject& mo, const SLAAutoSupports::Config& c);
|
||||
void generate();
|
||||
|
||||
private:
|
||||
TriangleMesh mesh;
|
||||
static float angle_from_normal(const stl_normal& normal) { return acos((-normal.normalized())(2)); }
|
||||
float get_required_density(float angle) const;
|
||||
static float approximate_geodesic_distance(const Vec3f& p1, const Vec3f& p2, Vec3f& n1, Vec3f& n2);
|
||||
|
||||
ModelObject& m_model_object;
|
||||
SLAAutoSupports::Config m_config;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
|
||||
#endif // SLAAUTOSUPPORTS_HPP_
|
||||
Reference in New Issue
Block a user