Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.9.2.57 #4256

Merged
merged 86 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
7ac3d67
FIX: update: add more logic to protect the file access
lanewei120 May 14, 2024
7d7eb27
ci: update build version to 01.09.01.67
May 14, 2024
fee4399
ENH: update PLA fan logic
XunZhangBambu May 14, 2024
084bcaf
ENH:SLICE_FAILED stats is more obvious
Haidiye00 May 13, 2024
b1fb359
FIX:support mulitiple object to export one stl
Haidiye00 May 14, 2024
2fc68aa
FIX: add log for load font
zhimin-zeng-bambulab May 16, 2024
80c2a0e
ENH: CLI: add logic to set different in process settings
lanewei120 May 16, 2024
660da37
ENH: CLI: add layer range support for assembled object
lanewei120 May 17, 2024
1951018
FIX: add thread for load font
zhimin-zeng-bambulab May 17, 2024
2788d57
FIX: unassigned initial extruder ignored
XunZhangBambu May 17, 2024
897f8f6
FIX: Unwanted skirts when printing By Object
zhimin-zeng-bambulab May 15, 2024
a7977c0
ENH:SD card printing using cloud service
walterwongbbl May 21, 2024
032d209
ENH:add log for text to image by font
Haidiye00 May 20, 2024
be0f7b2
FIX: crash when generating text with thickness <= 0
zhimin-zeng-bambulab May 20, 2024
bc9f3f6
FIX: interlocking_depth does not take effect
zhimin-zeng-bambulab May 21, 2024
9c462e0
FIX: cannot slice when set object extruder is 0
zhimin-zeng-bambulab May 20, 2024
68b0a8b
ci: update build version to 01.09.01.68
May 23, 2024
7c9db04
NEW:add no light thumbnail
Haidiye00 Mar 28, 2024
d7d55bb
NEW:update color calculation in printed thumbnails
Haidiye00 Mar 29, 2024
ebd9863
NEW:add edge pixels deal in printed thumbnail
Haidiye00 Apr 1, 2024
16f453e
FIX:fix abnormal pixel issue
Haidiye00 Apr 8, 2024
d498234
FIX: sync ams colors to m_cur_colors_in_thumbnail
Haidiye00 Apr 11, 2024
26f90f4
FIX:exist empty ams in machine
Haidiye00 Apr 16, 2024
0d53323
FIX:updata_thumbnail_data is valid only in preview tab
Haidiye00 Apr 24, 2024
eb53f79
FIX:in 3d view ,it can also open the printing window
Haidiye00 Apr 30, 2024
33982f8
ENH: CLI: add no light thumbnail logic for CLI
lanewei120 Apr 15, 2024
3a5ac9e
ENH: CLI: add logic for backward compatible check
lanewei120 May 9, 2024
490675a
ENH: CLI: support parse downward_settings from default internal path
lanewei120 May 10, 2024
6bc85d0
ci: update build version to 01.09.01.69
May 23, 2024
2505ebc
FIX: top z distance incorrect with adaptive layer height
ArthurBambulab May 23, 2024
7278f8a
FIX: [7085] crash when connected printer
DanBao-Bambu May 15, 2024
42094e1
FIX: empty first layer of tree support
ArthurBambulab May 28, 2024
438b148
FIX: limit the m_thickness_min value to 0.01
MackBambu May 28, 2024
0357e0d
FIX: modify the max k value
zhimin-zeng-bambulab May 21, 2024
51a21db
FIX: crash when clicking go home without connecting printer
zhimin-zeng-bambulab May 28, 2024
c9d066d
NEW:add tab key to change 3D to preview
SoftFever May 20, 2024
1a538de
ci: update build version to 01.09.01.70
May 29, 2024
14fa7b2
NEW:update studio version to 1.9.2.51
walterwongbbl May 29, 2024
4b7e2de
FIX: crash in ParamsPanel msw_rescale
bambu123 May 24, 2024
96eb89b
FIX: set initial size of param fields
bambu123 May 27, 2024
3bb8218
FIX: not cache param Fields on WXGTK
bambu123 May 22, 2024
bb6570a
ci: update build version to 01.09.02.52
May 29, 2024
0b54172
ci: update network module based on commit 3e58fc9
May 29, 2024
06f70bd
FIX: X1C should not litmit the k value size
zhimin-zeng-bambulab May 29, 2024
afb5d4f
FIX:roload obj for disk
Haidiye00 May 30, 2024
fc8dd1c
FIX:ensure that it exists no lighting image data
Haidiye00 May 30, 2024
e7b8bfc
ENH:add an tip icon for assembly view
Haidiye00 May 30, 2024
835fdd7
FIX: modify the limit value of k to 1
zhimin-zeng-bambulab May 30, 2024
00a00ef
ENH:translate texts
Haidiye00 May 31, 2024
8b730cc
ci: update build version to 01.09.02.53
May 31, 2024
6c07956
FIX: Fix the issue of buttons being blocked in Portuguese
MklBambu May 31, 2024
2a825de
FIX: fix icons and text overlap
MklBambu May 31, 2024
27be55d
FIX: fix translate problem
zhimin-zeng-bambulab May 31, 2024
63c80aa
FIX: Multicolor slicing error when contours self-intersect
zhimin-zeng-bambulab May 30, 2024
44da74a
FIX: P series with old fireware modify the limit k value to 1
zhimin-zeng-bambulab May 31, 2024
8ab37db
ENH: CLI: add support for params in assembled objects
lanewei120 May 31, 2024
c4f2336
FIX: Mispellings fixes
MklBambu May 31, 2024
bc3209a
ENH: add depend logic of curl to openssl for all platform
lanewei120 May 31, 2024
9de4db5
ci: update build version to 01.09.02.54
Jun 3, 2024
f061901
FIX: fix the issue of display in Portuguese
MklBambu Jun 3, 2024
fe5293d
FIX: error layer height on gui while open scarf seam
QingZhangBambu Jun 3, 2024
2843001
ENH: avoid crash when switching to cloud mode
StoneLiBambulab Jun 3, 2024
af4c02d
FIX: modify top_shell_layer should reslice
zhimin-zeng-bambulab Jun 4, 2024
6828802
ENH: Open Login Dialog When Open Model in MW
Jun 4, 2024
7c34e2e
ENH:get sound support through homeflag
walterwongbbl Jun 4, 2024
67d4fbd
NEW:allow downloading from the domain name of bblmw
walterwongbbl Jun 4, 2024
6db1cf8
ENH:modify the FTP upload directory to the root directory
walterwongbbl Jun 5, 2024
f0d2a03
ENH:revert modify the FTP upload directory to the root directory
walterwongbbl Jun 5, 2024
f03f315
ENH: optimize cross hatch infill
SoftFever May 29, 2024
be94a22
ENH: Reduce warpping effect on CrossHatch
dragon-eyes-bbl Apr 30, 2024
639824c
ENH:don't need translate char to WxString
Haidiye00 Jun 5, 2024
677ca99
ENH: support object exclude for octoprinter
QingZhangBambu Jun 4, 2024
3463ff7
ENH: Optimize ModelPage Left Menu AutoScroll
Jun 5, 2024
f4e1d29
FIX: P1S not included in 0.10mm standard profile
XunZhangBambu Jun 5, 2024
54c9158
ENH: CLI: skip shrink when load obj and stls
lanewei120 Jun 6, 2024
d424c6b
ci: update build version to 01.09.02.55
Jun 6, 2024
02cc299
ci: update network module based on commit bd2ea54
Jun 6, 2024
bd8839b
ci: update network module based on commit 44959e1
Jun 7, 2024
97e5efd
ci: create github actions workflow
MackBambu May 29, 2024
85a2cb5
ENH: Add nozzle wrap detection for the third layer
XunZhangBambu Jun 7, 2024
ed51737
ENH: update X1 start & end gcode
XunZhangBambu May 29, 2024
7d54a15
FIX: tunnel_mqtt not turn on by key_field_only
bambu123 Jun 7, 2024
aca581a
ci: update build version to 01.09.02.56
Jun 7, 2024
4b1296f
ENH: Reset MWPage When LoginStatus Change
Jun 7, 2024
a45950e
NEW: Open PrivacyPolicy WebPage depend on Country
Jun 6, 2024
f56e9a2
ci: update build version to 01.09.02.57
Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
NEW:add edge pixels deal in printed thumbnail
Jira: none
Change-Id: I4804034490729125b5d378ee5a74c1b32fd4355a
(cherry picked from commit 961f6cb27d83dc38670a693a583e1a05ec6af835)
  • Loading branch information
Haidiye00 authored and lanewei120 committed Jun 1, 2024
commit ebd9863cd395375f7ea26f5f990b4100cd5c8473
136 changes: 130 additions & 6 deletions src/slic3r/GUI/SelectMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2954,6 +2954,7 @@ void SelectMachineDialog::on_set_finish_mapping(wxCommandEvent &evt)
auto ams_colour = wxColour(wxAtoi(selection_data_arr[0]), wxAtoi(selection_data_arr[1]), wxAtoi(selection_data_arr[2]), wxAtoi(selection_data_arr[3]));
int old_filament_id = (int) wxAtoi(selection_data_arr[5]);
change_default_normal(old_filament_id, ams_colour);
final_deal_edge_pixels_data(m_preview_thumbnail_data);
set_default_normal(m_preview_thumbnail_data);//do't reset ams

int ctype = 0;
Expand Down Expand Up @@ -4071,6 +4072,19 @@ void SelectMachineDialog::reset_and_sync_ams_list()
}

void SelectMachineDialog::clone_thumbnail_data() {
//record preview_colors
MaterialHash::iterator iter = m_materialList.begin();
if (m_preview_colors_in_thumbnail.size() != m_materialList.size()) {
m_preview_colors_in_thumbnail.resize(m_materialList.size());
}
while (iter != m_materialList.end()) {
int id = iter->first;
Material * item = iter->second;
MaterialItem *m = item->item;
m_preview_colors_in_thumbnail[id] = m->m_material_coloul;
iter++;
}
//copy data
ThumbnailData &data = m_plater->get_partplate_list().get_curr_plate()->thumbnail_data;
m_preview_thumbnail_data.reset();
m_preview_thumbnail_data.set(data.width, data.height);
Expand All @@ -4086,6 +4100,118 @@ void SelectMachineDialog::clone_thumbnail_data() {
}
}
}
//record_edge_pixels_data
record_edge_pixels_data();
}

void SelectMachineDialog::record_edge_pixels_data()
{
auto is_not_in_preview_colors = [this](unsigned char r, unsigned char g , unsigned char b , unsigned char a) {
for (size_t i = 0; i < m_preview_colors_in_thumbnail.size(); i++) {
wxColour render_color = adjust_color_for_render(m_preview_colors_in_thumbnail[i]);
if (render_color.Red() == r && render_color.Green() == g && render_color.Blue() == b /*&& render_color.Alpha() == a*/) {
return false;
}
}
return true;
};
ThumbnailData &data = m_plater->get_partplate_list().get_curr_plate()->no_light_thumbnail_data;
ThumbnailData &origin_data = m_plater->get_partplate_list().get_curr_plate()->thumbnail_data;
if (data.width > 0 && data.height > 0) {
m_edge_pixels.resize(data.width * data.height);
for (unsigned int r = 0; r < data.height; ++r) {
unsigned int rr = (data.height - 1 - r) * data.width;
for (unsigned int c = 0; c < data.width; ++c) {
unsigned char *no_light_px = (unsigned char *) data.pixels.data() + 4 * (rr + c);
unsigned char *origin_px = (unsigned char *) origin_data.pixels.data() + 4 * (rr + c);
m_edge_pixels[r * data.width + c] = false;
if (origin_px[3] > 0) {
if (is_not_in_preview_colors(no_light_px[0], no_light_px[1], no_light_px[2], origin_px[3])) {
m_edge_pixels[r * data.width + c] = true;
}
}
}
}
}
}

wxColour SelectMachineDialog::adjust_color_for_render(const wxColour &color)
{
std::array<float, 4> _temp_color_color = {color.Red() / 255.0f, color.Green() / 255.0f, color.Blue() / 255.0f, color.Alpha() / 255.0f};
auto _temp_color_color_ = adjust_color_for_rendering(_temp_color_color);
wxColour render_color((int) (_temp_color_color_[0] * 255.0f), (int) (_temp_color_color_[1] * 255.0f), (int) (_temp_color_color_[2] * 255.0f),
(int) (_temp_color_color_[3] * 255.0f));
return render_color;
}

void SelectMachineDialog::final_deal_edge_pixels_data(ThumbnailData &data)
{
if (data.width > 0 && data.height > 0) {
for (unsigned int r = 0; r < data.height; ++r) {
unsigned int rr = (data.height - 1 - r) * data.width;
bool exist_rr_up = r >= 1 ? true : false;
bool exist_rr_down = r <= data.height - 2 ? true : false;
unsigned int rr_up = exist_rr_up ? (data.height - 1 - (r - 1)) * data.width : 0;
unsigned int rr_down = exist_rr_down ? (data.height - 1 - (r + 1)) * data.width : 0;
for (unsigned int c = 0; c < data.width; ++c) {
bool exist_c_left = c >= 1 ? true : false;
bool exist_c_right = c <= data.width - 2 ? true : false;
unsigned int c_left = exist_c_left ? c - 1 : 0;
unsigned int c_right = exist_c_right ? c + 1 : 0;
unsigned char *cur_px = (unsigned char *) data.pixels.data() + 4 * (rr + c);
unsigned char *relational_pxs[8] = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
if (exist_rr_up && exist_c_left) { relational_pxs[0] = (unsigned char *) data.pixels.data() + 4 * (rr_up + c_left); }
if (exist_rr_up) { relational_pxs[1] = (unsigned char *) data.pixels.data() + 4 * (rr_up + c); }
if (exist_rr_up && exist_c_right) { relational_pxs[2] = (unsigned char *) data.pixels.data() + 4 * (rr_up + c_right); }
if (exist_c_left) { relational_pxs[3] = (unsigned char *) data.pixels.data() + 4 * (rr + c_left); }
if (exist_c_right) { relational_pxs[4] = (unsigned char *) data.pixels.data() + 4 * (rr + c_right); }
if (exist_rr_down && exist_c_left) { relational_pxs[5] = (unsigned char *) data.pixels.data() + 4 * (rr_down + c_left); }
if (exist_rr_down) { relational_pxs[6] = (unsigned char *) data.pixels.data() + 4 * (rr_down + c); }
if (exist_rr_down && exist_c_right) { relational_pxs[7] = (unsigned char *) data.pixels.data() + 4 * (rr_down + c_right); }
if (cur_px[3] > 0 && m_edge_pixels[r * data.width + c]) {
int rgba_sum[4] = {0, 0, 0, 0};
int valid_count = 0;
for (size_t k = 0; k < 8; k++) {
if (relational_pxs[k]) {
if (k == 0 && m_edge_pixels[(r - 1) * data.width + c_left]) {
continue;
}
if (k == 1 && m_edge_pixels[(r - 1) * data.width + c]) {
continue;
}
if (k == 2 && m_edge_pixels[(r - 1) * data.width + c_right]) {
continue;
}
if (k == 3 && m_edge_pixels[r * data.width + c_left]) {
continue;
}
if (k == 4 && m_edge_pixels[r * data.width + c_right]) {
continue;
}
if (k == 5 && m_edge_pixels[(r + 1) * data.width + c_left]) {
continue;
}
if (k == 6 && m_edge_pixels[(r + 1) * data.width + c]) {
continue;
}
if (k == 7 && m_edge_pixels[(r + 1) * data.width + c_right]) {
continue;
}
for (size_t m = 0; m < 4; m++) {
rgba_sum[m] += relational_pxs[k][m];
}
valid_count++;
}
}
if (valid_count > 0) {
for (size_t m = 0; m < 4; m++) {
cur_px[m] = std::clamp(int(rgba_sum[m] / (float)valid_count), 0, 255);
}
}
}
}
}
}
}

void SelectMachineDialog::updata_thumbnail_data_after_connected_printer()
Expand All @@ -4105,17 +4231,15 @@ void SelectMachineDialog::updata_thumbnail_data_after_connected_printer()
change_default_normal(id, m->m_ams_coloul);
iter++;
}
if (is_connect_printer) {
if (is_connect_printer) {
final_deal_edge_pixels_data(m_preview_thumbnail_data);
set_default_normal(m_preview_thumbnail_data);
}
}

void SelectMachineDialog::change_default_normal(int old_filament_id, wxColour temp_ams_color)
{
std::array<float, 4> _temp_ams_color = {temp_ams_color.Red() / 255.0f, temp_ams_color.Green() / 255.0f, temp_ams_color.Blue() / 255.0f, temp_ams_color.Alpha() / 255.0f};
auto __temp_ams_color_ = adjust_color_for_rendering(_temp_ams_color);
wxColour ams_color((int)(__temp_ams_color_[0] * 255.0f), (int) (__temp_ams_color_[1] * 255.0f),
(int) (__temp_ams_color_[2] * 255.0f), (int)( __temp_ams_color_[3] * 255.0f));
wxColour ams_color = adjust_color_for_render(temp_ams_color);
ThumbnailData& data =m_plater->get_partplate_list().get_curr_plate()->thumbnail_data;
ThumbnailData& no_light_data = m_plater->get_partplate_list().get_curr_plate()->no_light_thumbnail_data;
if (data.width > 0 && data.height > 0 && data.width == no_light_data.width && data.height == no_light_data.height) {
Expand All @@ -4125,7 +4249,7 @@ void SelectMachineDialog::change_default_normal(int old_filament_id, wxColour te
unsigned char *no_light_px = (unsigned char *) no_light_data.pixels.data() + 4 * (rr + c);
unsigned char *origin_px = (unsigned char *) data.pixels.data() + 4 * (rr + c);
unsigned char *new_px = (unsigned char *) m_preview_thumbnail_data.pixels.data() + 4 * (rr + c);
if (no_light_px[3] == (255 - old_filament_id)) {
if (no_light_px[3] == (255 - old_filament_id) && m_edge_pixels[r * data.width + c] == false) {
new_px[3] = origin_px[3]; // alpha
int origin_rgb = origin_px[0] + origin_px[1] + origin_px[2];
int no_light_px_rgb = no_light_px[0] + no_light_px[1] + no_light_px[2];
Expand Down
5 changes: 5 additions & 0 deletions src/slic3r/GUI/SelectMachine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ class SelectMachineDialog : public DPIDialog
wxStaticBitmap * img_ams_backup{nullptr};
ScalableBitmap * enable_ams{nullptr};
ThumbnailData m_preview_thumbnail_data;//when ams map change
std::vector<wxColour> m_preview_colors_in_thumbnail;
std::vector<bool> m_edge_pixels;

public:
SelectMachineDialog(Plater *plater = nullptr);
Expand Down Expand Up @@ -484,6 +486,9 @@ class SelectMachineDialog : public DPIDialog
void set_default();
void reset_and_sync_ams_list();
void clone_thumbnail_data();
void record_edge_pixels_data();
wxColour adjust_color_for_render(const wxColour& color);
void final_deal_edge_pixels_data(ThumbnailData& data);
void updata_thumbnail_data_after_connected_printer();
void change_default_normal(int old_filament_id, wxColour temp_ams_color);
void set_default_normal(const ThumbnailData&);
Expand Down