Pad "tilt" changed to "slope"

This commit is contained in:
tamasmeszaros 2019-02-25 16:04:46 +01:00
parent f23919985f
commit 2b03c25bc6
7 changed files with 16 additions and 16 deletions

View file

@ -2731,14 +2731,14 @@ void PrintConfigDef::init_sla_params()
def->min = 0; def->min = 0;
def->default_value = new ConfigOptionFloat(1.0); def->default_value = new ConfigOptionFloat(1.0);
def = this->add("pad_wall_tilt", coFloat); def = this->add("pad_wall_slope", coFloat);
def->label = L("Pad wall tilt"); def->label = L("Pad wall slope");
def->category = L("Pad"); def->category = L("Pad");
def->tooltip = L("The tilt of the pad wall relative to the bed plane. " def->tooltip = L("The slope of the pad wall relative to the bed plane. "
"90 degrees means straight walls."); "90 degrees means straight walls.");
def->sidetext = L("degrees"); def->sidetext = L("degrees");
def->cli = ""; def->cli = "";
def->min = 0.1; // What should be the minimum? def->min = 45;
def->max = 90; def->max = 90;
def->default_value = new ConfigOptionFloat(45.0); def->default_value = new ConfigOptionFloat(45.0);
} }

View file

@ -1028,8 +1028,8 @@ public:
// The smoothing radius of the pad edges // The smoothing radius of the pad edges
ConfigOptionFloat pad_edge_radius /*= 1*/; ConfigOptionFloat pad_edge_radius /*= 1*/;
// The tilt of the pad wall... // The slope of the pad wall...
ConfigOptionFloat pad_wall_tilt; ConfigOptionFloat pad_wall_slope;
protected: protected:
void initialize(StaticCacheBase &cache, const char *base_ptr) void initialize(StaticCacheBase &cache, const char *base_ptr)
@ -1056,7 +1056,7 @@ protected:
OPT_PTR(pad_wall_height); OPT_PTR(pad_wall_height);
OPT_PTR(pad_max_merge_distance); OPT_PTR(pad_max_merge_distance);
OPT_PTR(pad_edge_radius); OPT_PTR(pad_edge_radius);
OPT_PTR(pad_wall_tilt); OPT_PTR(pad_wall_slope);
} }
}; };

View file

@ -601,8 +601,8 @@ void create_base_pool(const ExPolygons &ground_layer, TriangleMesh& out,
const double thickness = cfg.min_wall_thickness_mm; const double thickness = cfg.min_wall_thickness_mm;
const double wingheight = cfg.min_wall_height_mm; const double wingheight = cfg.min_wall_height_mm;
const double fullheight = wingheight + thickness; const double fullheight = wingheight + thickness;
const double tilt = cfg.wall_tilt; const double slope = cfg.wall_slope;
const double wingdist = wingheight / std::tan(tilt); const double wingdist = wingheight / std::tan(slope);
// scaled values // scaled values
const coord_t s_thickness = mm(thickness); const coord_t s_thickness = mm(thickness);

View file

@ -28,17 +28,17 @@ struct PoolConfig {
double min_wall_height_mm = 5; double min_wall_height_mm = 5;
double max_merge_distance_mm = 50; double max_merge_distance_mm = 50;
double edge_radius_mm = 1; double edge_radius_mm = 1;
double wall_tilt = std::atan(1.0); // Universal constant for Pi/4 double wall_slope = std::atan(1.0); // Universal constant for Pi/4
ThrowOnCancel throw_on_cancel = [](){}; ThrowOnCancel throw_on_cancel = [](){};
inline PoolConfig() {} inline PoolConfig() {}
inline PoolConfig(double wt, double wh, double md, double er, double tilt): inline PoolConfig(double wt, double wh, double md, double er, double slope):
min_wall_thickness_mm(wt), min_wall_thickness_mm(wt),
min_wall_height_mm(wh), min_wall_height_mm(wh),
max_merge_distance_mm(md), max_merge_distance_mm(md),
edge_radius_mm(er), edge_radius_mm(er),
wall_tilt(tilt) {} wall_slope(slope) {}
}; };
/// Calculate the pool for the mesh for SLA printing /// Calculate the pool for the mesh for SLA printing

View file

@ -753,7 +753,7 @@ void SLAPrint::process()
double md = po.m_config.pad_max_merge_distance.getFloat(); double md = po.m_config.pad_max_merge_distance.getFloat();
// Radius is disabled for now... // Radius is disabled for now...
double er = 0; // po.m_config.pad_edge_radius.getFloat(); double er = 0; // po.m_config.pad_edge_radius.getFloat();
double tilt = po.m_config.pad_wall_tilt.getFloat() * PI / 180.0; double tilt = po.m_config.pad_wall_slope.getFloat() * PI / 180.0;
double lh = po.m_config.layer_height.getFloat(); double lh = po.m_config.layer_height.getFloat();
double elevation = po.m_config.support_object_elevation.getFloat(); double elevation = po.m_config.support_object_elevation.getFloat();
if(!po.m_config.supports_enable.getBool()) elevation = 0; if(!po.m_config.supports_enable.getBool()) elevation = 0;
@ -1369,7 +1369,7 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
|| opt_key == "pad_wall_thickness" || opt_key == "pad_wall_thickness"
|| opt_key == "pad_wall_height" || opt_key == "pad_wall_height"
|| opt_key == "pad_max_merge_distance" || opt_key == "pad_max_merge_distance"
|| opt_key == "pad_wall_tilt" || opt_key == "pad_wall_slope"
|| opt_key == "pad_edge_radius") { || opt_key == "pad_edge_radius") {
steps.emplace_back(slaposBasePool); steps.emplace_back(slaposBasePool);
} else { } else {

View file

@ -465,7 +465,7 @@ const std::vector<std::string>& Preset::sla_print_options()
"pad_wall_height", "pad_wall_height",
"pad_max_merge_distance", "pad_max_merge_distance",
"pad_edge_radius", "pad_edge_radius",
"pad_wall_tilt", "pad_wall_slope",
"output_filename_format", "output_filename_format",
"default_sla_print_profile", "default_sla_print_profile",
"compatible_printers", "compatible_printers",

View file

@ -3290,7 +3290,7 @@ void TabSLAPrint::build()
optgroup->append_single_option_line("pad_max_merge_distance"); optgroup->append_single_option_line("pad_max_merge_distance");
// TODO: Disabling this parameter for the beta release // TODO: Disabling this parameter for the beta release
// optgroup->append_single_option_line("pad_edge_radius"); // optgroup->append_single_option_line("pad_edge_radius");
optgroup->append_single_option_line("pad_wall_tilt"); optgroup->append_single_option_line("pad_wall_slope");
page = add_options_page(_(L("Output options")), "page_white_go.png"); page = add_options_page(_(L("Output options")), "page_white_go.png");
optgroup = page->new_optgroup(_(L("Output file"))); optgroup = page->new_optgroup(_(L("Output file")));