ENH: support for head wrap detect
1.Add "in_head_wrap_detect_zone".Detect if the model projection enters a specified area. jira:[NEW] Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I6aed5a782d2f33f023bdc19cf06dff0957828eeb
This commit is contained in:
parent
c88dbc0cbb
commit
99bb1c213b
|
@ -20,6 +20,12 @@
|
|||
"extruder_clearance_height_to_rod": "25",
|
||||
"extruder_clearance_max_radius": "73",
|
||||
"extruder_clearance_radius": "73",
|
||||
"head_wrap_detect_zone" : [
|
||||
"0x150",
|
||||
"30x150",
|
||||
"0x180",
|
||||
"30x180"
|
||||
],
|
||||
"machine_load_filament_time": "28",
|
||||
"machine_max_acceleration_z": [
|
||||
"1500",
|
||||
|
|
|
@ -1929,11 +1929,17 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
pts->values.emplace_back(unscale(pt));
|
||||
|
||||
BoundingBoxf bbox = first_layer_projection(print);
|
||||
BoundingBoxf bbox_without_plate_offset{
|
||||
{bbox.min.x() - plate_offset.x(),bbox.min.y() - plate_offset.y()},
|
||||
{bbox.max.x() - plate_offset.x(),bbox.max.y() - plate_offset.y()}
|
||||
};
|
||||
BoundingBoxf bbox_head_wrap_zone (print.config().head_wrap_detect_zone.values);
|
||||
|
||||
m_placeholder_parser.set("first_layer_print_convex_hull", pts.release());
|
||||
m_placeholder_parser.set("first_layer_print_min", new ConfigOptionFloats({bbox.min.x() - plate_offset.x(), bbox.min.y() - plate_offset.y()}));
|
||||
m_placeholder_parser.set("first_layer_print_max", new ConfigOptionFloats({bbox.max.x() - plate_offset.x(), bbox.max.y() - plate_offset.y()}));
|
||||
m_placeholder_parser.set("first_layer_print_min", new ConfigOptionFloats({ bbox_without_plate_offset.min.x(),bbox_without_plate_offset.min.y() }));
|
||||
m_placeholder_parser.set("first_layer_print_max", new ConfigOptionFloats({ bbox_without_plate_offset.max.x(),bbox_without_plate_offset.max.y() }));
|
||||
m_placeholder_parser.set("first_layer_print_size", new ConfigOptionFloats({ bbox.size().x(), bbox.size().y() }));
|
||||
m_placeholder_parser.set("in_head_wrap_detect_zone",bbox_head_wrap_zone.overlap(bbox_without_plate_offset));
|
||||
// get center without wipe tower
|
||||
BoundingBoxf bbox_wo_wt;// bounding box without wipe tower
|
||||
for (auto& objPtr : print.objects()) {
|
||||
|
|
|
@ -890,7 +890,7 @@ static std::vector<std::string> s_Preset_printer_options {
|
|||
// BBS
|
||||
"scan_first_layer", "machine_load_filament_time", "machine_unload_filament_time", "machine_pause_gcode", "template_custom_gcode",
|
||||
"nozzle_type","auxiliary_fan", "nozzle_volume","upward_compatible_machine", "z_hop_types","support_chamber_temp_control","support_air_filtration","printer_structure","thumbnail_size",
|
||||
"best_object_pos",
|
||||
"best_object_pos","head_wrap_detect_zone",
|
||||
//OrcaSlicer
|
||||
"host_type", "print_host", "printhost_apikey",
|
||||
"print_host_webui",
|
||||
|
|
|
@ -3327,6 +3327,15 @@ void PrintConfigDef::init_fff_params()
|
|||
def->max = max_temp;
|
||||
def->set_default_value(new ConfigOptionInts { 240 });
|
||||
|
||||
def = this->add("head_wrap_detect_zone", coPoints);
|
||||
def->label ="Head wrap detect zone"; //do not need translation
|
||||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionPoints{
|
||||
Vec2d(0,150),
|
||||
Vec2d(30,150),
|
||||
Vec2d(0,180),
|
||||
Vec2d(30,180)
|
||||
});
|
||||
|
||||
def = this->add("detect_thin_wall", coBool);
|
||||
def->label = L("Detect thin wall");
|
||||
|
|
|
@ -938,6 +938,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
|
|||
((ConfigOptionPoints, printable_area))
|
||||
//BBS: add bed_exclude_area
|
||||
((ConfigOptionPoints, bed_exclude_area))
|
||||
((ConfigOptionPoints, head_wrap_detect_zone))
|
||||
// BBS
|
||||
((ConfigOptionString, bed_custom_texture))
|
||||
((ConfigOptionString, bed_custom_model))
|
||||
|
|
Loading…
Reference in New Issue