SLA support parameters changed: radiuses for diameters.
This commit is contained in:
parent
9722bcdd75
commit
746c1d2fd8
@ -2453,14 +2453,14 @@ void PrintConfigDef::init_sla_params()
|
||||
def->cli = "";
|
||||
def->default_value = new ConfigOptionBool(true);
|
||||
|
||||
def = this->add("support_head_front_radius", coFloat);
|
||||
def->label = L("Support head front radius");
|
||||
def = this->add("support_head_front_diameter", coFloat);
|
||||
def->label = L("Support head front diameter");
|
||||
def->category = L("Supports");
|
||||
def->tooltip = L("Radius of the pointing side of the head");
|
||||
def->tooltip = L("Diameter of the pointing side of the head");
|
||||
def->sidetext = L("mm");
|
||||
def->cli = "";
|
||||
def->min = 0;
|
||||
def->default_value = new ConfigOptionFloat(0.2);
|
||||
def->default_value = new ConfigOptionFloat(0.4);
|
||||
|
||||
def = this->add("support_head_penetration", coFloat);
|
||||
def->label = L("Support head penetration");
|
||||
@ -2480,14 +2480,14 @@ void PrintConfigDef::init_sla_params()
|
||||
def->min = 0;
|
||||
def->default_value = new ConfigOptionFloat(1.0);
|
||||
|
||||
def = this->add("support_pillar_radius", coFloat);
|
||||
def->label = L("Support pillar radius");
|
||||
def = this->add("support_pillar_diameter", coFloat);
|
||||
def->label = L("Support pillar diameter");
|
||||
def->category = L("Supports");
|
||||
def->tooltip = L("Radius in mm of the support pillars");
|
||||
def->tooltip = L("Diameter in mm of the support pillars");
|
||||
def->sidetext = L("mm");
|
||||
def->cli = "";
|
||||
def->min = 0;
|
||||
def->default_value = new ConfigOptionFloat(0.5);
|
||||
def->default_value = new ConfigOptionFloat(1.0);
|
||||
|
||||
def = this->add("support_pillar_widening_factor", coFloat);
|
||||
def->label = L("Pillar widening factor");
|
||||
@ -2498,17 +2498,17 @@ void PrintConfigDef::init_sla_params()
|
||||
def->sidetext = L("");
|
||||
def->cli = "";
|
||||
def->min = 0;
|
||||
def->max = 1.0;
|
||||
def->max = 1;
|
||||
def->default_value = new ConfigOptionFloat(0.0);
|
||||
|
||||
def = this->add("support_base_radius", coFloat);
|
||||
def->label = L("Support base radius");
|
||||
def = this->add("support_base_diameter", coFloat);
|
||||
def->label = L("Support base diameter");
|
||||
def->category = L("Supports");
|
||||
def->tooltip = L("Radius in mm of the pillar base");
|
||||
def->tooltip = L("Diameter in mm of the pillar base");
|
||||
def->sidetext = L("mm");
|
||||
def->cli = "";
|
||||
def->min = 0;
|
||||
def->default_value = new ConfigOptionFloat(2.0);
|
||||
def->default_value = new ConfigOptionFloat(4.0);
|
||||
|
||||
def = this->add("support_base_height", coFloat);
|
||||
def->label = L("Support base height");
|
||||
|
@ -907,8 +907,8 @@ public:
|
||||
// Enabling or disabling support creation
|
||||
ConfigOptionBool supports_enable;
|
||||
|
||||
// Radius in mm of the pointing side of the head.
|
||||
ConfigOptionFloat support_head_front_radius /*= 0.2*/;
|
||||
// Diameter in mm of the pointing side of the head.
|
||||
ConfigOptionFloat support_head_front_diameter /*= 0.2*/;
|
||||
|
||||
// How much the pinhead has to penetrate the model surface
|
||||
ConfigOptionFloat support_head_penetration /*= 0.2*/;
|
||||
@ -917,7 +917,7 @@ public:
|
||||
ConfigOptionFloat support_head_width /*= 1.0*/;
|
||||
|
||||
// Radius in mm of the support pillars.
|
||||
ConfigOptionFloat support_pillar_radius /*= 0.8*/;
|
||||
ConfigOptionFloat support_pillar_diameter /*= 0.8*/;
|
||||
|
||||
// TODO: unimplemented at the moment. This coefficient will have an impact
|
||||
// when bridges and pillars are merged. The resulting pillar should be a bit
|
||||
@ -926,7 +926,7 @@ public:
|
||||
ConfigOptionFloat support_pillar_widening_factor;
|
||||
|
||||
// Radius in mm of the pillar base.
|
||||
ConfigOptionFloat support_base_radius /*= 2.0*/;
|
||||
ConfigOptionFloat support_base_diameter /*= 2.0*/;
|
||||
|
||||
// The height of the pillar base cone in mm.
|
||||
ConfigOptionFloat support_base_height /*= 1.0*/;
|
||||
@ -964,12 +964,12 @@ protected:
|
||||
{
|
||||
OPT_PTR(layer_height);
|
||||
OPT_PTR(supports_enable);
|
||||
OPT_PTR(support_head_front_radius);
|
||||
OPT_PTR(support_head_front_diameter);
|
||||
OPT_PTR(support_head_penetration);
|
||||
OPT_PTR(support_head_width);
|
||||
OPT_PTR(support_pillar_radius);
|
||||
OPT_PTR(support_pillar_diameter);
|
||||
OPT_PTR(support_pillar_widening_factor);
|
||||
OPT_PTR(support_base_radius);
|
||||
OPT_PTR(support_base_diameter);
|
||||
OPT_PTR(support_base_height);
|
||||
OPT_PTR(support_critical_angle);
|
||||
OPT_PTR(support_max_bridge_length);
|
||||
|
@ -370,6 +370,27 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model,
|
||||
return static_cast<ApplyStatus>(apply_status);
|
||||
}
|
||||
|
||||
namespace {
|
||||
// Compile the argument for support creation from the static print config.
|
||||
sla::SupportConfig make_support_cfg(const SLAPrintObjectConfig& c) {
|
||||
sla::SupportConfig scfg;
|
||||
|
||||
scfg.head_front_radius_mm = 0.5*c.support_head_front_diameter.getFloat();
|
||||
scfg.head_back_radius_mm = 0.5*c.support_pillar_diameter.getFloat();
|
||||
scfg.head_penetration_mm = c.support_head_penetration.getFloat();
|
||||
scfg.head_width_mm = c.support_head_width.getFloat();
|
||||
scfg.object_elevation_mm = c.support_object_elevation.getFloat();
|
||||
scfg.tilt = c.support_critical_angle.getFloat() * PI / 180.0 ;
|
||||
scfg.max_bridge_length_mm = c.support_max_bridge_length.getFloat();
|
||||
scfg.headless_pillar_radius_mm = 0.375*c.support_pillar_diameter.getFloat();
|
||||
scfg.pillar_widening_factor = c.support_pillar_widening_factor.getFloat();
|
||||
scfg.base_radius_mm = 0.5*c.support_base_diameter.getFloat();
|
||||
scfg.base_height_mm = c.support_base_height.getFloat();
|
||||
|
||||
return scfg;
|
||||
}
|
||||
}
|
||||
|
||||
void SLAPrint::process()
|
||||
{
|
||||
using namespace sla;
|
||||
@ -454,21 +475,7 @@ void SLAPrint::process()
|
||||
auto& emesh = po.m_supportdata->emesh;
|
||||
auto& pts = po.m_supportdata->support_points; // nowhere filled yet
|
||||
try {
|
||||
sla::SupportConfig scfg;
|
||||
SLAPrintObjectConfig& c = po.m_config;
|
||||
|
||||
scfg.head_front_radius_mm = c.support_head_front_radius.getFloat();
|
||||
scfg.head_back_radius_mm = c.support_pillar_radius.getFloat();
|
||||
scfg.head_penetration_mm = c.support_head_penetration.getFloat();
|
||||
scfg.head_width_mm = c.support_head_width.getFloat();
|
||||
scfg.object_elevation_mm = c.support_object_elevation.getFloat();
|
||||
scfg.tilt = c.support_critical_angle.getFloat() * PI / 180.0 ;
|
||||
scfg.max_bridge_length_mm = c.support_max_bridge_length.getFloat();
|
||||
scfg.headless_pillar_radius_mm = 0.75*c.support_pillar_radius.getFloat();
|
||||
scfg.pillar_widening_factor = c.support_pillar_widening_factor.getFloat();
|
||||
scfg.base_radius_mm = c.support_base_radius.getFloat();
|
||||
scfg.base_height_mm = c.support_base_height.getFloat();
|
||||
|
||||
sla::SupportConfig scfg = make_support_cfg(po.m_config);
|
||||
sla::Controller ctl;
|
||||
|
||||
// some magic to scale the status values coming from the support
|
||||
|
@ -4070,7 +4070,6 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
||||
size_t idx = 0;
|
||||
const SLAPrint *sla_print = this->sla_print();
|
||||
for (const SLAPrintObject *print_object : sla_print->objects()) {
|
||||
std::cout << "Current elevation: "<< print_object->get_current_elevation() << std::endl;
|
||||
SLASupportState &state = sla_support_state[idx ++];
|
||||
const ModelObject *model_object = print_object->model_object();
|
||||
// Find an index of the ModelObject
|
||||
|
@ -403,12 +403,12 @@ const std::vector<std::string>& Preset::sla_print_options()
|
||||
s_opts = {
|
||||
"layer_height",
|
||||
"supports_enable",
|
||||
"support_head_front_radius",
|
||||
"support_head_front_diameter",
|
||||
"support_head_penetration",
|
||||
"support_head_width",
|
||||
"support_pillar_radius",
|
||||
"support_pillar_diameter",
|
||||
"support_pillar_widening_factor",
|
||||
"support_base_radius",
|
||||
"support_base_diameter",
|
||||
"support_base_height",
|
||||
"support_critical_angle",
|
||||
"support_max_bridge_length",
|
||||
|
@ -3001,14 +3001,14 @@ void TabSLAPrint::build()
|
||||
optgroup->append_single_option_line("supports_enable");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Support head")));
|
||||
optgroup->append_single_option_line("support_head_front_radius");
|
||||
optgroup->append_single_option_line("support_head_front_diameter");
|
||||
optgroup->append_single_option_line("support_head_penetration");
|
||||
optgroup->append_single_option_line("support_head_width");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Support pillar")));
|
||||
optgroup->append_single_option_line("support_pillar_radius");
|
||||
optgroup->append_single_option_line("support_pillar_diameter");
|
||||
optgroup->append_single_option_line("support_pillar_widening_factor");
|
||||
optgroup->append_single_option_line("support_base_radius");
|
||||
optgroup->append_single_option_line("support_base_diameter");
|
||||
optgroup->append_single_option_line("support_base_height");
|
||||
optgroup->append_single_option_line("support_object_elevation");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user