mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Fix Ironing/Support patterns (#10278)
NoisyGoat Co-authored-by: Rodrigo <162915171+RF47@users.noreply.github.com> Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
Binary file not shown.
@@ -232,8 +232,8 @@ CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(SlicingMode)
|
|||||||
static t_config_enum_values s_keys_map_SupportMaterialPattern {
|
static t_config_enum_values s_keys_map_SupportMaterialPattern {
|
||||||
{ "rectilinear", smpRectilinear },
|
{ "rectilinear", smpRectilinear },
|
||||||
{ "rectilinear-grid", smpRectilinearGrid },
|
{ "rectilinear-grid", smpRectilinearGrid },
|
||||||
{ "lightning", smpLightning },
|
|
||||||
{ "honeycomb", smpHoneycomb },
|
{ "honeycomb", smpHoneycomb },
|
||||||
|
{ "lightning", smpLightning },
|
||||||
{ "default", smpDefault},
|
{ "default", smpDefault},
|
||||||
{ "hollow", smpNone},
|
{ "hollow", smpNone},
|
||||||
};
|
};
|
||||||
@@ -5091,14 +5091,14 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->enum_values.push_back("default");
|
def->enum_values.push_back("default");
|
||||||
def->enum_values.push_back("rectilinear");
|
def->enum_values.push_back("rectilinear");
|
||||||
def->enum_values.push_back("rectilinear-grid");
|
def->enum_values.push_back("rectilinear-grid");
|
||||||
def->enum_values.push_back("lightning");
|
|
||||||
def->enum_values.push_back("honeycomb");
|
def->enum_values.push_back("honeycomb");
|
||||||
|
def->enum_values.push_back("lightning");
|
||||||
def->enum_values.push_back("hollow");
|
def->enum_values.push_back("hollow");
|
||||||
def->enum_labels.push_back(L("Default"));
|
def->enum_labels.push_back(L("Default"));
|
||||||
def->enum_labels.push_back(L("Rectilinear"));
|
def->enum_labels.push_back(L("Rectilinear"));
|
||||||
def->enum_labels.push_back(L("Rectilinear grid"));
|
def->enum_labels.push_back(L("Rectilinear grid"));
|
||||||
def->enum_labels.push_back(L("Lightning"));
|
|
||||||
def->enum_labels.push_back(L("Honeycomb"));
|
def->enum_labels.push_back(L("Honeycomb"));
|
||||||
|
def->enum_labels.push_back(L("Lightning"));
|
||||||
def->enum_labels.push_back(L("Hollow"));
|
def->enum_labels.push_back(L("Hollow"));
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionEnum<SupportMaterialPattern>(smpDefault));
|
def->set_default_value(new ConfigOptionEnum<SupportMaterialPattern>(smpDefault));
|
||||||
|
|||||||
@@ -65,8 +65,9 @@ enum AuthorizationType {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum InfillPattern : int {
|
enum InfillPattern : int {
|
||||||
|
ipMonotonic, ipMonotonicLine,
|
||||||
ipRectilinear, ipAlignedRectilinear, ipZigZag, ipCrossZag, ipLockedZag,
|
ipRectilinear, ipAlignedRectilinear, ipZigZag, ipCrossZag, ipLockedZag,
|
||||||
ipLine, ipGrid, ipMonotonic, ipMonotonicLine,
|
ipLine, ipGrid,
|
||||||
ipTriangles, ipStars,
|
ipTriangles, ipStars,
|
||||||
ipCubic, ipAdaptiveCubic, ipQuarterCubic, ipSupportCubic, ipLightning,
|
ipCubic, ipAdaptiveCubic, ipQuarterCubic, ipSupportCubic, ipLightning,
|
||||||
ipHoneycomb, ip3DHoneycomb, ip2DHoneycomb, ip2DLattice,
|
ipHoneycomb, ip3DHoneycomb, ip2DHoneycomb, ip2DLattice,
|
||||||
|
|||||||
@@ -1549,7 +1549,11 @@ void Choice::set_value(const boost::any& value, bool change_event)
|
|||||||
if (m_opt_id.compare("host_type") == 0 && val != 0 &&
|
if (m_opt_id.compare("host_type") == 0 && val != 0 &&
|
||||||
m_opt.enum_values.size() > field->GetCount()) // for case, when PrusaLink isn't used as a HostType
|
m_opt.enum_values.size() > field->GetCount()) // for case, when PrusaLink isn't used as a HostType
|
||||||
val--;
|
val--;
|
||||||
if (m_opt_id == "top_surface_pattern" || m_opt_id == "bottom_surface_pattern" || m_opt_id == "internal_solid_infill_pattern" || m_opt_id == "sparse_infill_pattern" || m_opt_id == "support_style" || m_opt_id == "curr_bed_type")
|
if (m_opt_id == "top_surface_pattern" || m_opt_id == "bottom_surface_pattern" ||
|
||||||
|
m_opt_id == "internal_solid_infill_pattern" || m_opt_id == "sparse_infill_pattern" ||
|
||||||
|
m_opt_id == "support_base_pattern" || m_opt_id == "support_interface_pattern" ||
|
||||||
|
m_opt_id == "ironing_pattern" || m_opt_id == "support_ironing_pattern" ||
|
||||||
|
m_opt_id == "support_style" || m_opt_id == "curr_bed_type")
|
||||||
{
|
{
|
||||||
std::string key;
|
std::string key;
|
||||||
const t_config_enum_values& map_names = *m_opt.enum_keys_map;
|
const t_config_enum_values& map_names = *m_opt.enum_keys_map;
|
||||||
@@ -1633,21 +1637,27 @@ boost::any& Choice::get_value()
|
|||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
if (m_opt.type == coEnum || m_opt.type == coEnums)
|
if (m_opt.type == coEnum || m_opt.type == coEnums)
|
||||||
{
|
{
|
||||||
if (m_opt.nullable && field->GetSelection() == -1)
|
if (m_opt.nullable && field->GetSelection() == -1)
|
||||||
m_value = ConfigOptionEnumsGenericNullable::nil_value();
|
m_value = ConfigOptionEnumsGenericNullable::nil_value();
|
||||||
else if (m_opt_id == "top_surface_pattern" || m_opt_id == "bottom_surface_pattern" || m_opt_id == "internal_solid_infill_pattern" || m_opt_id == "sparse_infill_pattern" ||
|
else if ( m_opt_id == "top_surface_pattern" || m_opt_id == "bottom_surface_pattern" ||
|
||||||
m_opt_id == "support_style" || m_opt_id == "curr_bed_type") {
|
m_opt_id == "internal_solid_infill_pattern" || m_opt_id == "sparse_infill_pattern" ||
|
||||||
const std::string& key = m_opt.enum_values[field->GetSelection()];
|
m_opt_id == "support_base_pattern" || m_opt_id == "support_interface_pattern" ||
|
||||||
m_value = int(m_opt.enum_keys_map->at(key));
|
m_opt_id == "ironing_pattern" || m_opt_id == "support_ironing_pattern" ||
|
||||||
}
|
m_opt_id == "support_style" || m_opt_id == "curr_bed_type")
|
||||||
|
{
|
||||||
|
const std::string &key = m_opt.enum_values[field->GetSelection()];
|
||||||
|
m_value = int(m_opt.enum_keys_map->at(key));
|
||||||
|
}
|
||||||
// Support ThirdPartyPrinter
|
// Support ThirdPartyPrinter
|
||||||
else if (m_opt_id.compare("host_type") == 0 && m_opt.enum_values.size() > field->GetCount()) {
|
else if (m_opt_id.compare("host_type") == 0 && m_opt.enum_values.size() > field->GetCount())
|
||||||
|
{
|
||||||
// for case, when PrusaLink isn't used as a HostType
|
// for case, when PrusaLink isn't used as a HostType
|
||||||
m_value = field->GetSelection() + 1;
|
m_value = field->GetSelection() + 1;
|
||||||
} else
|
}
|
||||||
m_value = field->GetSelection();
|
else
|
||||||
}
|
m_value = field->GetSelection();
|
||||||
|
}
|
||||||
else if (m_opt.gui_type == ConfigOptionDef::GUIType::f_enum_open || m_opt.gui_type == ConfigOptionDef::GUIType::i_enum_open) {
|
else if (m_opt.gui_type == ConfigOptionDef::GUIType::f_enum_open || m_opt.gui_type == ConfigOptionDef::GUIType::i_enum_open) {
|
||||||
const int ret_enum = field->GetSelection();
|
const int ret_enum = field->GetSelection();
|
||||||
if (m_list) {
|
if (m_list) {
|
||||||
|
|||||||
@@ -290,6 +290,10 @@ static void add_config_substitutions(const ConfigSubstitutions& conf_substitutio
|
|||||||
bool is_infill = def->opt_key == "top_surface_pattern" ||
|
bool is_infill = def->opt_key == "top_surface_pattern" ||
|
||||||
def->opt_key == "bottom_surface_pattern" ||
|
def->opt_key == "bottom_surface_pattern" ||
|
||||||
def->opt_key == "internal_solid_infill_pattern" ||
|
def->opt_key == "internal_solid_infill_pattern" ||
|
||||||
|
def->opt_key == "support_base_pattern" ||
|
||||||
|
def->opt_key == "support_interface_pattern" ||
|
||||||
|
def->opt_key == "ironing_pattern" ||
|
||||||
|
def->opt_key == "support_ironing_pattern" ||
|
||||||
def->opt_key == "sparse_infill_pattern";
|
def->opt_key == "sparse_infill_pattern";
|
||||||
|
|
||||||
// Each infill doesn't use all list of infill declared in PrintConfig.hpp.
|
// Each infill doesn't use all list of infill declared in PrintConfig.hpp.
|
||||||
|
|||||||
@@ -1321,15 +1321,24 @@ static wxString get_string_value(std::string opt_key, const DynamicPrintConfig&
|
|||||||
opt_key == "top_surface_pattern" ||
|
opt_key == "top_surface_pattern" ||
|
||||||
opt_key == "bottom_surface_pattern" ||
|
opt_key == "bottom_surface_pattern" ||
|
||||||
opt_key == "internal_solid_infill_pattern" ||
|
opt_key == "internal_solid_infill_pattern" ||
|
||||||
opt_key == "sparse_infill_pattern");
|
opt_key == "sparse_infill_pattern" ||
|
||||||
|
opt_key == "ironing_pattern" ||
|
||||||
|
opt_key == "support_ironing_pattern" ||
|
||||||
|
opt_key == "support_pattern" ||
|
||||||
|
opt_key == "support_interface_pattern")
|
||||||
|
;
|
||||||
}
|
}
|
||||||
case coEnums: {
|
case coEnums: {
|
||||||
return get_string_from_enum(opt_key, config,
|
return get_string_from_enum(opt_key, config,
|
||||||
opt_key == "top_surface_pattern" ||
|
opt_key == "top_surface_pattern" ||
|
||||||
opt_key == "bottom_surface_pattern" ||
|
opt_key == "bottom_surface_pattern" ||
|
||||||
opt_key == "internal_solid_infill_pattern" ||
|
opt_key == "internal_solid_infill_pattern" ||
|
||||||
opt_key == "sparse_infill_pattern",
|
opt_key == "sparse_infill_pattern" ||
|
||||||
opt_idx);
|
opt_key == "ironing_pattern" ||
|
||||||
|
opt_key == "support_ironing_pattern" ||
|
||||||
|
opt_key == "support_pattern" ||
|
||||||
|
opt_key == "support_interface_pattern"
|
||||||
|
, opt_idx);
|
||||||
}
|
}
|
||||||
case coPoint: {
|
case coPoint: {
|
||||||
Vec2d val = config.opt<ConfigOptionPoint>(opt_key)->value;
|
Vec2d val = config.opt<ConfigOptionPoint>(opt_key)->value;
|
||||||
|
|||||||
Reference in New Issue
Block a user