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
This commit is contained in:
parent
1266e1f19e
commit
a22fd80bf4
|
@ -21,7 +21,6 @@
|
|||
"Bambu PLA Basic @BBL X1"
|
||||
],
|
||||
"default_print_profile": "0.20mm Standard @BBL P1P",
|
||||
"extruder_clearance_max_radius": "56",
|
||||
"extruder_offset": [
|
||||
"0x2"
|
||||
],
|
||||
|
@ -40,4 +39,4 @@
|
|||
"Bambu Lab X1 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.4 nozzle"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
"Bambu PLA Basic @BBL X1C"
|
||||
],
|
||||
"default_print_profile": "0.20mm Standard @BBL X1C",
|
||||
"extruder_clearance_max_radius": "56",
|
||||
"extruder_offset": [
|
||||
"0x2"
|
||||
],
|
||||
|
|
|
@ -532,7 +532,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
|||
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
|
||||
// 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));
|
||||
if (!tmp.empty()) { // tmp may be empty due to clipper's bug, see STUDIO-2452
|
||||
convex_hull = tmp.front();
|
||||
|
@ -739,7 +739,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
|||
{
|
||||
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 iy2 = bbox.max.y();
|
||||
(const_cast<ModelInstance*>(inst->model_instance))->arrange_order = k+1;
|
||||
|
|
|
@ -4415,7 +4415,7 @@ double min_object_distance(const ConfigBase &cfg)
|
|||
else {
|
||||
//BBS: duplicate_distance seam to be useless
|
||||
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");
|
||||
|
||||
if (!ecr_opt || !co_opt)
|
||||
|
@ -4838,8 +4838,8 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
|
|||
}
|
||||
|
||||
// extruder clearance
|
||||
if (cfg.extruder_clearance_radius <= 0) {
|
||||
error_message.emplace("extruder_clearance_radius", L("invalid value ") + std::to_string(cfg.extruder_clearance_radius));
|
||||
if (cfg.extruder_clearance_max_radius <= 0) {
|
||||
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) {
|
||||
error_message.emplace("extruder_clearance_height_to_rod", L("invalid value ") + std::to_string(cfg.extruder_clearance_height_to_rod));
|
||||
|
|
|
@ -3103,7 +3103,7 @@ void TabPrinter::build_fff()
|
|||
optgroup->append_single_option_line("machine_unload_filament_time");
|
||||
|
||||
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_lid");
|
||||
|
||||
|
@ -3685,7 +3685,7 @@ void TabPrinter::toggle_options()
|
|||
// Disable silent mode for non-marlin firmwares.
|
||||
toggle_option("silent_mode", is_marlin_flavor);
|
||||
//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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue