ENH: enlarge filament system colors to 16

Change-Id: Ib31fb10869e86e36733aecab858303fafd993cbf
This commit is contained in:
Stone Li 2022-11-16 09:18:15 +08:00 committed by Lane.Wei
parent 4b0d63ba8e
commit 4e43ad8c2a
2 changed files with 15 additions and 3 deletions

View File

@ -2583,16 +2583,26 @@ void Plater::setExtruderParams(std::map<size_t, Slic3r::ExtruderParams>& extPara
wxColour Plater::get_next_color_for_filament() wxColour Plater::get_next_color_for_filament()
{ {
static int curr_color_filamenet = 0; static int curr_color_filamenet = 0;
wxColour colors[7] = { // refs to https://www.ebaomonthly.com/window/photo/lesson/colorList.htm
wxColour colors[FILAMENT_SYSTEM_COLORS_NUM] = {
*wxYELLOW, *wxYELLOW,
* wxRED, * wxRED,
*wxBLUE, *wxBLUE,
*wxCYAN, *wxCYAN,
*wxLIGHT_GREY, *wxLIGHT_GREY,
*wxWHITE, *wxWHITE,
*wxBLACK *wxBLACK,
wxColour(0,127,255),
wxColour(139,0,255),
wxColour(102,255,0),
wxColour(255,215,0),
wxColour(0,35,100),
wxColour(255,0,255),
wxColour(8,37,103),
wxColour(127,255,212),
wxColour(255,191,0)
}; };
return colors[curr_color_filamenet++ % 7]; return colors[curr_color_filamenet++ % FILAMENT_SYSTEM_COLORS_NUM];
} }
wxString Plater::get_slice_warning_string(GCodeProcessorResult::SliceWarning& warning) wxString Plater::get_slice_warning_string(GCodeProcessorResult::SliceWarning& warning)

View File

@ -23,6 +23,8 @@
#include "Jobs/SendJob.hpp" #include "Jobs/SendJob.hpp"
#include "libslic3r/Model.hpp" #include "libslic3r/Model.hpp"
#define FILAMENT_SYSTEM_COLORS_NUM 16
class wxButton; class wxButton;
class ScalableButton; class ScalableButton;
class wxScrolledWindow; class wxScrolledWindow;