mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
ENH: refine the logic of extruder_clearance_radius
1. use extruder_clearance_max_radius instead 2. set the value of P1P/P1S to the same value of X1C JIRA: STUDIO-4214 Change-Id: I1ae5e4203db0933854b4388b5505dbf34b40edae (cherry picked from commit 19cb6a0fbad0192d39813e449baed090baa163c5)
This commit is contained in:
parent
5957912eaa
commit
6d5fad236e
5 changed files with 8 additions and 10 deletions
|
@ -21,7 +21,6 @@
|
||||||
"Bambu PLA Basic @BBL X1"
|
"Bambu PLA Basic @BBL X1"
|
||||||
],
|
],
|
||||||
"default_print_profile": "0.20mm Standard @BBL P1P",
|
"default_print_profile": "0.20mm Standard @BBL P1P",
|
||||||
"extruder_clearance_max_radius": "56",
|
|
||||||
"extruder_offset": [
|
"extruder_offset": [
|
||||||
"0x2"
|
"0x2"
|
||||||
],
|
],
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
"0x28"
|
"0x28"
|
||||||
],
|
],
|
||||||
"default_print_profile": "0.20mm Standard @BBL X1C",
|
"default_print_profile": "0.20mm Standard @BBL X1C",
|
||||||
"extruder_clearance_max_radius": "56",
|
|
||||||
"extruder_offset": [
|
"extruder_offset": [
|
||||||
"0x2"
|
"0x2"
|
||||||
],
|
],
|
||||||
|
|
|
@ -529,7 +529,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||||
auto tmp = offset(convex_hull_no_offset,
|
auto tmp = offset(convex_hull_no_offset,
|
||||||
// Shrink the extruder_clearance_radius a tiny bit, so that if the object arrangement algorithm placed the objects
|
// Shrink the extruder_clearance_radius a tiny bit, so that if the object arrangement algorithm placed the objects
|
||||||
// exactly by satisfying the extruder_clearance_radius, this test will not trigger collision.
|
// exactly by satisfying the extruder_clearance_radius, this test will not trigger collision.
|
||||||
float(scale_(0.5 * print.config().extruder_clearance_max_radius.value - EPSILON)),
|
float(scale_(0.5 * print.config().extruder_clearance_max_radius.value - 0.01)),
|
||||||
jtRound, scale_(0.1));
|
jtRound, scale_(0.1));
|
||||||
if (!tmp.empty()) { // tmp may be empty due to clipper's bug, see STUDIO-2452
|
if (!tmp.empty()) { // tmp may be empty due to clipper's bug, see STUDIO-2452
|
||||||
convex_hull = tmp.front();
|
convex_hull = tmp.front();
|
||||||
|
@ -736,7 +736,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||||
{
|
{
|
||||||
auto inst = print_instance_with_bounding_box[k].print_instance;
|
auto inst = print_instance_with_bounding_box[k].print_instance;
|
||||||
// 只需要考虑喷嘴到滑杆的偏移量,这个比整个工具头的碰撞半径要小得多
|
// 只需要考虑喷嘴到滑杆的偏移量,这个比整个工具头的碰撞半径要小得多
|
||||||
auto bbox = print_instance_with_bounding_box[k].bounding_box.inflated(-scale_(0.5 * print.config().extruder_clearance_radius.value));
|
auto bbox = print_instance_with_bounding_box[k].bounding_box.inflated(-scale_(0.5 * print.config().extruder_clearance_max_radius.value));
|
||||||
auto iy1 = bbox.min.y();
|
auto iy1 = bbox.min.y();
|
||||||
auto iy2 = bbox.max.y();
|
auto iy2 = bbox.max.y();
|
||||||
(const_cast<ModelInstance*>(inst->model_instance))->arrange_order = k+1;
|
(const_cast<ModelInstance*>(inst->model_instance))->arrange_order = k+1;
|
||||||
|
|
|
@ -4321,7 +4321,7 @@ double min_object_distance(const ConfigBase &cfg)
|
||||||
else {
|
else {
|
||||||
//BBS: duplicate_distance seam to be useless
|
//BBS: duplicate_distance seam to be useless
|
||||||
constexpr double duplicate_distance = 6.;
|
constexpr double duplicate_distance = 6.;
|
||||||
auto ecr_opt = cfg.option<ConfigOptionFloat>("extruder_clearance_radius");
|
auto ecr_opt = cfg.option<ConfigOptionFloat>("extruder_clearance_max_radius");
|
||||||
auto co_opt = cfg.option<ConfigOptionEnum<PrintSequence>>("print_sequence");
|
auto co_opt = cfg.option<ConfigOptionEnum<PrintSequence>>("print_sequence");
|
||||||
|
|
||||||
if (!ecr_opt || !co_opt)
|
if (!ecr_opt || !co_opt)
|
||||||
|
@ -4744,8 +4744,8 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
|
||||||
}
|
}
|
||||||
|
|
||||||
// extruder clearance
|
// extruder clearance
|
||||||
if (cfg.extruder_clearance_radius <= 0) {
|
if (cfg.extruder_clearance_max_radius <= 0) {
|
||||||
error_message.emplace("extruder_clearance_radius", L("invalid value ") + std::to_string(cfg.extruder_clearance_radius));
|
error_message.emplace("extruder_clearance_max_radius", L("invalid value ") + std::to_string(cfg.extruder_clearance_max_radius));
|
||||||
}
|
}
|
||||||
if (cfg.extruder_clearance_height_to_rod <= 0) {
|
if (cfg.extruder_clearance_height_to_rod <= 0) {
|
||||||
error_message.emplace("extruder_clearance_height_to_rod", L("invalid value ") + std::to_string(cfg.extruder_clearance_height_to_rod));
|
error_message.emplace("extruder_clearance_height_to_rod", L("invalid value ") + std::to_string(cfg.extruder_clearance_height_to_rod));
|
||||||
|
|
|
@ -3074,7 +3074,7 @@ void TabPrinter::build_fff()
|
||||||
optgroup->append_single_option_line("machine_unload_filament_time");
|
optgroup->append_single_option_line("machine_unload_filament_time");
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Extruder Clearance"));
|
optgroup = page->new_optgroup(L("Extruder Clearance"));
|
||||||
optgroup->append_single_option_line("extruder_clearance_radius");
|
optgroup->append_single_option_line("extruder_clearance_max_radius");
|
||||||
optgroup->append_single_option_line("extruder_clearance_height_to_rod");
|
optgroup->append_single_option_line("extruder_clearance_height_to_rod");
|
||||||
optgroup->append_single_option_line("extruder_clearance_height_to_lid");
|
optgroup->append_single_option_line("extruder_clearance_height_to_lid");
|
||||||
|
|
||||||
|
@ -3642,7 +3642,7 @@ void TabPrinter::toggle_options()
|
||||||
// Disable silent mode for non-marlin firmwares.
|
// Disable silent mode for non-marlin firmwares.
|
||||||
toggle_option("silent_mode", is_marlin_flavor);
|
toggle_option("silent_mode", is_marlin_flavor);
|
||||||
//BBS: extruder clearance of BBL printer can't be edited.
|
//BBS: extruder clearance of BBL printer can't be edited.
|
||||||
for (auto el : { "extruder_clearance_radius", "extruder_clearance_height_to_rod", "extruder_clearance_height_to_lid" })
|
for (auto el : { "extruder_clearance_max_radius", "extruder_clearance_height_to_rod", "extruder_clearance_height_to_lid" })
|
||||||
toggle_option(el, !is_BBL_printer);
|
toggle_option(el, !is_BBL_printer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue