Compare commits

..

33 Commits

Author SHA1 Message Date
SoftFever
ec7a7ff1ff PA per filament 2022-11-05 14:49:37 +08:00
SoftFever
6fb941cf4c Merge branch 'master-remote' into SoftFever
# Conflicts:
#	resources/profiles/Creality.json
#	resources/profiles/Voron.json
#	version.inc
2022-11-05 11:26:59 +08:00
SoftFever
3c70c12720 add heating command.
Save new users from panic
2022-11-05 11:19:38 +08:00
SoftFever
0008668fa5 Change layer time to float 2022-11-05 00:33:07 +08:00
SoftFever
78b9fcb71b filter out tiny gaps 2022-11-04 16:44:43 +08:00
SoftFever
1a371a9417 fix a small UI glitch caused by printer viewer 2022-11-02 21:19:46 +08:00
SoftFever
47225a83a2 add doxygen 2022-11-01 21:14:40 +08:00
gerrit
c05d42cc1c ci: update build version to 01.03.00.22
Change-Id: I69d99b1b3306fd0d191a22b320705f846b82eb9d
2022-11-01 20:52:23 +08:00
qing.zhang
eae71a5184 ENH: remove the dulicate warning msg of temp
Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I978f2de34e277c6747adc783cb91c341f159a67e
2022-11-01 20:52:23 +08:00
lane.wei
8df60acc61 FIX: fix the label switch incorrect issue when print_sequence change
1. only turn on label while switch from by_layer to by_object
2. don't crash when filament_colours mismatch between project_config and PresetBundle

Change-Id: Icac9d0d7f88e17fcad3b042ea19cda3ac23ae62c
2022-11-01 20:52:23 +08:00
lane.wei
082c695db1 ENH: version: increase version of profiles
Change-Id: I2dc0bbf8374f60f4e4c43806c9e16bd20d9d08f2
2022-11-01 20:52:23 +08:00
lane.wei
7086a3fb5a ENH: add some logs for appconfig::save exception
Change-Id: Ic65345af7debdb340fce5dd03fe09257d7c2c395
2022-11-01 20:52:23 +08:00
gerrit
28cf2d56e2 ci: update build version to 01.03.00.21
Change-Id: Iff25f6602a010247776103aa882d2fb1eefe4ec3
2022-11-01 20:52:23 +08:00
Arthur
8dd401d35f FIX: auto-arrange reads wrongs first_bed_temp
Also change words for extruder clearance parameters.

Change-Id: I736fd9049d184c140b33078d78f764b4fe172765
(cherry picked from commit e70c0c0ea133cffa5788efbfc9633332b196e8df)
2022-11-01 20:52:23 +08:00
gerrit
d3e7989119 ci: update build version to 01.03.00.20
Change-Id: I9245d64eb7ae836581fc2426921b4ecda63a064e
2022-11-01 20:52:23 +08:00
Arthur
703f93d8e2 FIX: reduce height_to_lid to 90mm
Towline may be even lower than the upper rod. Let's
take away 10mm tolerance.

Change-Id: I13972fc4ecb0671e1af4b2c6d102e319417e532f
(cherry picked from commit cedcb862556c8c9014a91ef2aad8f39fc118d925)
2022-11-01 20:52:23 +08:00
gerrit
85c0aeb19f ci: update build version to 01.03.00.19
Change-Id: Ieee2345c952011ef87915bb07134ccb3c36309ec
2022-11-01 20:52:23 +08:00
lane.wei
c79af29ad4 ENH: refine the label logic of seq_print
use the arrange_order computed by Print
turn on label by default when switch to sequent print

Change-Id: I7063bcc9494bbfc14a3cee85eaf30a9eb52c99d2
2022-11-01 20:52:23 +08:00
gerrit
301b85f5c0 ci: update build version to 01.03.00.18
Change-Id: Ic3ad3d2e1314e131178962961c6d8c75afb3ad4c
2022-11-01 20:52:23 +08:00
gerrit
387889cda0 ci: update build version to 01.03.00.17
Change-Id: I4a3695999070a72b9cf59f2273875d788ecb4cb8
2022-11-01 20:52:23 +08:00
Arthur
f16f5afec5 FIX: 2 auto-arrange bugss with per-object printing
1. use strict ordering to ensure the printing order is right
2. reduce height-to-lid to 100mm considering towline is lower than lid
and may collid with objects

TODO: printing brim may still collide, need to subtract inflated boundary of
others during brim generation

Change-Id: Icf0cba10c579d28fabd97764c1b3abec267ebd9b
(cherry picked from commit 46c6f5ff94488b2f4481bf1d34555f4a7c45e135)
2022-11-01 20:52:23 +08:00
gerrit
66f38fbb81 ci: update build version to 01.03.00.16
Change-Id: I44e01e64fcc762c9bc0082b446543f78bfb40279
2022-11-01 20:52:23 +08:00
gerrit
95496fc057 ci: update build version to 01.03.00.15
Change-Id: I2936f6922e0ee188575777483d7c12a92dcef024
2022-11-01 20:52:23 +08:00
liz.li
c065c3a2e6 FIX:AssembleViewData crash
Change-Id: I759a385621b8a83d89abcc7c1b38786e067dbb33
(cherry picked from commit c218e7dd77fad970f637412dc9c230b1241c1f67)
2022-11-01 20:52:23 +08:00
gerrit
ebf7a6c3c7 ci: update build version to 01.03.00.14
Change-Id: I2d9679a72adafd0e0b29cf1da27d98f034cd4abf
2022-11-01 20:52:23 +08:00
Arthur
c8c073a199 FIX: print ordering didn't consider object height
This may cause tall objects be printed before short ones. There are two
possible solutions:
1. do strict ordering only when y-overlap is large enough (the one
   chosen in this commit)
2. when considering vertical collision with rod, the actual expansion
   can be much smaller (because the rod is only slightly off extruder).
   But this solution requires an extra parameter. Let's hold it for a
   while.

Change-Id: Icc9a4796d49dad93cbcc20d4103e641a48886e5e
(cherry picked from commit 6a958b1fa9e58e4ca3be63b4918da77bcdc53314)
(cherry picked from commit ceff67789c27ea576afd663a2e5bae9a10241728)
2022-11-01 20:52:23 +08:00
tao wang
db233c6051 FIX:fixed cant not link to wiki on macos
Change-Id: I8c7fc943e9c6eb46c1f7a63dcd32f0a9a7f120d3
(cherry picked from commit 1fd7ef86e39c979e8b986c9f6d6db239949682cd)
2022-11-01 20:52:23 +08:00
gerrit
badd314724 ci: update build version to 01.03.00.13
Change-Id: Iedf30b5615da18c0b5e3a1e86e12cfd9d7de6af2
2022-11-01 20:52:23 +08:00
Arthur Tang
5544e9602c FIX: rewrite per-object printing order logic
1. Previous logic can't guarantee left-to-right printing order, so
   toolhead may crash on the right side. In the new algorithm printing
   order is guaranteed.
2. Clearance radius should be the max of 3 directions (left, bottom,
   up), not including right, otherwise collision may happen on bottom or
   up directions.
3. Add is_extrusion_cali_object property to handle extrusion brim
   overlap better.

