mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-01 17:38:42 +03:00
Many issues have been optimized and fixed
This commit is contained in:
@@ -385,6 +385,10 @@ void AppConfig::set_defaults()
|
||||
|
||||
if (get("allow_ip_resolve").empty())
|
||||
set("allow_ip_resolve", "1");
|
||||
|
||||
if(get("switch to device tab after upload").empty())
|
||||
set_bool("switch to device tab after upload", false);
|
||||
|
||||
// Remove legacy window positions/sizes
|
||||
erase("app", "main_frame_maximized");
|
||||
erase("app", "main_frame_pos");
|
||||
|
||||
@@ -2130,6 +2130,10 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
if (m_config.support_air_filtration.getBool() && m_config.activate_air_filtration.get_at(initial_extruder_id)) {
|
||||
file.write(m_writer.set_exhaust_fan(m_config.during_print_exhaust_fan_speed.get_at(initial_extruder_id), true));
|
||||
}
|
||||
//w36
|
||||
else {
|
||||
file.write(m_writer.set_exhaust_fan(0, true));
|
||||
}
|
||||
|
||||
print.throw_if_canceled();
|
||||
|
||||
@@ -2425,13 +2429,15 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
activate_air_filtration |= m_config.activate_air_filtration.get_at(extruder.id());
|
||||
activate_air_filtration &= m_config.support_air_filtration.getBool();
|
||||
|
||||
if (activate_air_filtration) {
|
||||
//w36
|
||||
/*if (activate_air_filtration) {
|
||||
int complete_print_exhaust_fan_speed = 0;
|
||||
for (const auto& extruder : m_writer.extruders())
|
||||
if (m_config.activate_air_filtration.get_at(extruder.id()))
|
||||
complete_print_exhaust_fan_speed = std::max(complete_print_exhaust_fan_speed, m_config.complete_print_exhaust_fan_speed.get_at(extruder.id()));
|
||||
file.write(m_writer.set_exhaust_fan(complete_print_exhaust_fan_speed, true));
|
||||
}
|
||||
}*/
|
||||
file.write(m_writer.set_exhaust_fan(0, true));
|
||||
//w25
|
||||
file.write(DoExport::update_print_stats_and_format_filament_stats(
|
||||
// Const inputs
|
||||
@@ -5720,9 +5726,104 @@ std::string GCode::set_object_info(Print* print)
|
||||
gcode << "EXCLUDE_OBJECT_DEFINE NAME=" << get_instance_name(object, inst) << " CENTER=" << center.x()
|
||||
<< "," << center.y() << " POLYGON=" << polygon_to_string(inst.get_convex_hull_2d(), print)
|
||||
<< "\n";
|
||||
|
||||
//w33
|
||||
std::string instance_name = get_instance_name(object, inst);
|
||||
bool has_pa_pattern = false;
|
||||
bool has_pa_line = false;
|
||||
if (instance_name.find("pa_pattern") != std::string::npos) {
|
||||
has_pa_pattern = true;
|
||||
}
|
||||
else if(instance_name.find("pa_line") != std::string::npos){
|
||||
has_pa_line = true;
|
||||
|
||||
}
|
||||
if ((has_pa_pattern == true || has_pa_line == true) &&(print->calib_params().mode == CalibMode::Calib_PA_Line || print->calib_params().mode == CalibMode::Calib_PA_Pattern)) {
|
||||
double ext_x = 0;
|
||||
double box_width = 0;
|
||||
|
||||
double pa_line_width = print->default_region_config().outer_wall_line_width.value == 0 ?
|
||||
print->default_object_config().line_width.value == 0 ?
|
||||
EXTRUDER_CONFIG(nozzle_diameter) * 1.125 :
|
||||
print->default_object_config().line_width.value :
|
||||
print->default_region_config().outer_wall_line_width.value;
|
||||
if (has_pa_line)
|
||||
box_width = 80;
|
||||
else if(has_pa_pattern)
|
||||
box_width = 38 - pa_line_width - m_config.layer_height * (1 - M_PI / 4);
|
||||
|
||||
|
||||
PrintInstance inst = print->objects().front()->instances().front();
|
||||
auto bbox = inst.get_bounding_box();
|
||||
|
||||
const Polygon polygon = inst.get_convex_hull_2d();
|
||||
|
||||
ext_x = print->translate_to_print_space(polygon.points.at(1)).x() - print->translate_to_print_space(polygon.points.front()).x();
|
||||
|
||||
std::ostringstream pa_area_poly_gcode;
|
||||
pa_area_poly_gcode << "[";
|
||||
|
||||
double sum_x = 0;
|
||||
double sum_y = 0;
|
||||
Vec2d first_v(print->translate_to_print_space(polygon.points.at(0)).x()+ ext_x, print->translate_to_print_space(polygon.points.at(0)).y());
|
||||
|
||||
for (int i = 0; i < polygon.points.size(); i++) {
|
||||
const auto v = print->translate_to_print_space(polygon.points.at(i));
|
||||
if (i == 0 || i == 3) {
|
||||
pa_area_poly_gcode << "[" << v.x() + ext_x << "," << v.y() << "],";
|
||||
sum_x += v.x() + ext_x;
|
||||
sum_y += v.y();
|
||||
first_v(v.x() + ext_x, v.y());
|
||||
}
|
||||
else if(i==1 || i == 2){
|
||||
pa_area_poly_gcode << "[" << v.x()+ box_width << "," << v.y() << "],";
|
||||
sum_x += v.x() + box_width;
|
||||
sum_y += v.y();
|
||||
}
|
||||
}
|
||||
double center_x = sum_x / 4;
|
||||
double center_y = sum_y / 4;
|
||||
pa_area_poly_gcode << "[" << first_v.x() << "," << first_v.y() << "]";
|
||||
pa_area_poly_gcode << "]";
|
||||
|
||||
gcode << "EXCLUDE_OBJECT_DEFINE NAME=" << "calib_area_id_1_copy_0" << " CENTER=" << center_x
|
||||
<< "," << center_y << " POLYGON=" << pa_area_poly_gcode.str()
|
||||
<< "\n";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (print->m_tool_ordering.has_wipe_tower()&& print->config().enable_prime_tower) {
|
||||
const FakeWipeTower wipe_tower_data =print->m_fake_wipe_tower;
|
||||
double wipe_tower_width = wipe_tower_data.width;
|
||||
double wipe_tower_depth = wipe_tower_data.depth;
|
||||
double wipe_tower_x = wipe_tower_data.pos.x();
|
||||
double wipe_tower_y = wipe_tower_data.pos.y();
|
||||
double wipe_tower_brim_width = wipe_tower_data.brim_width;
|
||||
double real_width = wipe_tower_width + 2 * wipe_tower_brim_width;
|
||||
double real_depth = wipe_tower_depth + 2 * wipe_tower_brim_width;
|
||||
double first_tower_x = wipe_tower_x - wipe_tower_brim_width;
|
||||
double first_tower_y = wipe_tower_y - wipe_tower_brim_width;
|
||||
double center_x = first_tower_x + real_width / 2;
|
||||
double center_y = first_tower_y + real_depth / 2;
|
||||
|
||||
std::ostringstream wipe_tower_area_gcode;
|
||||
wipe_tower_area_gcode << "[";
|
||||
|
||||
wipe_tower_area_gcode << "[" << first_tower_x << "," << first_tower_y << "],";
|
||||
wipe_tower_area_gcode << "[" << first_tower_x + real_width << "," << first_tower_y << "],";
|
||||
wipe_tower_area_gcode << "[" << first_tower_x + real_width << "," << first_tower_y + real_depth << "],";
|
||||
wipe_tower_area_gcode << "[" << first_tower_x << "," << first_tower_y + real_depth << "],";
|
||||
|
||||
wipe_tower_area_gcode << "[" << first_tower_x << "," << first_tower_y << "]";
|
||||
wipe_tower_area_gcode << "]";
|
||||
|
||||
gcode << "EXCLUDE_OBJECT_DEFINE NAME=" << "wipe_tower_area" << " CENTER=" << center_x
|
||||
<< "," << center_y << " POLYGON=" << wipe_tower_area_gcode.str()
|
||||
<< "\n";
|
||||
}
|
||||
return gcode.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -919,6 +919,8 @@ static std::vector<std::string> s_Preset_printer_options {
|
||||
"printhost_cafile","printhost_port","printhost_authorization_type",
|
||||
"printhost_user", "printhost_password", "printhost_ssl_ignore_revoke",
|
||||
"use_relative_e_distances", "extruder_type","use_firmware_retraction"
|
||||
//w34
|
||||
,"support_multi_bed_types"
|
||||
};
|
||||
|
||||
static std::vector<std::string> s_Preset_sla_print_options {
|
||||
|
||||
@@ -45,9 +45,12 @@ static std::vector<std::string> s_project_options {
|
||||
|
||||
//QDS: add QDT as default
|
||||
const char *PresetBundle::QDT_BUNDLE = "QDT";
|
||||
const char *PresetBundle::QDT_DEFAULT_PRINTER_MODEL = "QIDI Lab X1 Carbon";
|
||||
const char *PresetBundle::QDT_BUNDLE_Q = "Q Series";
|
||||
const char *PresetBundle::QDT_BUNDLE_X_3 = "X 3 Series";
|
||||
const char *PresetBundle::QDT_BUNDLE_X_4 = "X 4 Series";
|
||||
const char *PresetBundle::QDT_DEFAULT_PRINTER_MODEL = "X-Plus 4";
|
||||
const char *PresetBundle::QDT_DEFAULT_PRINTER_VARIANT = "0.4";
|
||||
const char *PresetBundle::QDT_DEFAULT_FILAMENT = "Generic PLA";
|
||||
const char *PresetBundle::QDT_DEFAULT_FILAMENT = "QIDI PLA Rapido";
|
||||
|
||||
PresetBundle::PresetBundle()
|
||||
: prints(Preset::TYPE_PRINT, Preset::print_options(), static_cast<const PrintRegionConfig &>(FullPrintConfig::defaults()))
|
||||
|
||||
@@ -243,6 +243,9 @@ public:
|
||||
|
||||
//QDS: add QDT as default
|
||||
static const char *QDT_BUNDLE;
|
||||
static const char *QDT_BUNDLE_Q;
|
||||
static const char *QDT_BUNDLE_X_3;
|
||||
static const char *QDT_BUNDLE_X_4;
|
||||
static const char *QDT_DEFAULT_PRINTER_MODEL;
|
||||
static const char *QDT_DEFAULT_PRINTER_VARIANT;
|
||||
static const char *QDT_DEFAULT_FILAMENT;
|
||||
|
||||
@@ -258,7 +258,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||
|| opt_key == "initial_layer_infill_speed"
|
||||
|| opt_key == "travel_speed"
|
||||
|| opt_key == "travel_speed_z"
|
||||
|| opt_key == "initial_layer_speed") {
|
||||
|| opt_key == "initial_layer_speed"
|
||||
//w34
|
||||
|| opt_key == "support_multi_bed_types") {
|
||||
//|| opt_key == "z_offset") {
|
||||
steps.emplace_back(psWipeTower);
|
||||
steps.emplace_back(psSkirtBrim);
|
||||
|
||||
@@ -2071,6 +2071,13 @@ void PrintConfigDef::init_fff_params()
|
||||
def->readonly = false;
|
||||
def->set_default_value(new ConfigOptionEnum<GCodeFlavor>(gcfMarlinLegacy));
|
||||
|
||||
//w34
|
||||
def = this->add("support_multi_bed_types", coBool);
|
||||
def->label = L("Support multi bed types");
|
||||
def->tooltip = L("Enable this option if you want to use multiple bed types");
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
//OrcaSlicer
|
||||
def = this->add("exclude_object", coBool);
|
||||
def->label = L("Exclude objects");
|
||||
|
||||
@@ -977,6 +977,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
((ConfigOptionEnumsGeneric, extruder_type))
|
||||
//Orca
|
||||
((ConfigOptionBool, has_scarf_joint_seam))
|
||||
//w34
|
||||
((ConfigOptionBool, support_multi_bed_types))
|
||||
)
|
||||
|
||||
// This object is mapped to Perl as Slic3r::Config::Print.
|
||||
|
||||
Reference in New Issue
Block a user