mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
First version of SLA support points generation
This commit is contained in:
parent
c23c09c453
commit
0afe2aec1e
10 changed files with 288 additions and 9 deletions
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_
|
Loading…
Add table
Add a link
Reference in a new issue