mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 00:31:11 -06:00
Merge branch 'master' into lm_sla_supports_auto
This commit is contained in:
commit
8a9a2ac964
7 changed files with 120 additions and 10 deletions
|
@ -92,7 +92,7 @@ void SLAAutoSupports::generate()
|
|||
Vec3f normal;
|
||||
int added_points = 0;
|
||||
int refused_points = 0;
|
||||
const int refused_limit = std::min(100, (int)(1. / m_config.density_at_horizontal));
|
||||
const int refused_limit = 30;
|
||||
// Angle at which the density reaches zero:
|
||||
const float threshold_angle = std::min(M_PI_2, M_PI_4 * acos(0.f/m_config.density_at_horizontal) / acos(m_config.density_at_45/m_config.density_at_horizontal));
|
||||
|
||||
|
@ -146,8 +146,8 @@ float SLAAutoSupports::get_required_density(float angle) const
|
|||
{
|
||||
// calculation would be density_0 * cos(angle). To provide one more degree of freedom, we will scale the angle
|
||||
// to get the user-set density for 45 deg. So it ends up as density_0 * cos(K * angle).
|
||||
float K = 4*acos(m_config.density_at_45/m_config.density_at_horizontal) / M_PI;
|
||||
return std::max(0., m_config.density_at_horizontal * cos(K*angle));
|
||||
float K = 4.f * float(acos(m_config.density_at_45/m_config.density_at_horizontal) / M_PI);
|
||||
return std::max(0.f, float(m_config.density_at_horizontal * cos(K*angle)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define SLAAUTOSUPPORTS_HPP_
|
||||
|
||||
#include <libslic3r/Point.hpp>
|
||||
#include <libslic3r/TriangleMesh.hpp>
|
||||
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
|
|
|
@ -27,10 +27,13 @@
|
|||
#define ENABLE_WORLD_ROTATIONS (1 && ENABLE_1_42_0)
|
||||
// Scene's GUI made using imgui library
|
||||
#define ENABLE_IMGUI (1 && ENABLE_1_42_0)
|
||||
#define DISABLE_MOVE_ROTATE_SCALE_GIZMOS_IMGUI (1 && ENABLE_IMGUI)
|
||||
// Modified Sla support gizmo
|
||||
#define ENABLE_SLA_SUPPORT_GIZMO_MOD (1 && ENABLE_1_42_0)
|
||||
// Removes the wxNotebook from plater
|
||||
#define ENABLE_REMOVE_TABS_FROM_PLATER (1 && ENABLE_1_42_0)
|
||||
// Constrains the camera target into the scene bounding box
|
||||
#define ENABLE_CONSTRAINED_CAMERA_TARGET (1 && ENABLE_1_42_0)
|
||||
|
||||
#endif // _technologies_h_
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue