mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 14:15:53 +08:00
Squash merge of pull request Raft enhancements #6003
Squashed commit of the following: commit a16674fa9fb5b6f6b7ef10fcdc10838b118142f5 Merge: a5972e64f 28e5e41a7 Author: Vojtech Bubnik <bubnikv@gmail.com> Date: Wed Feb 10 08:56:21 2021 +0100 Merge branch 'rafting_extras_2' of https://github.com/nemart69/PrusaSlicer into nemart69-rafting_extras_2 commit 28e5e41a7802a1ad9b363e1e45d7c2c20aa9dd74 Author: nemart69 <78763471+nemart69@users.noreply.github.com> Date: Wed Feb 10 00:58:50 2021 +0100 Fix after merge with master Fixed missing curly brace after improperly solved merge conflict. commit 02b71f724d4a1be670f4a2e1115b97821c0de0f2 Merge: 08131f065 8fbafbea8 Author: nemart69 <78763471+nemart69@users.noreply.github.com> Date: Tue Feb 9 22:12:26 2021 +0100 Merge branch 'master' into rafting_extras_2 commit 08131f065b3f4f0b60d2bfe16c746d78b361c327 Author: nemart69 <78763471+nemart69@users.noreply.github.com> Date: Tue Feb 9 21:17:19 2021 +0100 Raft changes, GUI part commit 69aae4a2ad4be803b9622a3c2718ec7d3f8dbbb3 Author: nemart69 <78763471+nemart69@users.noreply.github.com> Date: Tue Feb 9 21:15:33 2021 +0100 Raft changes, libslic3r part
This commit is contained in:
parent
a5972e64fa
commit
8e9526e977
@ -154,7 +154,10 @@ static ExtrusionEntityCollection traverse_loops(const PerimeterGenerator &perime
|
|||||||
|
|
||||||
// detect overhanging/bridging perimeters
|
// detect overhanging/bridging perimeters
|
||||||
ExtrusionPaths paths;
|
ExtrusionPaths paths;
|
||||||
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->raft_overhangs
|
||||||
|
&& perimeter_generator.object_config->raft_layers > 0
|
||||||
|
&& perimeter_generator.layer_id == perimeter_generator.object_config->raft_layers)) // RaftingEdition
|
||||||
&& !(perimeter_generator.object_config->support_material && perimeter_generator.object_config->support_material_contact_distance.value == 0)) {
|
&& !(perimeter_generator.object_config->support_material && perimeter_generator.object_config->support_material_contact_distance.value == 0)) {
|
||||||
// get non-overhang paths by intersecting this loop with the grown lower slices
|
// get non-overhang paths by intersecting this loop with the grown lower slices
|
||||||
extrusion_paths_append(
|
extrusion_paths_append(
|
||||||
|
@ -420,6 +420,7 @@ const std::vector<std::string>& Preset::print_options()
|
|||||||
"bridge_speed", "gap_fill_speed", "travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration",
|
"bridge_speed", "gap_fill_speed", "travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration",
|
||||||
"bridge_acceleration", "first_layer_acceleration", "default_acceleration", "skirts", "skirt_distance", "skirt_height", "draft_shield",
|
"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",
|
"min_skirt_length", "brim_width", "brim_offset", "brim_type", "support_material", "support_material_auto", "support_material_threshold", "support_material_enforce_layers",
|
||||||
|
"raft_overhangs", "raft_contact_distance", "raft_xy_size_compensation", "raft_size_adjust",
|
||||||
"raft_layers", "support_material_pattern", "support_material_with_sheath", "support_material_spacing",
|
"raft_layers", "support_material_pattern", "support_material_with_sheath", "support_material_spacing",
|
||||||
"support_material_synchronize_layers", "support_material_angle", "support_material_interface_layers",
|
"support_material_synchronize_layers", "support_material_angle", "support_material_interface_layers",
|
||||||
"support_material_interface_spacing", "support_material_interface_contact_loops", "support_material_contact_distance",
|
"support_material_interface_spacing", "support_material_interface_contact_loops", "support_material_contact_distance",
|
||||||
|
@ -1809,6 +1809,48 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionInt(0));
|
def->set_default_value(new ConfigOptionInt(0));
|
||||||
|
|
||||||
|
// RaftingEdition
|
||||||
|
def = this->add("raft_overhangs", coBool);
|
||||||
|
def->label = L("Bridge flow above raft");
|
||||||
|
def->category = L("Support material");
|
||||||
|
def->tooltip = L("Use bridge flow and speed for the bottom layer. Quality of the layer improves significantly when this setting is off, however it could be difficult to remove the object from raft. Ignored for soluble interface.");
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionBool(false));
|
||||||
|
|
||||||
|
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_xy_size_compensation", coFloat);
|
||||||
|
def->label = L("Bottom layer expansion");
|
||||||
|
def->category = L("Support material");
|
||||||
|
def->tooltip = L("XY plane expansion of the bottom layer. This is useful to compensate shrinking, especially for higher contact Z distances and / or specific materials.");
|
||||||
|
def->sidetext = L("mm");
|
||||||
|
def->min = 0;
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionFloat(0.0));
|
||||||
|
|
||||||
|
def = this->add("raft_size_adjust", coEnum);
|
||||||
|
def->label = L("Raft size");
|
||||||
|
def->category = L("Support material");
|
||||||
|
def->tooltip = L("Raft size adjustment. Can be used to improve adhesion or reduce material consumption / save some printing area.");
|
||||||
|
def->enum_keys_map = &ConfigOptionEnum<RaftSizeAdjust>::get_enum_values();
|
||||||
|
def->enum_values.push_back("small");
|
||||||
|
def->enum_values.push_back("normal");
|
||||||
|
def->enum_values.push_back("large");
|
||||||
|
def->enum_values.push_back("extralarge");
|
||||||
|
def->enum_labels.push_back("Small");
|
||||||
|
def->enum_labels.push_back("Normal");
|
||||||
|
def->enum_labels.push_back("Large");
|
||||||
|
def->enum_labels.push_back("Extra large");
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionEnum<RaftSizeAdjust>(rsaNormal));
|
||||||
|
|
||||||
def = this->add("resolution", coFloat);
|
def = this->add("resolution", coFloat);
|
||||||
def->label = L("Resolution");
|
def->label = L("Resolution");
|
||||||
def->tooltip = L("Minimum detail resolution, used to simplify the input file for speeding up "
|
def->tooltip = L("Minimum detail resolution, used to simplify the input file for speeding up "
|
||||||
|
@ -110,6 +110,13 @@ enum BrimType {
|
|||||||
btOuterAndInner,
|
btOuterAndInner,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum RaftSizeAdjust {
|
||||||
|
rsaSmall,
|
||||||
|
rsaNormal,
|
||||||
|
rsaLarge,
|
||||||
|
rsaExtraLarge
|
||||||
|
};
|
||||||
|
|
||||||
template<> inline const t_config_enum_values& ConfigOptionEnum<PrinterTechnology>::get_enum_values() {
|
template<> inline const t_config_enum_values& ConfigOptionEnum<PrinterTechnology>::get_enum_values() {
|
||||||
static t_config_enum_values keys_map;
|
static t_config_enum_values keys_map;
|
||||||
if (keys_map.empty()) {
|
if (keys_map.empty()) {
|
||||||
@ -282,6 +289,18 @@ template<> inline const t_config_enum_values& ConfigOptionEnum<BrimType>::get_en
|
|||||||
return keys_map;
|
return keys_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<> inline const t_config_enum_values& ConfigOptionEnum<RaftSizeAdjust>::get_enum_values() {
|
||||||
|
static const t_config_enum_values keys_map = {
|
||||||
|
{ "small", rsaSmall },
|
||||||
|
{ "normal", rsaNormal },
|
||||||
|
{ "large", rsaLarge },
|
||||||
|
{ "extralarge", rsaExtraLarge }
|
||||||
|
};
|
||||||
|
|
||||||
|
return keys_map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Defines each and every confiuration option of Slic3r, including the properties of the GUI dialogs.
|
// Defines each and every confiuration option of Slic3r, including the properties of the GUI dialogs.
|
||||||
// Does not store the actual values, but defines default values.
|
// Does not store the actual values, but defines default values.
|
||||||
class PrintConfigDef : public ConfigDef
|
class PrintConfigDef : public ConfigDef
|
||||||
@ -512,6 +531,10 @@ public:
|
|||||||
ConfigOptionBool interface_shells;
|
ConfigOptionBool interface_shells;
|
||||||
ConfigOptionFloat layer_height;
|
ConfigOptionFloat layer_height;
|
||||||
ConfigOptionInt raft_layers;
|
ConfigOptionInt raft_layers;
|
||||||
|
ConfigOptionBool raft_overhangs;
|
||||||
|
ConfigOptionFloat raft_contact_distance;
|
||||||
|
ConfigOptionFloat raft_xy_size_compensation;
|
||||||
|
ConfigOptionEnum<RaftSizeAdjust> raft_size_adjust;
|
||||||
ConfigOptionEnum<SeamPosition> seam_position;
|
ConfigOptionEnum<SeamPosition> seam_position;
|
||||||
// ConfigOptionFloat seam_preferred_direction;
|
// ConfigOptionFloat seam_preferred_direction;
|
||||||
// ConfigOptionFloat seam_preferred_direction_jitter;
|
// ConfigOptionFloat seam_preferred_direction_jitter;
|
||||||
@ -563,6 +586,10 @@ protected:
|
|||||||
OPT_PTR(interface_shells);
|
OPT_PTR(interface_shells);
|
||||||
OPT_PTR(layer_height);
|
OPT_PTR(layer_height);
|
||||||
OPT_PTR(raft_layers);
|
OPT_PTR(raft_layers);
|
||||||
|
OPT_PTR(raft_overhangs);
|
||||||
|
OPT_PTR(raft_contact_distance);
|
||||||
|
OPT_PTR(raft_xy_size_compensation);
|
||||||
|
OPT_PTR(raft_size_adjust);
|
||||||
OPT_PTR(seam_position);
|
OPT_PTR(seam_position);
|
||||||
OPT_PTR(slice_closing_radius);
|
OPT_PTR(slice_closing_radius);
|
||||||
// OPT_PTR(seam_preferred_direction);
|
// OPT_PTR(seam_preferred_direction);
|
||||||
|
@ -535,6 +535,10 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|
|||||||
opt_key == "layer_height"
|
opt_key == "layer_height"
|
||||||
|| opt_key == "first_layer_height"
|
|| opt_key == "first_layer_height"
|
||||||
|| opt_key == "raft_layers"
|
|| opt_key == "raft_layers"
|
||||||
|
|| opt_key == "raft_overhangs"
|
||||||
|
|| opt_key == "raft_contact_distance"
|
||||||
|
|| opt_key == "raft_xy_size_compensation"
|
||||||
|
|| opt_key == "raft_size_adjust"
|
||||||
|| opt_key == "slice_closing_radius") {
|
|| opt_key == "slice_closing_radius") {
|
||||||
steps.emplace_back(posSlice);
|
steps.emplace_back(posSlice);
|
||||||
} else if (
|
} else if (
|
||||||
@ -760,7 +764,8 @@ void PrintObject::detect_surfaces_type()
|
|||||||
[this, idx_region, interface_shells, &surfaces_new](const tbb::blocked_range<size_t>& range) {
|
[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.
|
// 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 =
|
SurfaceType surface_type_bottom_1st =
|
||||||
(m_config.raft_layers.value > 0 && m_config.support_material_contact_distance.value > 0) ?
|
(m_config.raft_layers.value > 0 && m_config.support_material_contact_distance.value > 0 &&
|
||||||
|
/* RaftingEdition */ m_config.raft_overhangs.value) ?
|
||||||
stBottomBridge : stBottom;
|
stBottomBridge : stBottom;
|
||||||
// If we have soluble support material, don't bridge. The overhang will be squished against a soluble layer separating
|
// If we have soluble support material, don't bridge. The overhang will be squished against a soluble layer separating
|
||||||
// the support from the print.
|
// the support from the print.
|
||||||
@ -1937,7 +1942,10 @@ end:
|
|||||||
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - make_slices in parallel - begin";
|
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - make_slices in parallel - begin";
|
||||||
{
|
{
|
||||||
// Compensation value, scaled.
|
// 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 _xy_compensation_1st_scaled = _xy_compensation_scaled + (m_config.raft_layers > 0) ?
|
||||||
|
// Apply optional compensation / expand the first layer above the raft. (RaftingEdition)
|
||||||
|
float(scale_(m_config.raft_xy_size_compensation.value)) : 0.f;
|
||||||
const float elephant_foot_compensation_scaled = (m_config.raft_layers == 0) ?
|
const float elephant_foot_compensation_scaled = (m_config.raft_layers == 0) ?
|
||||||
// Only enable Elephant foot compensation if printing directly on the print bed.
|
// Only enable Elephant foot compensation if printing directly on the print bed.
|
||||||
float(scale_(m_config.elefant_foot_compensation.value)) :
|
float(scale_(m_config.elefant_foot_compensation.value)) :
|
||||||
@ -1946,13 +1954,14 @@ end:
|
|||||||
ExPolygons lslices_1st_layer;
|
ExPolygons lslices_1st_layer;
|
||||||
tbb::parallel_for(
|
tbb::parallel_for(
|
||||||
tbb::blocked_range<size_t>(0, m_layers.size()),
|
tbb::blocked_range<size_t>(0, m_layers.size()),
|
||||||
[this, upscaled, clipped, xy_compensation_scaled, elephant_foot_compensation_scaled, &lslices_1st_layer]
|
[this, upscaled, clipped, _xy_compensation_scaled, _xy_compensation_1st_scaled, elephant_foot_compensation_scaled, &lslices_1st_layer]
|
||||||
(const tbb::blocked_range<size_t>& range) {
|
(const tbb::blocked_range<size_t>& range) {
|
||||||
for (size_t layer_id = range.begin(); layer_id < range.end(); ++ layer_id) {
|
for (size_t layer_id = range.begin(); layer_id < range.end(); ++ layer_id) {
|
||||||
m_print->throw_if_canceled();
|
m_print->throw_if_canceled();
|
||||||
Layer *layer = m_layers[layer_id];
|
Layer *layer = m_layers[layer_id];
|
||||||
// Apply size compensation and perform clipping of multi-part objects.
|
// Apply size compensation and perform clipping of multi-part objects.
|
||||||
float elfoot = (layer_id == 0) ? elephant_foot_compensation_scaled : 0.f;
|
float elfoot = (layer_id == 0) ? elephant_foot_compensation_scaled : 0.f;
|
||||||
|
float xy_compensation_scaled = (layer_id == 0) ? _xy_compensation_1st_scaled : _xy_compensation_scaled; // RaftingEdition
|
||||||
if (layer->m_regions.size() == 1) {
|
if (layer->m_regions.size() == 1) {
|
||||||
assert(! upscaled);
|
assert(! upscaled);
|
||||||
assert(! clipped);
|
assert(! clipped);
|
||||||
|
@ -110,8 +110,9 @@ SlicingParameters SlicingParameters::create_from_config(
|
|||||||
params.min_layer_height = std::min(params.min_layer_height, params.layer_height);
|
params.min_layer_height = std::min(params.min_layer_height, params.layer_height);
|
||||||
params.max_layer_height = std::max(params.max_layer_height, params.layer_height);
|
params.max_layer_height = std::max(params.max_layer_height, params.layer_height);
|
||||||
|
|
||||||
|
// RaftingEdition: independent contact distance for raft, first object layer height not messed up
|
||||||
if (! soluble_interface) {
|
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_object_support = object_config.support_material_contact_distance.value;
|
||||||
params.gap_support_object = object_config.support_material_contact_distance.value;
|
params.gap_support_object = object_config.support_material_contact_distance.value;
|
||||||
}
|
}
|
||||||
@ -127,6 +128,7 @@ SlicingParameters SlicingParameters::create_from_config(
|
|||||||
#if 1
|
#if 1
|
||||||
params.contact_raft_layer_height = std::max(params.layer_height, 0.75 * support_material_interface_extruder_dmr);
|
params.contact_raft_layer_height = std::max(params.layer_height, 0.75 * support_material_interface_extruder_dmr);
|
||||||
if (! soluble_interface) {
|
if (! soluble_interface) {
|
||||||
|
if (object_config.raft_overhangs.value) {
|
||||||
// Compute the average of all nozzles used for printing the object over a raft.
|
// 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?
|
//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.;
|
coordf_t average_object_extruder_dmr = 0.;
|
||||||
@ -138,6 +140,7 @@ SlicingParameters SlicingParameters::create_from_config(
|
|||||||
params.first_object_layer_height = average_object_extruder_dmr;
|
params.first_object_layer_height = average_object_extruder_dmr;
|
||||||
params.first_object_layer_bridging = true;
|
params.first_object_layer_bridging = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#else
|
#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 = soluble_interface ? support_material_interface_extruder_dmr : 0.75 * support_material_interface_extruder_dmr;
|
||||||
params.contact_raft_layer_height_bridging = ! soluble_interface;
|
params.contact_raft_layer_height_bridging = ! soluble_interface;
|
||||||
@ -150,13 +153,13 @@ 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.
|
//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) {
|
if (params.raft_layers() == 1) {
|
||||||
// There is only the contact layer.
|
// There is only the contact layer.
|
||||||
params.contact_raft_layer_height = first_layer_height;
|
params.first_print_layer_height = params.contact_raft_layer_height;
|
||||||
params.raft_contact_top_z = first_layer_height;
|
params.raft_contact_top_z = params.contact_raft_layer_height;
|
||||||
} else {
|
} else {
|
||||||
assert(params.base_raft_layers > 0);
|
assert(params.base_raft_layers > 0);
|
||||||
assert(params.interface_raft_layers > 0);
|
assert(params.interface_raft_layers > 0);
|
||||||
// Number of the base raft layers is decreased by the first layer.
|
params.first_print_layer_height = params.base_raft_layer_height;
|
||||||
params.raft_base_top_z = first_layer_height + coordf_t(params.base_raft_layers - 1) * params.base_raft_layer_height;
|
params.raft_base_top_z = coordf_t(params.base_raft_layers) * params.base_raft_layer_height;
|
||||||
// Number of the interface raft layers is decreased by the contact layer.
|
// Number of the interface raft layers is decreased by the contact layer.
|
||||||
params.raft_interface_top_z = params.raft_base_top_z + coordf_t(params.interface_raft_layers - 1) * params.interface_raft_layer_height;
|
params.raft_interface_top_z = params.raft_base_top_z + coordf_t(params.interface_raft_layers - 1) * params.interface_raft_layer_height;
|
||||||
params.raft_contact_top_z = params.raft_interface_top_z + params.contact_raft_layer_height;
|
params.raft_contact_top_z = params.raft_interface_top_z + params.contact_raft_layer_height;
|
||||||
|
@ -1040,8 +1040,17 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::top_contact_
|
|||||||
// we're here just to get the object footprint for the raft.
|
// 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.
|
// We only consider contours and discard holes to get a more continuous raft.
|
||||||
overhang_polygons = collect_slices_outer(layer);
|
overhang_polygons = collect_slices_outer(layer);
|
||||||
// Extend by SUPPORT_MATERIAL_MARGIN, which is 1.5mm
|
// RaftingEdition
|
||||||
contact_polygons = offset(overhang_polygons, scale_(SUPPORT_MATERIAL_MARGIN));
|
float adjust;
|
||||||
|
switch (m_object_config->raft_size_adjust.value) {
|
||||||
|
case rsaSmall: adjust = scale_(SUPPORT_MATERIAL_MARGIN / 2); break;
|
||||||
|
default:
|
||||||
|
case rsaNormal: adjust = scale_(SUPPORT_MATERIAL_MARGIN * 1); break;
|
||||||
|
case rsaLarge: adjust = scale_(SUPPORT_MATERIAL_MARGIN * 3); break;
|
||||||
|
case rsaExtraLarge: adjust = scale_(SUPPORT_MATERIAL_MARGIN * 4); break;
|
||||||
|
}
|
||||||
|
// Extend by a multiple of SUPPORT_MATERIAL_MARGIN, which is 1.5mm
|
||||||
|
contact_polygons = offset(overhang_polygons, adjust);
|
||||||
} else {
|
} else {
|
||||||
// Generate overhang / contact_polygons for non-raft layers.
|
// Generate overhang / contact_polygons for non-raft layers.
|
||||||
const Layer &lower_layer = *object.layers()[layer_id-1];
|
const Layer &lower_layer = *object.layers()[layer_id-1];
|
||||||
@ -1841,7 +1850,7 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::raft_and_int
|
|||||||
assert(extr2z > extr1z || (extr1 != nullptr && extr2->layer_type == sltBottomContact));
|
assert(extr2z > extr1z || (extr1 != nullptr && extr2->layer_type == sltBottomContact));
|
||||||
if (std::abs(extr1z) < EPSILON) {
|
if (std::abs(extr1z) < EPSILON) {
|
||||||
// This layer interval starts with the 1st layer. Print the 1st layer using the prescribed 1st layer thickness.
|
// 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);
|
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.
|
// 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);
|
assert(extr2z >= m_slicing_params.first_print_layer_height + EPSILON);
|
||||||
@ -2169,7 +2178,9 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::generate_raf
|
|||||||
{
|
{
|
||||||
// How much to inflate the support columns to be stable. This also applies to the 1st layer, if no raft layers are to be printed.
|
// How much to inflate the support columns to be stable. This also applies to the 1st layer, if no raft layers are to be printed.
|
||||||
const float inflate_factor_fine = float(scale_((m_slicing_params.raft_layers() > 1) ? 0.5 : EPSILON));
|
const float inflate_factor_fine = float(scale_((m_slicing_params.raft_layers() > 1) ? 0.5 : EPSILON));
|
||||||
const float inflate_factor_1st_layer = float(scale_(3.)) - inflate_factor_fine;
|
const float inflate_factor_1st_layer = float(scale_((m_slicing_params.raft_layers() > 0 &&
|
||||||
|
m_object_config->raft_size_adjust.value == rsaSmall) ?
|
||||||
|
1.5 /* RaftingEdition */ : 3.)) - inflate_factor_fine;
|
||||||
MyLayer *contacts = top_contacts .empty() ? nullptr : top_contacts .front();
|
MyLayer *contacts = top_contacts .empty() ? nullptr : top_contacts .front();
|
||||||
MyLayer *interfaces = interface_layers.empty() ? nullptr : interface_layers.front();
|
MyLayer *interfaces = interface_layers.empty() ? nullptr : interface_layers.front();
|
||||||
MyLayer *columns_base = base_layers .empty() ? nullptr : base_layers .front();
|
MyLayer *columns_base = base_layers .empty() ? nullptr : base_layers .front();
|
||||||
|
@ -294,6 +294,11 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
|
|||||||
toggle_field("support_material_extruder", have_support_material || have_skirt);
|
toggle_field("support_material_extruder", have_support_material || have_skirt);
|
||||||
toggle_field("support_material_speed", have_support_material || have_brim || have_skirt);
|
toggle_field("support_material_speed", have_support_material || have_brim || have_skirt);
|
||||||
|
|
||||||
|
for (auto el : { "raft_xy_size_compensation", "raft_size_adjust" })
|
||||||
|
toggle_field(el, have_raft);
|
||||||
|
for (auto el : { "raft_overhangs", "raft_contact_distance" })
|
||||||
|
toggle_field(el, have_raft && !have_support_soluble);
|
||||||
|
|
||||||
bool has_ironing = config->opt_bool("ironing");
|
bool has_ironing = config->opt_bool("ironing");
|
||||||
for (auto el : { "ironing_type", "ironing_flowrate", "ironing_spacing", "ironing_speed" })
|
for (auto el : { "ironing_type", "ironing_flowrate", "ironing_spacing", "ironing_speed" })
|
||||||
toggle_field(el, has_ironing);
|
toggle_field(el, has_ironing);
|
||||||
|
@ -1222,6 +1222,9 @@ boost::any& Choice::get_value()
|
|||||||
m_value = static_cast<AuthorizationType>(ret_enum);
|
m_value = static_cast<AuthorizationType>(ret_enum);
|
||||||
else if (m_opt_id == "brim_type")
|
else if (m_opt_id == "brim_type")
|
||||||
m_value = static_cast<BrimType>(ret_enum);
|
m_value = static_cast<BrimType>(ret_enum);
|
||||||
|
else if (m_opt_id == "raft_size_adjust")
|
||||||
|
m_value = static_cast<RaftSizeAdjust>(ret_enum);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (m_opt.gui_type == "f_enum_open") {
|
else if (m_opt.gui_type == "f_enum_open") {
|
||||||
const int ret_enum = field->GetSelection();
|
const int ret_enum = field->GetSelection();
|
||||||
@ -1625,5 +1628,3 @@ boost::any& SliderCtrl::get_value()
|
|||||||
|
|
||||||
} // GUI
|
} // GUI
|
||||||
} // Slic3r
|
} // Slic3r
|
||||||
|
|
||||||
|
|
||||||
|
@ -204,6 +204,8 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
|
|||||||
config.set_key_value(opt_key, new ConfigOptionEnum<AuthorizationType>(boost::any_cast<AuthorizationType>(value)));
|
config.set_key_value(opt_key, new ConfigOptionEnum<AuthorizationType>(boost::any_cast<AuthorizationType>(value)));
|
||||||
else if(opt_key == "brim_type")
|
else if(opt_key == "brim_type")
|
||||||
config.set_key_value(opt_key, new ConfigOptionEnum<BrimType>(boost::any_cast<BrimType>(value)));
|
config.set_key_value(opt_key, new ConfigOptionEnum<BrimType>(boost::any_cast<BrimType>(value)));
|
||||||
|
else if (opt_key == "raft_size_adjust")
|
||||||
|
config.set_key_value(opt_key, new ConfigOptionEnum<RaftSizeAdjust>(boost::any_cast<RaftSizeAdjust>(value)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case coPoints:{
|
case coPoints:{
|
||||||
|
@ -902,6 +902,9 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
|
|||||||
else if (opt_key == "brim_type") {
|
else if (opt_key == "brim_type") {
|
||||||
ret = static_cast<int>(config.option<ConfigOptionEnum<BrimType>>(opt_key)->value);
|
ret = static_cast<int>(config.option<ConfigOptionEnum<BrimType>>(opt_key)->value);
|
||||||
}
|
}
|
||||||
|
else if (opt_key == "raft_size_adjust") {
|
||||||
|
ret = static_cast<int>(config.option<ConfigOptionEnum<RaftSizeAdjust>>(opt_key)->value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case coPoints:
|
case coPoints:
|
||||||
|
@ -1941,7 +1941,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||||||
// These values are necessary to construct SlicingParameters by the Canvas3D variable layer height editor.
|
// These values are necessary to construct SlicingParameters by the Canvas3D variable layer height editor.
|
||||||
"layer_height", "first_layer_height", "min_layer_height", "max_layer_height",
|
"layer_height", "first_layer_height", "min_layer_height", "max_layer_height",
|
||||||
"brim_width", "perimeters", "perimeter_extruder", "fill_density", "infill_extruder", "top_solid_layers",
|
"brim_width", "perimeters", "perimeter_extruder", "fill_density", "infill_extruder", "top_solid_layers",
|
||||||
"support_material", "support_material_extruder", "support_material_interface_extruder", "support_material_contact_distance", "raft_layers"
|
"support_material", "support_material_extruder", "support_material_interface_extruder", "support_material_contact_distance", "raft_layers",
|
||||||
|
"raft_overhangs", "raft_contact_distance", "raft_xy_size_compensation", "raft_size_adjust"
|
||||||
}))
|
}))
|
||||||
, sidebar(new Sidebar(q))
|
, sidebar(new Sidebar(q))
|
||||||
, m_ui_jobs(this)
|
, m_ui_jobs(this)
|
||||||
|
@ -1500,7 +1500,11 @@ void TabPrint::build()
|
|||||||
|
|
||||||
optgroup = page->new_optgroup(L("Raft"));
|
optgroup = page->new_optgroup(L("Raft"));
|
||||||
optgroup->append_single_option_line("raft_layers", category_path + "raft-layers");
|
optgroup->append_single_option_line("raft_layers", category_path + "raft-layers");
|
||||||
// # optgroup->append_single_option_line(get_option_("raft_contact_distance");
|
// RaftingEdition
|
||||||
|
optgroup->append_single_option_line("raft_overhangs");
|
||||||
|
optgroup->append_single_option_line("raft_contact_distance");
|
||||||
|
optgroup->append_single_option_line("raft_xy_size_compensation");
|
||||||
|
optgroup->append_single_option_line("raft_size_adjust");
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Options for support material and raft"));
|
optgroup = page->new_optgroup(L("Options for support material and raft"));
|
||||||
optgroup->append_single_option_line("support_material_contact_distance", category_path + "contact-z-distance");
|
optgroup->append_single_option_line("support_material_contact_distance", category_path + "contact-z-distance");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user