mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-26 21:50:41 +00:00
NEW:active "import obj color" in command line
jira: none Change-Id: I8bc5d4a1eea116305037b8194ff1d2e8aab83ce9 (cherry picked from commit 7df9f9d27d174b30a54ed27756d4a4a157557019) (cherry picked from commit b97d44dae4854c342b835d3fd5265a22aec5d174)
This commit is contained in:
14
src/libslic3r/ObjColorUtils.cpp
Normal file
14
src/libslic3r/ObjColorUtils.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "ObjColorUtils.hpp"
|
||||
|
||||
bool obj_color_deal_algo(std::vector<Slic3r::RGBA> & input_colors,
|
||||
std::vector<Slic3r::RGBA> & cluster_colors_from_algo,
|
||||
std::vector<int> & cluster_labels_from_algo,
|
||||
char & cluster_number)
|
||||
{
|
||||
QuantKMeans quant(10);
|
||||
quant.apply(input_colors, cluster_colors_from_algo, cluster_labels_from_algo, (int) cluster_number);
|
||||
if (cluster_number == -1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user