Change-Id: I44868b9925d983f5cca0c31d35dfa28d895fadbf
2022-11-01 20:52:23 +08:00
qing.zhang
59dfcb98fc FIX: fix the empty layer after adding modifier
Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: Iad6c149cb5f1a50a199fdf1dd50f4971898972e2
(cherry picked from commit 6065729c6febb9f3a704dde12bda6ad34f62caec)
2022-11-01 20:52:23 +08:00
tao wang
39df4c8b49 FIX:fixed description messages not refreshing the scrollbar
Change-Id: Ie067784144031d4f9418b4af1b08420bf919d7f1
(cherry picked from commit 520703c1823bdf6ec802467b4bc035da8e797d8f)
2022-11-01 20:52:23 +08:00
tao wang
34e1939666 FIX:change the downloading plugin url of the wiki
Change-Id: I0eb1c42105e5e27e16b9888f8c415aa157cd6f03
(cherry picked from commit 6a35a3546722d16e6118539ab60b748aa9666097)
2022-11-01 20:52:23 +08:00
tao wang
57c877ab9a FIX:fixed incorrect display after adding files via add
Change-Id: Id812b40cb85a882a8c490ccdc2375e0d9b8e312d
2022-11-01 20:52:23 +08:00
46 changed files with 3041 additions and 156 deletions

View File

@@ -4810,6 +4810,12 @@ msgstr "桥接"
msgid "Gap infill"
msgstr "填缝"
msgid "Filter out tiny gaps"
msgstr "忽略微小间隙"
msgid "Filter out gaps smaller than the threshold specified. This setting won't affact top/bottom layers"
msgstr "小于指定阈值的微小间隙不填充。本设置不会对顶/底层起作用"
msgid "Support interface"
msgstr "支撑面"

Binary file not shown.

View File

@@ -1,6 +1,6 @@
{
"name": "Anycubic",
"version": "01.02.00.04",
"version": "01.02.00.05",
"force_update": "0",
"description": "Anycubic configurations",
"machine_model_list": [

View File

@@ -20,7 +20,7 @@
"0x205"
],
"printable_height": "200",
"machine_start_gcode": ";M190 S0\n;M104 S0\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_start_gcode": "M190 S[bed_temperature_initial_layer_single]\nM109 S[nozzle_temperature_initial_layer]\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_end_gcode": "PRINT_END",
"layer_change_gcode": "",
"scan_first_layer": "0",

View File

@@ -1,7 +1,7 @@
{
"name": "Bambulab",
"url": "http://www.bambulab.com/Parameters/vendor/BBL.json",
"version": "01.03.00.02",
"version": "01.03.00.13",
"force_update": "0",
"description": "the initial version of BBL configurations",
"machine_model_list": [

View File

@@ -111,9 +111,10 @@
"0.08"
],
"printable_height": "250",
"extruder_clearance_radius": "32",
"extruder_clearance_radius": "57",
"extruder_clearance_max_radius": "68",
"extruder_clearance_height_to_rod": "36",
"extruder_clearance_height_to_lid": "140",
"extruder_clearance_height_to_lid": "90",
"nozzle_volume": "118",
"nozzle_diameter": [
"0.4"

View File

@@ -1,6 +1,6 @@
{
"name": "Voron",
"version": "01.02.01.05",
"version": "01.02.01.06",
"force_update": "0",
"description": "Voron configurations",
"machine_model_list": [

View File

@@ -131,7 +131,7 @@
"bed_exclude_area": [
"0x0"
],
"machine_start_gcode": ";M190 S0\n;M104 S0\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_start_gcode": "M190 S[bed_temperature_initial_layer_single]\nM109 S[nozzle_temperature_initial_layer]\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_end_gcode": "PRINT_END",
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
"before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0\n",

2725
src/.doxygen Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -84,6 +84,15 @@ public:
std::sort(store_.begin(), store_.end(), sortfunc);
// debug: write down intitial order
for (auto it = store_.begin(); it != store_.end(); ++it) {
std::stringstream ss;
ss << "initial order: " << it->get().name << ", p=" << it->get().priority() << ", bed_temp=" << it->get().bed_temp << ", height=" << it->get().height
<< ", area=" << it->get().area();
if (this->unfitindicator_)
this->unfitindicator_(ss.str());
}
int item_id = 0;
auto makeProgress = [this, &item_id](Placer &placer, size_t bin_idx) {
packed_bins_[bin_idx] = placer.getItems();
@@ -102,7 +111,7 @@ public:
bool was_packed = false;
int best_bed_id = -1;
int bed_id_firstfit = -1;
double score = LARGE_COST_TO_REJECT, best_score = LARGE_COST_TO_REJECT;
double score = LARGE_COST_TO_REJECT+1, best_score = LARGE_COST_TO_REJECT+1;
double score_all_plates = 0, score_all_plates_best = std::numeric_limits<double>::max();
typename Placer::PackResult result, result_best, result_firstfit;
size_t j = 0;
@@ -130,8 +139,8 @@ public:
// item is not fit because we have tried all possible plates to find a good enough fit
if (bed_id_firstfit == MAX_NUM_PLATES) {
it->get().binId(BIN_ID_UNFIT);
//if (this->unfitindicator_)
// this->unfitindicator_(it->get().name + " bed_id_firstfit == MAX_NUM_PLATES" + ",best_score=" + std::to_string(best_score));
if (this->unfitindicator_)
this->unfitindicator_(it->get().name + " bed_id_firstfit == MAX_NUM_PLATES" + ",best_score=" + std::to_string(best_score));
break;
}
else {
@@ -152,10 +161,13 @@ public:
}
if(!was_packed){
//if (this->unfitindicator_)
// this->unfitindicator_(it->get().name + " ,plate_id=" + std::to_string(j) + ",score=" + std::to_string(score)
// + ", score_all_plates=" + std::to_string(score_all_plates)
// + ", overfit=" + std::to_string(result.overfit()));
if (this->unfitindicator_ && !placers.empty())
this->unfitindicator_(it->get().name + ", height=" +std::to_string(it->get().height)
+ " ,plate_id=" + std::to_string(j-1)
+ ", score=" + std::to_string(score)
+ ", best_bed_id=" + std::to_string(best_bed_id)
+ ", score_all_plates=" + std::to_string(score_all_plates)
+", overfit=" + std::to_string(result.overfit()));
placers.emplace_back(bin);
placers.back().plateID(placers.size() - 1);

View File

@@ -533,8 +533,10 @@ void AppConfig::save()
{
// Returns "undefined" if the thread naming functionality is not supported by the operating system.
std::optional<std::string> current_thread_name = get_current_thread_name();
if (current_thread_name && *current_thread_name != "bambustu_main")
throw CriticalException("Calling AppConfig::save() from a worker thread!");
if (current_thread_name && *current_thread_name != "bambustu_main") {
BOOST_LOG_TRIVIAL(error) << __FUNCTION__<<", current_thread_name is " << *current_thread_name;
throw CriticalException("Calling AppConfig::save() from a worker thread, thread name: " + *current_thread_name);
}
}
// The config is first written to a file with a PID suffix and then moved

View File

@@ -404,8 +404,8 @@ protected:
hasLidHeightConflict |= (p.height > clearance_height_to_lid);
}
double lambda3 = LARGE_COST_TO_REJECT;
double lambda4 = LARGE_COST_TO_REJECT;
double lambda3 = LARGE_COST_TO_REJECT*1.1;
double lambda4 = LARGE_COST_TO_REJECT*1.2;
for (int i = 0; i < m_items.size(); i++) {
Item& p = m_items[i];
if (p.is_virt_object) continue;
@@ -556,12 +556,11 @@ public:
}
});
//if (progressind) {
// m_pck.unfitIndicator([this, progressind](std::string name) {
// progressind(100, name+" not fit!");
// BOOST_LOG_TRIVIAL(debug) << "arrange not fit: " + name;
// });
//}
if (progressind) {
m_pck.unfitIndicator([this, progressind](std::string name) {
BOOST_LOG_TRIVIAL(debug) << "arrange not fit: " + name;
});
}
if (stopcond) m_pck.stopCondition(stopcond);

View File

@@ -52,6 +52,7 @@ struct ArrangePolygon {
//BBS: add locked_plate to indicate whether it is in the locked plate
int locked_plate{ -1 };
bool is_virt_object{ false };
bool is_extrusion_cali_object{ false };
bool is_wipe_tower{false};
//BBS: add row/col for sudoku-style layout
int row{0};

View File

@@ -467,8 +467,9 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
params.no_extrusion_overlap = surface_fill.params.overlap;
LayerRegion* layerm = this->m_regions[surface_fill.region_id];
params.config = &layerm->region().config();
for (ExPolygon& expoly : surface_fill.expolygons) {
f->no_overlap_expolygons = intersection_ex(layerm->fill_no_overlap_expolygons, ExPolygons() = { expoly });
f->no_overlap_expolygons = intersection_ex(surface_fill.no_overlap_expolygons, ExPolygons() = {expoly});
// Spacing is modified by the filler to indicate adjustments. Reset it for each expolygon.
f->spacing = surface_fill.params.spacing;
surface_fill.surface.expolygon = std::move(expoly);

View File

@@ -74,6 +74,8 @@ struct FillParams
bool using_internal_flow{ false };
//BBS: only used for new top surface pattern
float no_extrusion_overlap{ 0.0 };
const PrintRegionConfig* config{ nullptr };
};
static_assert(IsTriviallyCopyable<FillParams>::value, "FillParams class is not POD (and it should be - see constructor).");

View File

@@ -3169,9 +3169,17 @@ void FillMonotonicLineWGapFill::fill_surface_extrusion(const Surface* surface, c
}
if (!polylines.empty() && !is_bridge(params.extrusion_role)) {
if (!surface->is_top() && !surface->is_bottom()) {
polylines.erase(std::remove_if(polylines.begin(), polylines.end(),
[&](const ThickPolyline& p) {
return p.length() < scale_(params.config->filter_out_gap_fill.value);
}), polylines.end());
}
ExtrusionEntityCollection gap_fill;
variable_width(polylines, erGapFill, params.flow, gap_fill.entities);
coll_nosort->append(std::move(gap_fill.entities));
}
}

View File

@@ -435,6 +435,11 @@ bool GCode::gcode_label_objects = true;
gcode += tcr_gcode;
check_add_eol(toolchange_gcode_str);
//SoftFever: set new PA for new filament
if (gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
}
// A phony move to the end position at the wipe tower.
gcodegen.writer().travel_to_xy(end_pos.cast<double>());
gcodegen.set_last_pos(wipe_tower_point_to_object_point(gcodegen, end_pos + plate_origin_2d));
@@ -1641,19 +1646,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
if (is_bbl_printers) {
// if (print.config().spaghetti_detector.value)
file.write("M981 S1 P20000 ;open spaghetti detector\n");
file.write_format("M900 K%.3f M%0.3f ; Override pressure advance value\n",
m_config.pressure_advance.values.front(),
outer_wall_volumetric_speed / (1.75 * 1.75 / 4 * 3.14) *
m_config.pressure_advance.values.front());
} else {
if (m_config.enable_pressure_advance.value) {
if(print.config().gcode_flavor.value == gcfKlipper)
file.write_format("SET_PRESSURE_ADVANCE ADVANCE=%.3f ; Override pressure advance value\n",
m_config.pressure_advance.values.front());
else
file.write_format("M900 K%.3f ; Override pressure advance value\n",
m_config.pressure_advance.values.front());
}
}
// Do all objects for each layer.
@@ -4226,6 +4218,10 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z)
if (m_ooze_prevention.enable)
gcode += m_ooze_prevention.post_toolchange(*this);
if (m_config.enable_pressure_advance.get_at(extruder_id)) {
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
}
return gcode;
}

View File

@@ -4058,18 +4058,21 @@ void GCodeProcessor::update_slice_warnings()
auto used_extruders = get_used_extruders();
assert(!used_extruders.empty());
GCodeProcessorResult::SliceWarning warning;
warning.level = 1;
if (m_highest_bed_temp != 0) {
for (size_t i = 0; i < used_extruders.size(); i++) {
int temperature = get_filament_vitrification_temperature(used_extruders[i]);
if (temperature != 0 && m_highest_bed_temp > temperature) {
GCodeProcessorResult::SliceWarning warning;
warning.level = 1;
warning.msg = BED_TEMP_TOO_HIGH_THAN_FILAMENT;
m_result.warnings.emplace_back(std::move(warning));
}
if (temperature != 0 && m_highest_bed_temp > temperature)
warning.params.push_back(std::to_string(used_extruders[i]));
}
}
if (!warning.params.empty()) {
warning.msg = BED_TEMP_TOO_HIGH_THAN_FILAMENT;
m_result.warnings.push_back(warning);
}
m_result.warnings.shrink_to_fit();
}

View File

@@ -209,6 +209,22 @@ std::string GCodeWriter::set_jerk_xy(unsigned int jerk)
}
std::string GCodeWriter::set_pressure_advance(double pa) const
{
std::ostringstream gcode;
if (pa < 0)
return gcode.str();
if (FLAVOR_IS(gcfKlipper))
gcode << "SET_PRESSURE_ADVANCE ADVANCE=" << std::setprecision(4) << pa << "; Override pressure advance value\n";
else
gcode << "M900 K" <<std::setprecision(4)<< pa << "; Override pressure advance value\n";
return gcode.str();
}
std::string GCodeWriter::reset_e(bool force)
{
if (FLAVOR_IS(gcfMach3)

View File

@@ -47,6 +47,7 @@ public:
std::string set_bed_temperature(std::vector<int> temps_per_bed, int default_temp, bool wait = false);
std::string set_acceleration(unsigned int acceleration);
std::string set_jerk_xy(unsigned int jerk);
std::string set_pressure_advance(double pa) const;
std::string reset_e(bool force = false);
std::string update_progress(unsigned int num, unsigned int tot, bool allow_100 = false) const;
// return false if this extruder was already selected

View File

@@ -171,7 +171,8 @@ void Layer::make_perimeters()
&& config.inner_wall_speed == other_config.inner_wall_speed
&& config.outer_wall_speed == other_config.outer_wall_speed
&& config.small_perimeter_speed == other_config.small_perimeter_speed
&& config.gap_infill_speed.value == other_config.gap_infill_speed.value
&& config.gap_infill_speed.value == other_config.gap_infill_speed.value
&& config.filter_out_gap_fill.value == other_config.filter_out_gap_fill.value
&& config.detect_overhang_wall == other_config.detect_overhang_wall
&& config.opt_serialize("inner_wall_line_width") == other_config.opt_serialize("inner_wall_line_width")
&& config.detect_thin_wall == other_config.detect_thin_wall

View File

@@ -127,11 +127,11 @@ ArrangePolygon get_instance_arrange_poly(ModelInstance* instance, const Slic3r::
const ConfigOptionInts* bed_opt = config.option<ConfigOptionInts>(get_bed_temp_key(curr_bed_type));
if (bed_opt != nullptr)
ap.bed_temp = bed_opt->get_at(ap.extrude_ids.back());
ap.bed_temp = bed_opt->get_at(ap.extrude_ids.back()-1);
const ConfigOptionInts* bed_opt_1st_layer = config.option<ConfigOptionInts>(get_bed_temp_1st_layer_key(curr_bed_type));
if (bed_opt_1st_layer != nullptr)
ap.first_bed_temp = bed_opt_1st_layer->get_at(ap.extrude_ids.back());
ap.first_bed_temp = bed_opt_1st_layer->get_at(ap.extrude_ids.back()-1);
}
if (config.has("nozzle_temperature")) //get the print temperature

View File

@@ -715,6 +715,15 @@ void PerimeterGenerator::process()
++ irun;
}
#endif
// SoftFever: don't filter out tiny gap fills for first and top layer. So that the print looks better :)
if (this->layer_id != 0 && this->upper_slices != nullptr)
{
polylines.erase(std::remove_if(polylines.begin(), polylines.end(),
[&](const ThickPolyline& p) {
return p.length() < scale_(config->filter_out_gap_fill.value);
}), polylines.end());
}
if (! polylines.empty()) {
ExtrusionEntityCollection gap_fill;
@@ -728,7 +737,8 @@ void PerimeterGenerator::process()
//FIXME Vojtech: This grows by a rounded extrusion width, not by line spacing,
// therefore it may cover the area, but no the volume.
last = diff_ex(last, gap_fill.polygons_covered_by_width(10.f));
this->gap_fill->append(std::move(gap_fill.entities));
this->gap_fill->append(std::move(gap_fill.entities));
}
}

View File

@@ -346,6 +346,7 @@ void Preset::normalize(DynamicPrintConfig &config)
}
}
handle_legacy_sla(config);
}
@@ -697,7 +698,7 @@ static std::vector<std::string> s_Preset_print_options {
#endif /* HAS_PRESSURE_EQUALIZER */
"inner_wall_speed", "outer_wall_speed", "small_perimeter_speed", "small_perimeter_threshold", "sparse_infill_speed", "internal_solid_infill_speed",
"top_surface_speed", "support_speed", "support_object_xy_distance", "support_interface_speed",
"bridge_speed", "bridge_angle", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed",
"bridge_speed", "bridge_angle", "filter_out_gap_fill", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed",
"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "travel_acceleration", "skirt_loops", "skirt_distance", "skirt_height", "draft_shield",
"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk",
"brim_width", "brim_object_gap", "brim_type", "enable_support", "support_type", "support_threshold_angle", "enforce_support_layers",
@@ -763,7 +764,7 @@ static std::vector<std::string> s_Preset_printer_options {
"printer_technology",
"printable_area", "bed_exclude_area", "gcode_flavor","z_lift_type",
"single_extruder_multi_material", "machine_start_gcode", "machine_end_gcode", "before_layer_change_gcode", "layer_change_gcode", "change_filament_gcode",
"printer_model", "printer_variant", "printable_height", "extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod",
"printer_model", "printer_variant", "printable_height", "extruder_clearance_radius", "extruder_clearance_max_radius","extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod",
"default_print_profile", "inherits",
"silent_mode",
// BBS

View File

@@ -82,6 +82,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"extruder_clearance_height_to_rod",
"extruder_clearance_height_to_lid",
"extruder_clearance_radius",
"extruder_clearance_max_radius",
"extruder_colour",
"extruder_offset",
"filament_flow_ratio",
@@ -398,6 +399,9 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
const PrintInstance *print_instance;
BoundingBox bounding_box;
Polygon hull_polygon;
int index;
double arrange_score;
double height;
};
std::vector<struct print_instance_info> print_instance_with_bounding_box;
{
@@ -475,6 +479,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
}
}
struct print_instance_info print_info {&instance, convex_hull.bounding_box(), convex_hull};
print_info.height = instance.print_object->height();
print_instance_with_bounding_box.push_back(std::move(print_info));
convex_hulls_other.emplace_back(std::move(convex_hull));
}
@@ -489,22 +494,104 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
}
}
//sort the print instance
// calc sort order
double hc1 = scale_(print.config().extruder_clearance_height_to_lid); // height to lid
double hc2 = scale_(print.config().extruder_clearance_height_to_rod); // height to rod
double printable_height = scale_(print.config().printable_height);
auto bed_points = get_bed_shape(print_config);
float bed_width = bed_points[1].x() - bed_points[0].x();
// 如果扩大以后的多边形的距离小于这个值,就需要严格保证从左到右的打印顺序,否则会撞工具头右侧
float unsafe_dist = scale_(print_config.extruder_clearance_max_radius.value - print_config.extruder_clearance_radius.value);
struct VecHash
{
size_t operator()(const Vec2i &n1) const
{
return std::hash<coord_t>()(int(n1(0) * 100 + 100)) + std::hash<coord_t>()(int(n1(1) * 100 + 100)) * 101;
}
};
std::unordered_set<Vec2i, VecHash> left_right_pair; // pairs in this vector must strictly obey the left-right order
for (size_t i = 0; i < print_instance_with_bounding_box.size();i++) {
auto &inst = print_instance_with_bounding_box[i];
inst.index = i;
Point pt = inst.bounding_box.center();
inst.arrange_score = pt.x() / 2 + pt.y(); // we prefer print row-by-row, so cost on x-direction is smaller
}
for (size_t i = 0; i < print_instance_with_bounding_box.size(); i++) {
auto &inst = print_instance_with_bounding_box[i];
auto &l = print_instance_with_bounding_box[i];
for (size_t j = 0; j < print_instance_with_bounding_box.size(); j++) {
if (j != i) {
auto &r = print_instance_with_bounding_box[j];
auto ly1 = l.bounding_box.min.y();
auto ly2 = l.bounding_box.max.y();
auto ry1 = r.bounding_box.min.y();
auto ry2 = r.bounding_box.max.y();
auto lx1 = l.bounding_box.min.x();
auto rx1 = r.bounding_box.min.x();
auto lx2 = l.bounding_box.max.x();
auto rx2 = r.bounding_box.max.x();
auto inter_min = std::max(ly1, ry1);
auto inter_max = std::min(ly2, ry2);
auto inter_y = inter_max - inter_min;
inter_min = std::max(lx1, rx1);
inter_max = std::min(lx2, rx2);
auto inter_x = inter_max - inter_min;
// 如果y方向的重合超过轮廓的膨胀量说明两个物体在一行应该先打左边的物体即先比较二者的x坐标。
if (inter_y > scale_(1)) {
if (std::max(rx1 - lx2, lx1 - rx2) < unsafe_dist) {
if (lx1 > rx1) {
left_right_pair.insert({j, i});
BOOST_LOG_TRIVIAL(debug) << "in-a-row, print_instance " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")"
<< " -> " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")";
} else {
left_right_pair.insert({i, j});
BOOST_LOG_TRIVIAL(debug) << "in-a-row, print_instance " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")"
<< " -> " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")";
}
}
}
if (l.height > hc1 && r.height < hc1) {
// 当前物体超过了顶盖高度,必须后打
left_right_pair.insert({j, i});
BOOST_LOG_TRIVIAL(debug) << "height>hc1, print_instance " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")"
<< " -> " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")";
}
else if (l.height > hc2 && l.height > r.height && l.arrange_score<r.arrange_score) {
// 如果当前物体的高度超过滑杆且比r高就给它加一点代价尽量让高的物体后打只有物体高度超过滑杆时才有必要按高度来
l.arrange_score = std::max(l.arrange_score, r.arrange_score + bed_width/2);
BOOST_LOG_TRIVIAL(debug) << "height>hc2, print_instance " << inst.print_instance->model_instance->get_object()->name
<< ", right=" << r.print_instance->model_instance->get_object()->name << ", l.score: " << l.arrange_score
<< ", r.score: " << r.arrange_score;
}
}
}
}
BOOST_LOG_TRIVIAL(debug) << "bed width: " << bed_width << ", unsafe_dist:" << unsafe_dist;
// 多做几次代价传播,因为前一次有些值没有更新。
// TODO 更好的办法是建立一颗树,一步到位。不过我暂时没精力搞,先就这样吧
for (int k=0;k<5;k++)
for (auto p : left_right_pair) {
auto &l = print_instance_with_bounding_box[p(0)];
auto &r = print_instance_with_bounding_box[p(1)];
if(r.arrange_score<l.arrange_score)
r.arrange_score = l.arrange_score + bed_width/2;
}
for (auto p : left_right_pair) {
auto &l = print_instance_with_bounding_box[p(0)];
auto &r = print_instance_with_bounding_box[p(1)];
BOOST_LOG_TRIVIAL(debug) << "print_instance " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")"
<< " -> " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")";
}
// sort the print instance
std::sort(print_instance_with_bounding_box.begin(), print_instance_with_bounding_box.end(),
[](auto &l, auto &r) {
auto ly1 = l.bounding_box.min.y();
auto ly2 = l.bounding_box.max.y();
auto ry1 = r.bounding_box.min.y();
auto ry2 = r.bounding_box.max.y();
auto inter_min = std::max(ly1, ry1);
auto inter_max = std::min(ly2, ry2);
auto lx = l.bounding_box.min.x();
auto rx = r.bounding_box.min.x();
if (inter_max - inter_min > 0)
return (lx < rx) || ((lx == rx) && (ly1 < ry1));
else
return (ly1 < ry1);
});
[](print_instance_info& l, print_instance_info& r) {return l.arrange_score < r.arrange_score;});
for (auto &inst : print_instance_with_bounding_box)
BOOST_LOG_TRIVIAL(debug) << "after sorting print_instance " << inst.print_instance->model_instance->get_object()->name << ", score: " << inst.arrange_score
<< ", height:"<< inst.height;
// sequential_print_vertical_clearance_valid
{
@@ -535,9 +622,6 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
break;
}*/
double hc1 = scale_(print.config().extruder_clearance_height_to_lid);
double hc2 = scale_(print.config().extruder_clearance_height_to_rod);
double printable_height = scale_(print.config().printable_height);
// if objects are not overlapped on y-axis, they will not collide even if they are taller than extruder_clearance_height_to_rod
int print_instance_count = print_instance_with_bounding_box.size();
@@ -545,7 +629,8 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
for (int k = 0; k < print_instance_count; k++)
{
auto inst = print_instance_with_bounding_box[k].print_instance;
auto bbox = print_instance_with_bounding_box[k].bounding_box;
// 只需要考虑喷嘴到滑杆的偏移量,这个比整个工具头的碰撞半径要小得多
auto bbox = print_instance_with_bounding_box[k].bounding_box.inflated(-scale_(0.5 * print.config().extruder_clearance_radius.value));
auto iy1 = bbox.min.y();
auto iy2 = bbox.max.y();
(const_cast<ModelInstance*>(inst->model_instance))->arrange_order = k+1;

View File

@@ -1025,7 +1025,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_clearance_height_to_rod", coFloat);
def->label = L("Height to rod");
def->tooltip = L("Distance of the nozzle tip to the lower rod. "
"Used as input of auto-arranging to avoid collision when printing by object");
"Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
@@ -1035,7 +1035,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_clearance_height_to_lid", coFloat);
def->label = L("Height to lid");
def->tooltip = L("Distance of the nozzle tip to the lid. "
"Used as input of auto-arranging to avoid collision when printing by object");
"Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
@@ -1043,12 +1043,20 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_clearance_radius", coFloat);
def->label = L("Radius");
def->tooltip = L("Clearance radius around extruder. Used as input of auto-arranging to avoid collision when printing by object");
def->tooltip = L("Clearance radius around extruder. Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(40));
def = this->add("extruder_clearance_max_radius", coFloat);
def->label = L("Max Radius");
def->tooltip = L("Max clearance radius around extruder. Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(68));
def = this->add("extruder_colour", coStrings);
def->label = L("Extruder Color");
def->tooltip = L("Only used as a visual help on UI");
@@ -1077,10 +1085,10 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats { 1. });
def = this->add("enable_pressure_advance", coBool);
def = this->add("enable_pressure_advance", coBools);
def->label = L("Enable pressure advance");
def->tooltip = L("Enable pressure advance, auto calibration result will be overwriten once enabled.");
def->set_default_value(new ConfigOptionBool(false));
def->set_default_value(new ConfigOptionBools{ false });
def = this->add("pressure_advance", coFloats);
def->label = L("Pressure advance");
@@ -1105,7 +1113,7 @@ void PrintConfigDef::init_fff_params()
"at minimum speed to reduce the frequency of starting and stoping");
def->set_default_value(new ConfigOptionBools { false });
def = this->add("fan_cooling_layer_time", coInts);
def = this->add("fan_cooling_layer_time", coFloats);
def->label = L("Layer time");
def->tooltip = L("Part cooling fan will be enabled for layers of which estimated time is shorter than this value. "
"Fan speed is interpolated between the minimum and maximum fan speeds according to layer printing time");
@@ -1113,7 +1121,7 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->max = 1000;
def->mode = comSimple;
def->set_default_value(new ConfigOptionInts { 60 });
def->set_default_value(new ConfigOptionFloats{ 60.0f });
def = this->add("filament_colour", coStrings);
def->label = L("Color");
@@ -1488,6 +1496,13 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.8));
def = this->add("filter_out_gap_fill", coFloat);
def->label = L("Filter out tiny gaps");
def->category = L("Layers and Perimeters");
def->tooltip = L("Filter out gaps smaller than the threshold specified. This setting won't affact top/bottom layers");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("gap_infill_speed", coFloat);
def->label = L("Gap infill");
def->category = L("Speed");
@@ -2272,7 +2287,7 @@ void PrintConfigDef::init_fff_params()
def->mode = comSimple;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("slow_down_layer_time", coInts);
def = this->add("slow_down_layer_time", coFloats);
def->label = L("Layer time");
def->tooltip = L("The printing speed in exported gcode will be slowed down, when the estimated layer time is shorter than this value, to "
"get better cooling for these layers");
@@ -2280,7 +2295,7 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->max = 1000;
def->mode = comSimple;
def->set_default_value(new ConfigOptionInts { 5 });
def->set_default_value(new ConfigOptionFloats { 5.0f });
def = this->add("minimum_sparse_infill_area", coFloat);
def->label = L("Minimum sparse infill threshold");

View File

@@ -679,6 +679,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionEnum<FuzzySkinType>, fuzzy_skin))
((ConfigOptionFloat, fuzzy_skin_thickness))
((ConfigOptionFloat, fuzzy_skin_point_distance))
((ConfigOptionFloat, filter_out_gap_fill))
((ConfigOptionFloat, gap_infill_speed))
((ConfigOptionInt, sparse_infill_filament))
((ConfigOptionFloat, sparse_infill_line_width))
@@ -759,7 +760,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionString, machine_end_gcode))
((ConfigOptionStrings, filament_end_gcode))
((ConfigOptionFloats, filament_flow_ratio))
((ConfigOptionBool, enable_pressure_advance))
((ConfigOptionBools, enable_pressure_advance))
((ConfigOptionFloats, pressure_advance))
((ConfigOptionFloats, filament_diameter))
((ConfigOptionFloats, filament_density))
@@ -840,10 +841,11 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionFloat, extruder_clearance_height_to_rod))//BBs
((ConfigOptionFloat, extruder_clearance_height_to_lid))//BBS
((ConfigOptionFloat, extruder_clearance_radius))
((ConfigOptionFloat, extruder_clearance_max_radius))
((ConfigOptionStrings, extruder_colour))
((ConfigOptionPoints, extruder_offset))
((ConfigOptionBools, reduce_fan_stop_start_freq))
((ConfigOptionInts, fan_cooling_layer_time))
((ConfigOptionFloats, fan_cooling_layer_time))
((ConfigOptionStrings, filament_colour))
((ConfigOptionFloat, outer_wall_acceleration))
((ConfigOptionFloat, inner_wall_acceleration))
@@ -882,7 +884,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionFloat, skirt_distance))
((ConfigOptionInt, skirt_height))
((ConfigOptionInt, skirt_loops))
((ConfigOptionInts, slow_down_layer_time))
((ConfigOptionFloats, slow_down_layer_time))
((ConfigOptionBool, spiral_mode))
((ConfigOptionInt, standby_temperature_delta))
((ConfigOptionInts, nozzle_temperature))

View File

@@ -673,7 +673,8 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "inner_wall_line_width"
|| opt_key == "infill_wall_overlap") {
steps.emplace_back(posPerimeters);
} else if (opt_key == "gap_infill_speed") {
} else if (opt_key == "gap_infill_speed"
|| opt_key == "filter_out_gap_fill" ) {
// Return true if gap-fill speed has changed from zero value to non-zero or from non-zero value to zero.
auto is_gap_fill_changed_state_due_to_speed = [&opt_key, &old_config, &new_config]() -> bool {
if (opt_key == "gap_infill_speed") {
@@ -687,9 +688,9 @@ bool PrintObject::invalidate_state_by_config_options(
};
// Filtering of unprintable regions in multi-material segmentation depends on if gap-fill is enabled or not.
// So step posSlice is invalidated when gap-fill was enabled/disabled by option "gap_fill_enabled" or by
// So step posSlice is invalidated when gap-fill was enabled/disabled by option "filter_out_gap_fill" or by
// changing "gap_infill_speed" to force recomputation of the multi-material segmentation.
if (this->is_mm_painted() && (opt_key == "gap_infill_speed" && is_gap_fill_changed_state_due_to_speed()))
if (this->is_mm_painted() && (opt_key == "filter_out_gap_fill" && (opt_key == "gap_infill_speed" && is_gap_fill_changed_state_due_to_speed())))
steps.emplace_back(posSlice);
steps.emplace_back(posPerimeters);
} else if (

View File

@@ -31,8 +31,8 @@ namespace GUI {
DownloadProgressDialog::DownloadProgressDialog(wxString title)
: DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
{
wxString download_failed_url = wxT("https://wiki.bambulab.com/e/en/software/bambu-studio/failed-to-get-network-plugin");
wxString install_failed_url = wxT("https://wiki.bambulab.com/e/en/software/bambu-studio/failed-to-get-network-plugin");
wxString download_failed_url = wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-get-network-plugin");
wxString install_failed_url = wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-get-network-plugin");
wxString download_failed_msg = _L("Failed to download the plug-in. Please check your firewall settings and vpn software, check and retry.");
wxString install_failed_msg = _L("Failed to install the plug-in. Please check whether it is blocked or deleted by anti-virus software.");

View File

@@ -248,7 +248,8 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
return owner.model_instance_id == id;
});
if (it != owners.end())
it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(i + 1);
//it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(i + 1);
it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(sorted_instances[i]->arrange_order);
}
}
@@ -6032,10 +6033,20 @@ void GLCanvas3D::_render_overlays()
bool sequential_print = opt != nullptr && (opt->value == PrintSequence::ByObject);
std::vector<const ModelInstance*> sorted_instances;
if (sequential_print) {
for (ModelObject* model_object : m_model->objects)
const Print* print = fff_print();
if (print) {
for (const PrintObject *print_object : print->objects())
{
for (const PrintInstance &instance : print_object->instances())
{
sorted_instances.emplace_back(instance.model_instance);
}
}
}
/*for (ModelObject* model_object : m_model->objects)
for (ModelInstance* model_instance : model_object->instances) {
sorted_instances.emplace_back(model_instance);
}
}*/
}
m_labels.render(sorted_instances);

View File

@@ -1333,7 +1333,7 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
menu->Destroy(item_id);
}
const int filaments_cnt = filaments_count();
int filaments_cnt = filaments_count();
if (filaments_cnt <= 1)
return;
@@ -1345,6 +1345,10 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
std::vector<wxBitmap*> icons = get_extruder_color_icons(true);
if (icons.size() < filaments_cnt) {
BOOST_LOG_TRIVIAL(warning) << boost::format("Warning: icons size %1%, filaments_cnt=%2%")%icons.size()%filaments_cnt;
if (icons.size() <= 1)
return;
else
filaments_cnt = icons.size();
}
wxMenu* extruder_selection_menu = new wxMenu();
const wxString& name = sels.Count() == 1 ? names[0] : names[1];

View File

@@ -816,7 +816,6 @@ void AssembleView::reload_scene(bool refresh_immediately, bool force_full_scene_
m_canvas->render(true);
}
m_canvas->reload_scene(refresh_immediately, force_full_scene_refresh);
m_canvas->reload_scene(refresh_immediately, force_full_scene_refresh);
}
}

View File

@@ -611,6 +611,9 @@ void ModelObjectsInfo::on_update()
if (!get_pool()->get_canvas()->get_model()->objects.empty()) {
m_model_objects = get_pool()->get_canvas()->get_model()->objects;
}
else {
m_model_objects.clear();
}
}
void ModelObjectsInfo::on_release()

View File

@@ -345,7 +345,7 @@ void GLGizmosManager::update(const Linef3& mouse_ray, const Point& mouse_pos)
void GLGizmosManager::update_assemble_view_data()
{
if (m_assemble_view_data) {
if (m_parent.get_canvas_type() != GLCanvas3D::CanvasAssembleView)
if (!wxGetApp().plater()->get_assmeble_canvas3D()->get_wxglcanvas()->IsShown())
m_assemble_view_data->update(AssembleViewDataID(0));
else
m_assemble_view_data->update(AssembleViewDataID((int)AssembleViewDataID::ModelObjectsInfo | (int)AssembleViewDataID::ModelObjectsClipper));

View File

@@ -503,6 +503,9 @@ void ArrangeJob::process()
if (params.is_seq_print)
params.min_obj_distance = std::max(params.min_obj_distance, scaled(params.cleareance_radius));
if (params.avoid_extrusion_cali_region && print.full_print_config().opt_bool("scan_first_layer"))
m_plater->get_partplate_list().preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
double skirt_distance = print.has_skirt() ? print.config().skirt_distance.value : 0;
double brim_max = 0;
std::for_each(m_selected.begin(), m_selected.end(), [&](ArrangePolygon ap) { brim_max = std::max(brim_max, ap.brim_width); });
@@ -514,21 +517,26 @@ void ArrangeJob::process()
params.bed_shrink_y = settings.bed_shrink_y + params.brim_skirt_distance;
// for sequential print, we need to inflate the bed because cleareance_radius is so large
if (params.is_seq_print) {
params.bed_shrink_x -= params.cleareance_radius/2;
params.bed_shrink_y -= params.cleareance_radius/2;
float shift_dist = params.cleareance_radius / 2 - 5;
params.bed_shrink_x -= shift_dist;
params.bed_shrink_y -= shift_dist;
// dont forget to move the excluded region
for (auto& region : m_unselected) {
if (region.is_virt_object)
region.poly.translate(-scaled(params.cleareance_radius/2), -scaled(params.cleareance_radius/2));
region.poly.translate(-scaled(shift_dist), -scaled(shift_dist));
}
}
// do not inflate brim_width. Objects are allowed to have overlapped brim.
std::for_each(m_selected.begin(), m_selected.end(), [&](auto& ap) {ap.inflation = params.min_obj_distance / 2; });
std::for_each(m_unselected.begin(), m_unselected.end(), [&](auto& ap) {ap.inflation = ap.is_virt_object ? scaled(params.brim_skirt_distance) : params.min_obj_distance / 2; });
// For occulusion regions, inflation should be larger to prevent genrating brim on them.
// However, extrusion cali regions are exceptional, since we can allow brim overlaps them.
std::for_each(m_unselected.begin(), m_unselected.end(), [&](auto &ap) {
ap.inflation = !ap.is_virt_object ?
params.min_obj_distance / 2 :
(ap.is_extrusion_cali_object ? scaled(params.cleareance_radius / 2) : scaled(params.brim_skirt_distance + params.cleareance_radius / 2));
});
if (params.avoid_extrusion_cali_region && print.full_print_config().opt_bool("scan_first_layer"))
m_plater->get_partplate_list().preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
m_plater->get_partplate_list().preprocess_exclude_areas(params.excluded_regions, 1);
@@ -567,6 +575,7 @@ void ArrangeJob::process()
<< ", bed_temp: " << selected.first_bed_temp << ", print_temp: " << selected.print_temp;
BOOST_LOG_TRIVIAL(debug) << "items unselected before arrange: ";
for (auto item : m_unselected)
if (!item.is_virt_object)
BOOST_LOG_TRIVIAL(debug) << item.name << ", extruder: " << item.extrude_ids.back() << ", bed: " << item.bed_idx << ", trans: " << item.translation.transpose();
}

View File

@@ -941,6 +941,7 @@ void MainFrame::init_tabpanel()
//select_tab(MainFrame::tpMonitor);
m_printer_view->load_url(url);
});
m_printer_view->Hide();
m_auxiliary = new AuxiliaryPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_tabpanel->AddPage(m_auxiliary, _L("Project"), std::string("tab_auxiliary_avtice"), std::string("tab_auxiliary_avtice"));
@@ -979,6 +980,7 @@ void MainFrame::show_device(bool bBBLPrinter) {
m_tabpanel->InsertPage(3, m_printer_view, _L("Device"),
std::string("tab_monitor_active"),
std::string("tab_monitor_active"));
m_printer_view->Show();
}
}

View File

@@ -3461,6 +3461,7 @@ bool PartPlateList::preprocess_nonprefered_areas(arrangement::ArrangePolygons& r
ret.translation = Vec2crd(0, 0);
ret.rotation = 0.0f;
ret.is_virt_object = true;
ret.is_extrusion_cali_object = true;
ret.bed_idx = j;
ret.height = 1;
ret.name = "NonpreferedRegion" + std::to_string(index);

View File

@@ -2020,7 +2020,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
//BBS: add bed_exclude_area
, config(Slic3r::DynamicPrintConfig::new_from_defaults_keys({
"printable_area", "bed_exclude_area", "print_sequence",
"extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "skirt_loops", "skirt_distance",
"extruder_clearance_radius", "extruder_clearance_max_radius",
"extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "skirt_loops", "skirt_distance",
"brim_width", "brim_object_gap", "brim_type", "nozzle_diameter", "single_extruder_multi_material",
"enable_prime_tower", "wipe_tower_x", "wipe_tower_y", "prime_tower_width", "prime_tower_brim_width", "prime_volume",
"extruder_colour", "filament_colour", "material_colour", "printable_height", "printer_model", "printer_technology",
@@ -7224,7 +7225,7 @@ void Plater::add_model(bool imperial_units/* = false*/)
if (!load_files(paths, strategy, ask_multi).empty()) {
if (get_project_name() == _L("Untitled") && paths.size() > 0) {
p->set_project_filename(wxString(paths[0].string()));
p->set_project_filename(wxString::FromUTF8(paths[0].string()));
}
wxGetApp().mainframe->update_title();
@@ -9319,6 +9320,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
{
bool update_scheduled = false;
bool bed_shape_changed = false;
bool print_sequence_changed = false;
t_config_option_keys diff_keys = p->config->diff(config);
for (auto opt_key : diff_keys) {
if (opt_key == "filament_colour") {
@@ -9369,6 +9371,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
}
else if (opt_key == "print_sequence") {
update_scheduled = true;
print_sequence_changed = true;
}
else if (opt_key == "printer_model") {
p->reset_gcode_toolpaths();
@@ -9393,6 +9396,9 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
if (seq_print->value == PrintSequence::ByObject) {
std::string info_text = L("Print By Object: \nSuggest to use auto-arrange to avoid collisions when printing.");
notify_manager->bbl_show_seqprintinfo_notification(info_text);
//always show label when switch to sequence print
if (print_sequence_changed)
this->show_view3D_labels(true);
}
else
notify_manager->bbl_close_seqprintinfo_notification();

View File

@@ -103,7 +103,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
double bridge_flow = print_config.opt_float("bridge_flow");
double inner_wall_speed = print_config.opt_float("inner_wall_speed");
double outer_wall_speed = print_config.get_abs_value("outer_wall_speed", inner_wall_speed);
// double gap_infill_speed = print_config.opt_bool("gap_fill_enabled") ? print_config.opt_float("gap_infill_speed") : 0.;
// double gap_infill_speed = print_config.opt_bool("filter_out_gap_fill") ? print_config.opt_float("gap_infill_speed") : 0.;
double sparse_infill_speed = print_config.opt_float("sparse_infill_speed");
double small_perimeter_speed = print_config.get_abs_value("small_perimeter_speed", inner_wall_speed);
double internal_solid_infill_speed = print_config.opt_float("internal_solid_infill_speed");

View File

@@ -23,17 +23,7 @@ PrinterWebView::PrinterWebView(wxWindow *parent)
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
// Create the button
bSizer_toolbar = new wxBoxSizer(wxHORIZONTAL);
//m_button_reload = new wxButton(this, wxID_ANY, wxT("Reload"), wxDefaultPosition, wxDefaultSize, 0);
//bSizer_toolbar->Add(m_button_reload, 0, wxALL, 5);
m_url = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
bSizer_toolbar->Add(m_url, 1, wxALL | wxEXPAND, 5);
// Create the webview
// Create the webview
m_browser = WebView::CreateWebView(this, "");
if (m_browser == nullptr) {
wxLogError("Could not init m_browser");
@@ -55,9 +45,6 @@ PrinterWebView::PrinterWebView(wxWindow *parent)
//Zoom
m_zoomFactor = 100;
// Connect the button events
//Bind(wxEVT_BUTTON, &PrinterWebView::OnReload, this, m_button_reload->GetId());
Bind(wxEVT_TEXT_ENTER, &PrinterWebView::OnUrl, this, m_url->GetId());
//Connect the idle events
Bind(wxEVT_CLOSE_WINDOW, &PrinterWebView::OnClose, this);
@@ -74,12 +61,9 @@ PrinterWebView::~PrinterWebView()
void PrinterWebView::load_url(wxString& url)
{
//this->Show();
//this->Raise();
m_url->SetLabelText(url);
// this->Show();
// this->Raise();
if (wxGetApp().get_mode() == comDevelop)
wxLogMessage(m_url->GetValue());
m_browser->LoadURL(url);
//m_browser->SetFocus();
UpdateState();
@@ -90,28 +74,7 @@ void PrinterWebView::load_url(wxString& url)
*/
void PrinterWebView::UpdateState() {
// SetTitle(m_browser->GetCurrentTitle());
m_url->SetValue(m_browser->GetCurrentURL());
}
/**
* Callback invoked when user entered an URL and pressed enter
*/
void PrinterWebView::OnUrl(wxCommandEvent& WXUNUSED(evt))
{
if (wxGetApp().get_mode() == comDevelop)
wxLogMessage(m_url->GetValue());
m_browser->LoadURL(m_url->GetValue());
m_browser->SetFocus();
UpdateState();
}
/**
* Callback invoked when user pressed the "reload" button
*/
void PrinterWebView::OnReload(wxCommandEvent& WXUNUSED(evt))
{
m_browser->Reload();
UpdateState();
}
void PrinterWebView::OnClose(wxCloseEvent& evt)

View File

@@ -36,25 +36,14 @@ public:
virtual ~PrinterWebView();
void load_url(wxString& url);
void UpdateState();
void OnUrl(wxCommandEvent& evt);
void OnReload(wxCommandEvent& evt);
void OnClose(wxCloseEvent& evt);
void OnClose(wxCloseEvent& evt);
private:
wxWebView* m_browser;
wxBoxSizer *bSizer_toolbar;
wxButton * m_button_reload;
wxTextCtrl *m_url;
long m_zoomFactor;
// Last executed JavaScript snippet, for convenience.
// wxString m_javascript;
// wxString m_response_js;
// DECLARE_EVENT_TABLE()
};

View File

@@ -89,6 +89,7 @@ void ReleaseNoteDialog::update_release_note(wxString release_note, std::string v
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALL, 5);
m_vebview_release_note->SetSizer(sizer_text_release_note);
m_vebview_release_note->Layout();
m_vebview_release_note->Fit();
}
void UpdateVersionDialog::alter_choice(wxCommandEvent& event)
@@ -333,6 +334,7 @@ void UpdateVersionDialog::update_version_info(wxString release_note, wxString ve
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALL, 5);
m_scrollwindows_release_note->SetSizer(sizer_text_release_note);
m_scrollwindows_release_note->Layout();
m_scrollwindows_release_note->Fit();
}
}

View File

@@ -643,7 +643,7 @@ void SelectMachinePopup::update_other_devices()
m_placeholder_panel = new wxWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxSize(-1,FromDIP(26)));
wxBoxSizer* placeholder_sizer = new wxBoxSizer(wxVERTICAL);
auto m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
placeholder_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
@@ -860,6 +860,12 @@ void SelectMachinePopup::OnLeftUp(wxMouseEvent &event)
wxPostEvent(p->mPanel, event);
}
}
//hyper link
auto h_rect = m_hyperlink->ClientToScreen(wxPoint(0, 0));
if (mouse_pos.x > h_rect.x && mouse_pos.y > h_rect.y && mouse_pos.x < (h_rect.x + m_hyperlink->GetSize().x) && mouse_pos.y < (h_rect.y + m_hyperlink->GetSize().y)) {
wxLaunchDefaultBrowser(wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"));
}
}
}

View File

@@ -198,6 +198,7 @@ private:
int m_my_devices_count{0};
int m_other_devices_count{0};
wxWindow* m_placeholder_panel{nullptr};
wxHyperlinkCtrl* m_hyperlink{nullptr};
wxBoxSizer * m_sizer_body{nullptr};
wxBoxSizer * m_sizer_my_devices{nullptr};
wxBoxSizer * m_sizer_other_devices{nullptr};

View File

@@ -1806,6 +1806,7 @@ void TabPrint::build()
optgroup->append_single_option_line("sparse_infill_pattern", "fill-patterns#infill types and their properties of sparse");
optgroup->append_single_option_line("top_surface_pattern", "fill-patterns#Infill of the top surface and bottom surface");
optgroup->append_single_option_line("bottom_surface_pattern", "fill-patterns#Infill of the top surface and bottom surface");
optgroup->append_single_option_line("filter_out_gap_fill");
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
optgroup->append_single_option_line("infill_wall_overlap");
@@ -2674,7 +2675,7 @@ void TabFilament::toggle_options()
}
if (m_active_page->title() == "Filament")
{
bool pa = m_config->opt_bool("enable_pressure_advance");
bool pa = m_config->opt_bool("enable_pressure_advance", 0);
toggle_option("pressure_advance", pa);
toggle_line("cool_plate_temp_initial_layer", is_BBL_printer);

View File

@@ -10,5 +10,5 @@ endif()
if(NOT DEFINED BBL_INTERNAL_TESTING)
set(BBL_INTERNAL_TESTING "1")
endif()
set(SLIC3R_VERSION "01.03.00.12")
set(SLIC3R_VERSION "01.03.00.22")
set(SoftFever_VERSION "1.3.2")