mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-25 01:34:26 +08:00
parent
27aa82c94f
commit
87840d0f7f
@ -2061,7 +2061,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->ratio_over = "perimeter_extrusion_width";
|
||||
def->min = 0;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(200, true));
|
||||
|
||||
def = this->add("min_print_speed", coFloats);
|
||||
def->label = L("Min print speed");
|
||||
@ -3530,7 +3530,9 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("z_step", coFloat);
|
||||
def->label = L("Z full step");
|
||||
def->tooltip = L("Set this to the height moved when your Z motor (or equivalent) turns one step."
|
||||
"If your motor needs 200 steps to move your head/plater by 1mm, this field have to be 1/200 = 0.005");
|
||||
"If your motor needs 200 steps to move your head/plater by 1mm, this field have to be 1/200 = 0.005."
|
||||
"\nThe gcode can't write a value below 0.001 so any value below or equal that is equivalent to disabling the feature."
|
||||
"\n0 to disable.");
|
||||
def->cli = "z-step=f";
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0.0001;
|
||||
|
@ -25,12 +25,14 @@ static const coordf_t MIN_LAYER_HEIGHT = 0.01;
|
||||
static const coordf_t MIN_LAYER_HEIGHT_DEFAULT = 0.07;
|
||||
|
||||
inline coordf_t check_z_step(coordf_t val, coordf_t z_step) {
|
||||
if (z_step <= EPSILON) return val;
|
||||
uint64_t valint = uint64_t(val * 100000. + 0.1);
|
||||
uint64_t stepint = uint64_t(z_step * 100000. + 0.1);
|
||||
return (((valint + (stepint/2)) / stepint) * stepint) / 100000.;
|
||||
//return int((val + z_step * 0.5) / z_step) * z_step;
|
||||
}
|
||||
inline bool test_z_step(coordf_t val, coordf_t z_step) {
|
||||
if (z_step <= EPSILON) return val;
|
||||
uint64_t valint = uint64_t(val * 100000. + 0.1);
|
||||
uint64_t stepint = uint64_t(z_step * 100000. + 0.1);
|
||||
return valint % stepint == 0;
|
||||
|
@ -45,7 +45,10 @@ namespace GUI {
|
||||
wxDEFINE_EVENT(EVT_TAB_VALUE_CHANGED, wxCommandEvent);
|
||||
wxDEFINE_EVENT(EVT_TAB_PRESETS_CHANGED, SimpleEvent);
|
||||
|
||||
//same as the slicing.cpp method, but it's easier to redefine it here
|
||||
// maybe i should have written it in the header.
|
||||
inline coordf_t check_z_step_temp(coordf_t val, coordf_t z_step) {
|
||||
if (z_step <= EPSILON) return val;
|
||||
uint64_t valint = uint64_t(val * 100000. + 0.1);
|
||||
uint64_t stepint = uint64_t(z_step * 100000. + 0.1);
|
||||
return (((valint + (stepint / 2)) / stepint) * stepint) / 100000.;
|
||||
|
Loading…
x
Reference in New Issue
Block a user