mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-25 09:41:11 -06:00
Implemented possibility to set a resin cost
This commit is contained in:
parent
6f8a9bc1ff
commit
82bc243281
8 changed files with 107 additions and 11 deletions
|
|
@ -2404,6 +2404,34 @@ void PrintConfigDef::init_sla_params()
|
|||
def->min = 0;
|
||||
def->set_default_value(new ConfigOptionFloat(0.3));
|
||||
|
||||
def = this->add("bottle_volume", coFloat);
|
||||
def->label = L("Bottle volume");
|
||||
def->tooltip = L("Bottle volume");
|
||||
def->sidetext = L("ml");
|
||||
def->min = 50;
|
||||
def->set_default_value(new ConfigOptionFloat(960.0));
|
||||
|
||||
def = this->add("bottle_weight", coFloat);
|
||||
def->label = L("Bottle weight");
|
||||
def->tooltip = L("Bottle weight");
|
||||
def->sidetext = L("kg");
|
||||
def->min = 0;
|
||||
def->set_default_value(new ConfigOptionFloat(1.0));
|
||||
|
||||
def = this->add("material_density", coFloat);
|
||||
def->label = L("Density");
|
||||
def->tooltip = L("Density");
|
||||
def->sidetext = L("g/ml");
|
||||
def->min = 0;
|
||||
def->set_default_value(new ConfigOptionFloat(0.960));
|
||||
|
||||
def = this->add("bottle_cost", coFloat);
|
||||
def->label = L("Cost");
|
||||
def->tooltip = L("Cost");
|
||||
def->sidetext = L("money/bottle");
|
||||
def->min = 0;
|
||||
def->set_default_value(new ConfigOptionFloat(0.0));
|
||||
|
||||
def = this->add("faded_layers", coInt);
|
||||
def->label = L("Faded layers");
|
||||
def->tooltip = L("Number of the layers needed for the exposure time fade from initial exposure time to the exposure time");
|
||||
|
|
|
|||
|
|
@ -1098,6 +1098,10 @@ class SLAMaterialConfig : public StaticPrintConfig
|
|||
STATIC_PRINT_CONFIG_CACHE(SLAMaterialConfig)
|
||||
public:
|
||||
ConfigOptionFloat initial_layer_height;
|
||||
ConfigOptionFloat bottle_cost;
|
||||
ConfigOptionFloat bottle_volume;
|
||||
ConfigOptionFloat bottle_weight;
|
||||
ConfigOptionFloat material_density;
|
||||
ConfigOptionFloat exposure_time;
|
||||
ConfigOptionFloat initial_exposure_time;
|
||||
ConfigOptionFloats material_correction;
|
||||
|
|
@ -1105,6 +1109,10 @@ protected:
|
|||
void initialize(StaticCacheBase &cache, const char *base_ptr)
|
||||
{
|
||||
OPT_PTR(initial_layer_height);
|
||||
OPT_PTR(bottle_cost);
|
||||
OPT_PTR(bottle_volume);
|
||||
OPT_PTR(bottle_weight);
|
||||
OPT_PTR(material_density);
|
||||
OPT_PTR(exposure_time);
|
||||
OPT_PTR(initial_exposure_time);
|
||||
OPT_PTR(material_correction);
|
||||
|
|
|
|||
|
|
@ -1620,7 +1620,11 @@ bool SLAPrint::invalidate_state_by_config_options(const std::vector<t_config_opt
|
|||
"output_filename_format",
|
||||
"fast_tilt_time",
|
||||
"slow_tilt_time",
|
||||
"area_fill"
|
||||
"area_fill",
|
||||
"bottle_cost",
|
||||
"bottle_volume",
|
||||
"bottle_weight",
|
||||
"material_density"
|
||||
};
|
||||
|
||||
std::vector<SLAPrintStep> steps;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue