mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE -> Profile smoothing using gaussian blur
This commit is contained in:
parent
5baffdb9c2
commit
f548a4d7d6
6 changed files with 145 additions and 4 deletions
|
@ -107,6 +107,9 @@ wxDECLARE_EVENT(EVT_GLCANVAS_REDO, SimpleEvent);
|
|||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
wxDECLARE_EVENT(EVT_GLCANVAS_RESET_LAYER_HEIGHT_PROFILE, SimpleEvent);
|
||||
wxDECLARE_EVENT(EVT_GLCANVAS_ADAPTIVE_LAYER_HEIGHT_PROFILE, Event<float>);
|
||||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
wxDECLARE_EVENT(EVT_GLCANVAS_SMOOTH_LAYER_HEIGHT_PROFILE, Event<unsigned int>);
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
|
||||
class GLCanvas3D
|
||||
|
@ -179,7 +182,12 @@ private:
|
|||
std::vector<coordf_t> m_layer_height_profile;
|
||||
bool m_layer_height_profile_modified;
|
||||
|
||||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
mutable float m_adaptive_cusp;
|
||||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
mutable unsigned int m_smooth_radius;
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
|
||||
class LayersTexture
|
||||
{
|
||||
|
@ -229,6 +237,9 @@ private:
|
|||
void reset_layer_height_profile(GLCanvas3D& canvas);
|
||||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
void adaptive_layer_height_profile(GLCanvas3D& canvas, float cusp);
|
||||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
void smooth_layer_height_profile(GLCanvas3D& canvas, unsigned int radius);
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
|
||||
static float get_cursor_z_relative(const GLCanvas3D& canvas);
|
||||
|
@ -526,6 +537,9 @@ public:
|
|||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
void reset_layer_height_profile();
|
||||
void adaptive_layer_height_profile(float cusp);
|
||||
#if ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
void smooth_layer_height_profile(unsigned int radius);
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE_SMOOTHING
|
||||
#endif // ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
|
||||
|
||||
bool is_reload_delayed() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue