mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
parent
255b23f0fc
commit
aee136cedd
14 changed files with 168 additions and 164 deletions
|
@ -197,7 +197,7 @@ static ExtrusionEntityCollection traverse_loops(const PerimeterGenerator &perime
|
|||
fuzzified = loop.polygon;
|
||||
fuzzy_polygon(fuzzified, scaled<float>(perimeter_generator.config->fuzzy_skin_thickness.value), scaled<float>(perimeter_generator.config->fuzzy_skin_point_dist.value));
|
||||
}
|
||||
if (perimeter_generator.config->overhangs && perimeter_generator.layer_id > 0
|
||||
if (perimeter_generator.config->overhangs && perimeter_generator.layer_id > perimeter_generator.object_config->raft_layers
|
||||
&& ! ((perimeter_generator.object_config->support_material || perimeter_generator.object_config->support_material_enforce_layers > 0) &&
|
||||
perimeter_generator.object_config->support_material_contact_distance.value == 0)) {
|
||||
// get non-overhang paths by intersecting this loop with the grown lower slices
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// !!! If you needed to translate some string,
|
||||
// !!! please use _L(string)
|
||||
// !!! _() - is a standard wxWidgets macro to translate
|
||||
// !!! L() is used only for marking localizable string
|
||||
// !!! L() is used only for marking localizable string
|
||||
// !!! It will be used in "xgettext" to create a Locating Message Catalog.
|
||||
#define L(s) s
|
||||
#endif /* L */
|
||||
|
@ -392,7 +392,7 @@ void Preset::set_visible_from_appconfig(const AppConfig &app_config)
|
|||
} else if (type == TYPE_FILAMENT || type == TYPE_SLA_MATERIAL) {
|
||||
const std::string §ion_name = (type == TYPE_FILAMENT) ? AppConfig::SECTION_FILAMENTS : AppConfig::SECTION_MATERIALS;
|
||||
if (app_config.has_section(section_name)) {
|
||||
// Check whether this profile is marked as "installed" in PrusaSlicer.ini,
|
||||
// Check whether this profile is marked as "installed" in PrusaSlicer.ini,
|
||||
// or whether a profile is marked as "installed", which this profile may have been renamed from.
|
||||
const std::map<std::string, std::string> &installed = app_config.get_section(section_name);
|
||||
auto has = [&installed](const std::string &name) {
|
||||
|
@ -409,12 +409,12 @@ void Preset::set_visible_from_appconfig(const AppConfig &app_config)
|
|||
const std::vector<std::string>& Preset::print_options()
|
||||
{
|
||||
static std::vector<std::string> s_opts {
|
||||
"layer_height", "first_layer_height", "perimeters", "spiral_vase", "slice_closing_radius",
|
||||
"layer_height", "first_layer_height", "perimeters", "spiral_vase", "slice_closing_radius",
|
||||
"top_solid_layers", "top_solid_min_thickness", "bottom_solid_layers", "bottom_solid_min_thickness",
|
||||
"extra_perimeters", "ensure_vertical_shell_thickness", "avoid_crossing_perimeters", "thin_walls", "overhangs",
|
||||
"seam_position", "external_perimeters_first", "fill_density", "fill_pattern", "top_fill_pattern", "bottom_fill_pattern",
|
||||
"infill_every_layers", "infill_only_where_needed", "solid_infill_every_layers", "fill_angle", "bridge_angle",
|
||||
"solid_infill_below_area", "only_retract_when_crossing_perimeters", "infill_first",
|
||||
"solid_infill_below_area", "only_retract_when_crossing_perimeters", "infill_first",
|
||||
"ironing", "ironing_type", "ironing_flowrate", "ironing_speed", "ironing_spacing",
|
||||
"max_print_speed", "max_volumetric_speed", "avoid_crossing_perimeters_max_detour",
|
||||
"fuzzy_skin", "fuzzy_skin_thickness", "fuzzy_skin_point_dist",
|
||||
|
@ -426,7 +426,7 @@ const std::vector<std::string>& Preset::print_options()
|
|||
"bridge_speed", "gap_fill_speed", "gap_fill_enabled", "travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration",
|
||||
"bridge_acceleration", "first_layer_acceleration", "default_acceleration", "skirts", "skirt_distance", "skirt_height", "draft_shield",
|
||||
"min_skirt_length", "brim_width", "brim_offset", "brim_type", "support_material", "support_material_auto", "support_material_threshold", "support_material_enforce_layers",
|
||||
"raft_layers", "raft_first_layer_density", "raft_first_layer_expansion",
|
||||
"raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion",
|
||||
"support_material_pattern", "support_material_with_sheath", "support_material_spacing",
|
||||
"support_material_synchronize_layers", "support_material_angle", "support_material_interface_layers",
|
||||
"support_material_interface_spacing", "support_material_interface_contact_loops", "support_material_contact_distance",
|
||||
|
@ -492,7 +492,7 @@ const std::vector<std::string>& Preset::printer_options()
|
|||
"between_objects_gcode", "printer_vendor", "printer_model", "printer_variant", "printer_notes", "cooling_tube_retraction",
|
||||
"cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "max_print_height",
|
||||
"default_print_profile", "inherits",
|
||||
"remaining_times", "silent_mode",
|
||||
"remaining_times", "silent_mode",
|
||||
"machine_limits_usage", "thumbnails"
|
||||
};
|
||||
s_opts.insert(s_opts.end(), Preset::machine_limits_options().begin(), Preset::machine_limits_options().end());
|
||||
|
@ -653,7 +653,7 @@ void PresetCollection::add_default_preset(const std::vector<std::string> &keys,
|
|||
// Throws an exception on error.
|
||||
void PresetCollection::load_presets(const std::string &dir_path, const std::string &subdir)
|
||||
{
|
||||
// Don't use boost::filesystem::canonical() on Windows, it is broken in regard to reparse points,
|
||||
// Don't use boost::filesystem::canonical() on Windows, it is broken in regard to reparse points,
|
||||
// see https://github.com/prusa3d/PrusaSlicer/issues/732
|
||||
boost::filesystem::path dir = boost::filesystem::absolute(boost::filesystem::path(dir_path) / subdir).make_preferred();
|
||||
m_dir_path = dir.string();
|
||||
|
@ -977,7 +977,7 @@ const Preset* PresetCollection::get_selected_preset_parent() const
|
|||
// Resolve the "renamed_from" field.
|
||||
assert(! inherits.empty());
|
||||
auto it = this->find_preset_renamed(inherits);
|
||||
if (it != m_presets.end())
|
||||
if (it != m_presets.end())
|
||||
preset = &(*it);
|
||||
}
|
||||
return (preset == nullptr/* || preset->is_default*/ || preset->is_external) ? nullptr : preset;
|
||||
|
@ -992,17 +992,17 @@ const Preset* PresetCollection::get_preset_parent(const Preset& child) const
|
|||
const Preset* preset = this->find_preset(inherits, false);
|
||||
if (preset == nullptr) {
|
||||
auto it = this->find_preset_renamed(inherits);
|
||||
if (it != m_presets.end())
|
||||
if (it != m_presets.end())
|
||||
preset = &(*it);
|
||||
}
|
||||
return
|
||||
return
|
||||
// not found
|
||||
(preset == nullptr/* || preset->is_default */||
|
||||
(preset == nullptr/* || preset->is_default */||
|
||||
// this should not happen, user profile should not derive from an external profile
|
||||
preset->is_external ||
|
||||
// this should not happen, however people are creative, see GH #4996
|
||||
preset == &child) ?
|
||||
nullptr :
|
||||
preset == &child) ?
|
||||
nullptr :
|
||||
preset;
|
||||
}
|
||||
|
||||
|
@ -1029,7 +1029,7 @@ const std::string& PresetCollection::get_preset_name_by_alias(const std::string&
|
|||
// Continue over all profile names with the same alias.
|
||||
it != m_map_alias_to_profile_name.end() && it->first == alias; ++ it)
|
||||
if (auto it_preset = this->find_preset_internal(it->second);
|
||||
it_preset != m_presets.end() && it_preset->name == it->second &&
|
||||
it_preset != m_presets.end() && it_preset->name == it->second &&
|
||||
it_preset->is_visible && (it_preset->is_compatible || size_t(it_preset - m_presets.begin()) == m_idx_selected))
|
||||
return it_preset->name;
|
||||
return alias;
|
||||
|
@ -1099,7 +1099,7 @@ size_t PresetCollection::update_compatible_internal(const PresetWithVendorProfil
|
|||
some_compatible |= preset_edited.is_compatible;
|
||||
if (active_print != nullptr)
|
||||
preset_edited.is_compatible &= is_compatible_with_print(this_preset_with_vendor_profile, *active_print, active_printer);
|
||||
if (! preset_edited.is_compatible && selected &&
|
||||
if (! preset_edited.is_compatible && selected &&
|
||||
(unselect_if_incompatible == PresetSelectCompatibleType::Always || (unselect_if_incompatible == PresetSelectCompatibleType::OnlyIfWasCompatible && was_compatible)))
|
||||
m_idx_selected = size_t(-1);
|
||||
if (selected)
|
||||
|
@ -1440,13 +1440,13 @@ const std::set<std::string>& PhysicalPrinter::get_preset_names() const
|
|||
return preset_names;
|
||||
}
|
||||
|
||||
bool PhysicalPrinter::has_empty_config() const
|
||||
bool PhysicalPrinter::has_empty_config() const
|
||||
{
|
||||
return config.opt_string("print_host" ).empty() &&
|
||||
config.opt_string("printhost_apikey" ).empty() &&
|
||||
config.opt_string("printhost_cafile" ).empty() &&
|
||||
return config.opt_string("print_host" ).empty() &&
|
||||
config.opt_string("printhost_apikey" ).empty() &&
|
||||
config.opt_string("printhost_cafile" ).empty() &&
|
||||
config.opt_string("printhost_port" ).empty() &&
|
||||
config.opt_string("printhost_user" ).empty() &&
|
||||
config.opt_string("printhost_user" ).empty() &&
|
||||
config.opt_string("printhost_password").empty();
|
||||
}
|
||||
|
||||
|
@ -1458,7 +1458,7 @@ void PhysicalPrinter::update_preset_names_in_config()
|
|||
name += el + ";";
|
||||
name.pop_back();
|
||||
config.set_key_value("preset_name", new ConfigOptionString(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PhysicalPrinter::save(const std::string& file_name_from, const std::string& file_name_to)
|
||||
|
@ -1507,7 +1507,7 @@ bool PhysicalPrinter::delete_preset(const std::string& preset_name)
|
|||
return preset_names.erase(preset_name) > 0;
|
||||
}
|
||||
|
||||
PhysicalPrinter::PhysicalPrinter(const std::string& name, const DynamicPrintConfig& default_config) :
|
||||
PhysicalPrinter::PhysicalPrinter(const std::string& name, const DynamicPrintConfig& default_config) :
|
||||
name(name), config(default_config)
|
||||
{
|
||||
update_from_config(config);
|
||||
|
@ -1564,7 +1564,7 @@ PhysicalPrinterCollection::PhysicalPrinterCollection( const std::vector<std::str
|
|||
// Throws an exception on error.
|
||||
void PhysicalPrinterCollection::load_printers(const std::string& dir_path, const std::string& subdir)
|
||||
{
|
||||
// Don't use boost::filesystem::canonical() on Windows, it is broken in regard to reparse points,
|
||||
// Don't use boost::filesystem::canonical() on Windows, it is broken in regard to reparse points,
|
||||
// see https://github.com/prusa3d/PrusaSlicer/issues/732
|
||||
boost::filesystem::path dir = boost::filesystem::absolute(boost::filesystem::path(dir_path) / subdir).make_preferred();
|
||||
m_dir_path = dir.string();
|
||||
|
@ -1716,7 +1716,7 @@ PhysicalPrinter* PhysicalPrinterCollection::find_printer_with_same_config(const
|
|||
for (const char *opt : legacy_print_host_options)
|
||||
if (is_equal && printer.config.opt_string(opt) != config.opt_string(opt))
|
||||
is_equal = false;
|
||||
|
||||
|
||||
if (is_equal)
|
||||
return find_printer(printer.name);
|
||||
}
|
||||
|
@ -1732,7 +1732,7 @@ std::string PhysicalPrinterCollection::path_from_name(const std::string& new_nam
|
|||
|
||||
void PhysicalPrinterCollection::save_printer(PhysicalPrinter& edited_printer, const std::string& renamed_from/* = ""*/)
|
||||
{
|
||||
// controll and update preset_names in edited_printer config
|
||||
// controll and update preset_names in edited_printer config
|
||||
edited_printer.update_preset_names_in_config();
|
||||
|
||||
std::string name = renamed_from.empty() ? edited_printer.name : renamed_from;
|
||||
|
@ -1824,7 +1824,7 @@ std::vector<std::string> PhysicalPrinterCollection::get_printers_with_preset(con
|
|||
|
||||
for (auto printer : m_printers) {
|
||||
if (printer.preset_names.size() == 1)
|
||||
continue;
|
||||
continue;
|
||||
if (printer.preset_names.find(preset_name) != printer.preset_names.end())
|
||||
printers.emplace_back(printer.name);
|
||||
}
|
||||
|
@ -1894,7 +1894,7 @@ void PhysicalPrinterCollection::unselect_printer()
|
|||
|
||||
bool PhysicalPrinterCollection::is_selected(PhysicalPrinterCollection::ConstIterator it, const std::string& preset_name) const
|
||||
{
|
||||
return m_idx_selected == size_t(it - m_printers.begin()) &&
|
||||
return m_idx_selected == size_t(it - m_printers.begin()) &&
|
||||
m_selected_preset == preset_name;
|
||||
}
|
||||
|
||||
|
|
|
@ -1775,6 +1775,24 @@ void PrintConfigDef::init_fff_params()
|
|||
def->set_default_value(new ConfigOptionString(""));
|
||||
def->cli = ConfigOptionDef::nocli;
|
||||
|
||||
def = this->add("raft_contact_distance", coFloat);
|
||||
def->label = L("Raft contact Z distance");
|
||||
def->category = L("Support material");
|
||||
def->tooltip = L("The vertical distance between object and raft. Ignored for soluble interface.");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.1));
|
||||
|
||||
def = this->add("raft_expansion", coFloat);
|
||||
def->label = L("Raft expansion");
|
||||
def->category = L("Support material");
|
||||
def->tooltip = L("Expansion of the raft in XY plane for better stability.");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloat(1.5));
|
||||
|
||||
def = this->add("raft_first_layer_density", coPercent);
|
||||
def->label = L("First layer density");
|
||||
def->category = L("Support material");
|
||||
|
|
|
@ -473,6 +473,8 @@ public:
|
|||
// Force the generation of solid shells between adjacent materials/volumes.
|
||||
ConfigOptionBool interface_shells;
|
||||
ConfigOptionFloat layer_height;
|
||||
ConfigOptionFloat raft_contact_distance;
|
||||
ConfigOptionFloat raft_expansion;
|
||||
ConfigOptionPercent raft_first_layer_density;
|
||||
ConfigOptionFloat raft_first_layer_expansion;
|
||||
ConfigOptionInt raft_layers;
|
||||
|
@ -522,6 +524,8 @@ protected:
|
|||
OPT_PTR(infill_only_where_needed);
|
||||
OPT_PTR(interface_shells);
|
||||
OPT_PTR(layer_height);
|
||||
OPT_PTR(raft_contact_distance);
|
||||
OPT_PTR(raft_expansion);
|
||||
OPT_PTR(raft_first_layer_density);
|
||||
OPT_PTR(raft_first_layer_expansion);
|
||||
OPT_PTR(raft_layers);
|
||||
|
@ -1090,7 +1094,7 @@ public:
|
|||
// The percentage of smaller pillars compared to the normal pillar diameter
|
||||
// which are used in problematic areas where a normal pilla cannot fit.
|
||||
ConfigOptionPercent support_small_pillar_diameter_percent;
|
||||
|
||||
|
||||
// How much bridge (supporting another pinhead) can be placed on a pillar.
|
||||
ConfigOptionInt support_max_bridges_on_pillar;
|
||||
|
||||
|
@ -1142,7 +1146,7 @@ public:
|
|||
|
||||
// The height of the pad from the bottom to the top not considering the pit
|
||||
ConfigOptionFloat pad_wall_height /*= 5*/;
|
||||
|
||||
|
||||
// How far should the pad extend around the contained geometry
|
||||
ConfigOptionFloat pad_brim_size;
|
||||
|
||||
|
@ -1166,7 +1170,7 @@ public:
|
|||
|
||||
// Disable the elevation (ignore its value) and use the zero elevation mode
|
||||
ConfigOptionBool pad_around_object;
|
||||
|
||||
|
||||
ConfigOptionBool pad_around_object_everywhere;
|
||||
|
||||
// This is the gap between the object bottom and the generated pad
|
||||
|
@ -1180,7 +1184,7 @@ public:
|
|||
|
||||
// How much should the tiny connectors penetrate into the model body
|
||||
ConfigOptionFloat pad_object_connector_penetration;
|
||||
|
||||
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
// Model hollowing parameters:
|
||||
// - Models can be hollowed out as part of the SLA print process
|
||||
|
@ -1189,17 +1193,17 @@ public:
|
|||
// - Additional holes will be drilled into the hollow model to allow for
|
||||
// - resin removal.
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ConfigOptionBool hollowing_enable;
|
||||
|
||||
// The minimum thickness of the model walls to maintain. Note that the
|
||||
|
||||
// The minimum thickness of the model walls to maintain. Note that the
|
||||
// resulting walls may be thicker due to smoothing out fine cavities where
|
||||
// resin could stuck.
|
||||
ConfigOptionFloat hollowing_min_thickness;
|
||||
|
||||
|
||||
// Indirectly controls the voxel size (resolution) used by openvdb
|
||||
ConfigOptionFloat hollowing_quality;
|
||||
|
||||
|
||||
// Indirectly controls the minimum size of created cavities.
|
||||
ConfigOptionFloat hollowing_closing_distance;
|
||||
|
||||
|
@ -1421,13 +1425,13 @@ Points get_bed_shape(const SLAPrinterConfig &cfg);
|
|||
// ModelConfig is a wrapper around DynamicPrintConfig with an addition of a timestamp.
|
||||
// Each change of ModelConfig is tracked by assigning a new timestamp from a global counter.
|
||||
// The counter is used for faster synchronization of the background slicing thread
|
||||
// with the front end by skipping synchronization of equal config dictionaries.
|
||||
// The global counter is also used for avoiding unnecessary serialization of config
|
||||
// with the front end by skipping synchronization of equal config dictionaries.
|
||||
// The global counter is also used for avoiding unnecessary serialization of config
|
||||
// dictionaries when taking an Undo snapshot.
|
||||
//
|
||||
// The global counter is NOT thread safe, therefore it is recommended to use ModelConfig from
|
||||
// the main thread only.
|
||||
//
|
||||
//
|
||||
// As there is a global counter and it is being increased with each change to any ModelConfig,
|
||||
// if two ModelConfig dictionaries differ, they should differ with their timestamp as well.
|
||||
// Therefore copying the ModelConfig including its timestamp is safe as there is no harm
|
||||
|
|
|
@ -542,6 +542,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
opt_key == "layer_height"
|
||||
|| opt_key == "first_layer_height"
|
||||
|| opt_key == "raft_layers"
|
||||
|| opt_key == "raft_contact_distance"
|
||||
|| opt_key == "slice_closing_radius") {
|
||||
steps.emplace_back(posSlice);
|
||||
} else if (
|
||||
|
@ -576,6 +577,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "support_material_synchronize_layers"
|
||||
|| opt_key == "support_material_threshold"
|
||||
|| opt_key == "support_material_with_sheath"
|
||||
|| opt_key == "raft_expansion"
|
||||
|| opt_key == "raft_first_layer_density"
|
||||
|| opt_key == "raft_first_layer_expansion"
|
||||
|| opt_key == "dont_support_bridges"
|
||||
|
@ -766,10 +768,6 @@ void PrintObject::detect_surfaces_type()
|
|||
// In non-spiral vase mode, go over all layers.
|
||||
m_layers.size()),
|
||||
[this, idx_region, interface_shells, &surfaces_new](const tbb::blocked_range<size_t>& range) {
|
||||
// If we have raft layers, consider bottom layer as a bridge just like any other bottom surface lying on the void.
|
||||
SurfaceType surface_type_bottom_1st =
|
||||
(this->has_raft() && m_config.support_material_contact_distance.value > 0) ?
|
||||
stBottomBridge : stBottom;
|
||||
// If we have soluble support material, don't bridge. The overhang will be squished against a soluble layer separating
|
||||
// the support from the print.
|
||||
SurfaceType surface_type_bottom_other =
|
||||
|
@ -848,7 +846,7 @@ void PrintObject::detect_surfaces_type()
|
|||
// we clone surfaces because we're going to clear the slices collection
|
||||
bottom = layerm->slices.surfaces;
|
||||
for (Surface &surface : bottom)
|
||||
surface.surface_type = surface_type_bottom_1st;
|
||||
surface.surface_type = stBottom;
|
||||
}
|
||||
|
||||
// now, if the object contained a thin membrane, we could have overlapping bottom
|
||||
|
@ -1945,7 +1943,7 @@ end:
|
|||
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - make_slices in parallel - begin";
|
||||
{
|
||||
// Compensation value, scaled.
|
||||
const float xy_compensation_scaled = float(scale_(m_config.xy_size_compensation.value));
|
||||
const float xy_compensation_scaled = float(scale_(m_config.xy_size_compensation.value));
|
||||
const float elephant_foot_compensation_scaled = (m_config.raft_layers == 0) ?
|
||||
// Only enable Elephant foot compensation if printing directly on the print bed.
|
||||
float(scale_(m_config.elefant_foot_compensation.value)) :
|
||||
|
|
|
@ -111,7 +111,7 @@ SlicingParameters SlicingParameters::create_from_config(
|
|||
params.max_layer_height = std::max(params.max_layer_height, params.layer_height);
|
||||
|
||||
if (! soluble_interface) {
|
||||
params.gap_raft_object = object_config.support_material_contact_distance.value;
|
||||
params.gap_raft_object = object_config.raft_contact_distance.value;
|
||||
params.gap_object_support = object_config.support_material_contact_distance.value;
|
||||
params.gap_support_object = object_config.support_material_contact_distance.value;
|
||||
}
|
||||
|
@ -122,27 +122,9 @@ SlicingParameters SlicingParameters::create_from_config(
|
|||
// Use as large as possible layer height for the intermediate raft layers.
|
||||
params.base_raft_layer_height = std::max(params.layer_height, 0.75 * support_material_extruder_dmr);
|
||||
params.interface_raft_layer_height = std::max(params.layer_height, 0.75 * support_material_interface_extruder_dmr);
|
||||
params.contact_raft_layer_height_bridging = false;
|
||||
params.first_object_layer_bridging = false;
|
||||
#if 1
|
||||
params.contact_raft_layer_height = std::max(params.layer_height, 0.75 * support_material_interface_extruder_dmr);
|
||||
if (! soluble_interface) {
|
||||
// Compute the average of all nozzles used for printing the object over a raft.
|
||||
//FIXME It is expected, that the 1st layer of the object is printed with a bridging flow over a full raft. Shall it not be vice versa?
|
||||
coordf_t average_object_extruder_dmr = 0.;
|
||||
if (! object_extruders.empty()) {
|
||||
for (unsigned int extruder_id : object_extruders)
|
||||
average_object_extruder_dmr += print_config.nozzle_diameter.get_at(extruder_id);
|
||||
average_object_extruder_dmr /= coordf_t(object_extruders.size());
|
||||
}
|
||||
params.first_object_layer_height = average_object_extruder_dmr;
|
||||
params.first_object_layer_bridging = true;
|
||||
}
|
||||
#else
|
||||
params.contact_raft_layer_height = soluble_interface ? support_material_interface_extruder_dmr : 0.75 * support_material_interface_extruder_dmr;
|
||||
params.contact_raft_layer_height_bridging = ! soluble_interface;
|
||||
...
|
||||
#endif
|
||||
params.first_object_layer_height = params.layer_height;
|
||||
}
|
||||
|
||||
if (params.has_raft()) {
|
||||
|
@ -150,8 +132,8 @@ SlicingParameters SlicingParameters::create_from_config(
|
|||
//FIXME The last raft layer is the contact layer, which shall be printed with a bridging flow for ease of separation. Currently it is not the case.
|
||||
if (params.raft_layers() == 1) {
|
||||
// There is only the contact layer.
|
||||
params.contact_raft_layer_height = first_layer_height;
|
||||
params.raft_contact_top_z = first_layer_height;
|
||||
params.contact_raft_layer_height = first_layer_height;
|
||||
params.raft_contact_top_z = first_layer_height;
|
||||
} else {
|
||||
assert(params.base_raft_layers > 0);
|
||||
assert(params.interface_raft_layers > 0);
|
||||
|
|
|
@ -55,7 +55,6 @@ struct SlicingParameters
|
|||
coordf_t base_raft_layer_height;
|
||||
coordf_t interface_raft_layer_height;
|
||||
coordf_t contact_raft_layer_height;
|
||||
bool contact_raft_layer_height_bridging;
|
||||
|
||||
// The regular layer height, applied for all but the first layer, if not overridden by layer ranges
|
||||
// or by the variable layer thickness table.
|
||||
|
@ -110,7 +109,6 @@ inline bool equal_layering(const SlicingParameters &sp1, const SlicingParameters
|
|||
sp1.base_raft_layer_height == sp2.base_raft_layer_height &&
|
||||
sp1.interface_raft_layer_height == sp2.interface_raft_layer_height &&
|
||||
sp1.contact_raft_layer_height == sp2.contact_raft_layer_height &&
|
||||
sp1.contact_raft_layer_height_bridging == sp2.contact_raft_layer_height_bridging &&
|
||||
sp1.layer_height == sp2.layer_height &&
|
||||
sp1.min_layer_height == sp2.min_layer_height &&
|
||||
sp1.max_layer_height == sp2.max_layer_height &&
|
||||
|
|
|
@ -44,6 +44,10 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
// how much we extend support around the actual contact area
|
||||
//FIXME this should be dependent on the nozzle diameter!
|
||||
#define SUPPORT_MATERIAL_MARGIN 1.5
|
||||
|
||||
// Increment used to reach MARGIN in steps to avoid trespassing thin objects
|
||||
#define NUM_MARGIN_STEPS 3
|
||||
|
||||
|
@ -1342,8 +1346,8 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::top_contact_
|
|||
// we're here just to get the object footprint for the raft.
|
||||
// We only consider contours and discard holes to get a more continuous raft.
|
||||
overhang_polygons = collect_slices_outer(layer);
|
||||
// Extend by SUPPORT_MATERIAL_MARGIN, which is 1.5mm
|
||||
contact_polygons = offset(overhang_polygons, scale_(SUPPORT_MATERIAL_MARGIN));
|
||||
// Expand for better stability.
|
||||
contact_polygons = offset(overhang_polygons, scaled<float>(m_object_config->raft_expansion.value));
|
||||
} else {
|
||||
// Generate overhang / contact_polygons for non-raft layers.
|
||||
const Layer &lower_layer = *object.layers()[layer_id-1];
|
||||
|
@ -2178,7 +2182,7 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::raft_and_int
|
|||
assert(extr2z > extr1z || (extr1 != nullptr && extr2->layer_type == sltBottomContact));
|
||||
if (std::abs(extr1z) < EPSILON) {
|
||||
// This layer interval starts with the 1st layer. Print the 1st layer using the prescribed 1st layer thickness.
|
||||
assert(! m_slicing_params.has_raft());
|
||||
// assert(! m_slicing_params.has_raft()); RaftingEdition: unclear where the issue is: assert fails with 1-layer raft & base supports
|
||||
assert(intermediate_layers.empty() || intermediate_layers.back()->print_z <= m_slicing_params.first_print_layer_height);
|
||||
// At this point only layers above first_print_layer_heigth + EPSILON are expected as the other cases were captured earlier.
|
||||
assert(extr2z >= m_slicing_params.first_print_layer_height + EPSILON);
|
||||
|
@ -3540,15 +3544,17 @@ void PrintObjectSupportMaterial::generate_toolpaths(
|
|||
} else
|
||||
continue;
|
||||
filler->link_max_length = coord_t(scale_(filler->spacing * link_max_length_factor / density));
|
||||
fill_expolygons_generate_paths(
|
||||
fill_expolygons_with_sheath_generate_paths(
|
||||
// Destination
|
||||
support_layer.support_fills.entities,
|
||||
// Regions to fill
|
||||
offset2_ex(raft_layer.polygons, float(SCALED_EPSILON), float(- SCALED_EPSILON)),
|
||||
raft_layer.polygons,
|
||||
// Filler and its parameters
|
||||
filler, density,
|
||||
// Extrusion parameters
|
||||
(support_layer_id < m_slicing_params.base_raft_layers) ? erSupportMaterial : erSupportMaterialInterface, flow);
|
||||
(support_layer_id < m_slicing_params.base_raft_layers) ? erSupportMaterial : erSupportMaterialInterface, flow,
|
||||
// sheath at first layer
|
||||
support_layer_id == 0);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -11,10 +11,6 @@ class PrintObject;
|
|||
class PrintConfig;
|
||||
class PrintObjectConfig;
|
||||
|
||||
// how much we extend support around the actual contact area
|
||||
//FIXME this should be dependent on the nozzle diameter!
|
||||
#define SUPPORT_MATERIAL_MARGIN 1.5
|
||||
|
||||
// This class manages raft and supports for a single PrintObject.
|
||||
// Instantiated by Slic3r::Print::Object->_support_material()
|
||||
// This class is instantiated before the slicing starts as Object.pm will query
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue