2024-09-03 09:34:33 +08:00
|
|
|
#ifndef slic3r_FlushVolCalc_hpp_
|
|
|
|
|
#define slic3r_FlushVolCalc_hpp_
|
|
|
|
|
|
|
|
|
|
#include "libslic3r.h"
|
2024-11-28 15:12:18 +08:00
|
|
|
#include "FlushVolPredictor.hpp"
|
2025-05-05 19:52:57 +08:00
|
|
|
#include "PrintConfig.hpp"
|
2024-09-03 09:34:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
|
|
extern const int g_min_flush_volume_from_support;
|
|
|
|
|
extern const int g_flush_volume_to_support;
|
|
|
|
|
extern const int g_max_flush_volume;
|
|
|
|
|
|
|
|
|
|
class FlushVolCalculator
|
|
|
|
|
{
|
|
|
|
|
public:
|
2025-08-04 10:13:51 +08:00
|
|
|
FlushVolCalculator(int min, int max, int flush_dataset, float multiplier = 1.0f);
|
2024-09-03 09:34:33 +08:00
|
|
|
~FlushVolCalculator()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int calc_flush_vol(unsigned char src_a, unsigned char src_r, unsigned char src_g, unsigned char src_b,
|
|
|
|
|
unsigned char dst_a, unsigned char dst_r, unsigned char dst_g, unsigned char dst_b);
|
|
|
|
|
|
2024-11-28 15:12:18 +08:00
|
|
|
int calc_flush_vol_rgb(unsigned char src_r,unsigned char src_g,unsigned char src_b,
|
|
|
|
|
unsigned char dst_r, unsigned char dst_g, unsigned char dst_b);
|
|
|
|
|
|
2025-05-05 19:52:57 +08:00
|
|
|
bool get_flush_vol_from_data(unsigned char src_r, unsigned char src_g, unsigned char src_b,
|
|
|
|
|
unsigned char dst_r, unsigned char dst_g, unsigned char dst_b, float& flush);
|
|
|
|
|
|
2024-09-03 09:34:33 +08:00
|
|
|
private:
|
|
|
|
|
int m_min_flush_vol;
|
|
|
|
|
int m_max_flush_vol;
|
|
|
|
|
float m_multiplier;
|
2025-08-04 10:13:51 +08:00
|
|
|
int m_flush_dataset;
|
2024-09-03 09:34:33 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|