mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-01 06:16:58 +00:00
Compare commits
13 Commits
feature/fi
...
hanif/cli-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da59f51c24 | ||
|
|
ed89a88949 | ||
|
|
6be84b5299 | ||
|
|
f48a8362e5 | ||
|
|
b3bb6f94af | ||
|
|
991dd3b544 | ||
|
|
7b029f6f9d | ||
|
|
76c8239b13 | ||
|
|
7d731c0c05 | ||
|
|
9933cab59f | ||
|
|
5436e422b9 | ||
|
|
ca903faa56 | ||
|
|
fcf6f0a3a5 |
2
.github/workflows/build_deps.yml
vendored
2
.github/workflows/build_deps.yml
vendored
@@ -151,7 +151,7 @@ jobs:
|
||||
if [ -z "${{ vars.SELF_HOSTED }}" ]; then
|
||||
brew install automake texinfo libtool pkgconf yasm nasm
|
||||
fi
|
||||
./build_release_macos.sh -dx ${{ !vars.SELF_HOSTED && '-1' || '' }} -a ${{ inputs.arch }} -t 10.15
|
||||
./build_release_macos.sh -dx ${{ !vars.SELF_HOSTED && '-j 3' || '' }} -a ${{ inputs.arch }} -t 10.15
|
||||
(cd "${{ github.workspace }}/deps/build/${{ inputs.arch }}" && \
|
||||
find . -mindepth 1 -maxdepth 1 ! -name 'OrcaSlicer_dep' -exec rm -rf {} +)
|
||||
|
||||
|
||||
11
.github/workflows/build_orca.yml
vendored
11
.github/workflows/build_orca.yml
vendored
@@ -145,7 +145,7 @@ jobs:
|
||||
env:
|
||||
ORCA_TESTS_BUILD_ONLY: ${{ inputs.arch == 'arm64' && '1' || '' }}
|
||||
run: |
|
||||
./build_release_macos.sh -s -n -x ${{ !vars.SELF_HOSTED && '-1' || '' }} -a ${{ inputs.arch }} -t 10.15 ${{ inputs.arch == 'arm64' && '-T' || '' }}
|
||||
./build_release_macos.sh -s -n -x ${{ !vars.SELF_HOSTED && '-j 3' || '' }} -a ${{ inputs.arch }} -t 10.15 ${{ inputs.arch == 'arm64' && '-T' || '' }}
|
||||
|
||||
- name: Pack unit tests mac
|
||||
if: runner.os == 'macOS' && !inputs.macos-combine-only && inputs.arch == 'arm64'
|
||||
@@ -204,7 +204,7 @@ jobs:
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
./build_release_macos.sh -u -x ${{ !vars.SELF_HOSTED && '-1' || '' }} -a universal -t 10.15
|
||||
./build_release_macos.sh -u -x ${{ !vars.SELF_HOSTED && '-j 3' || '' }} -a universal -t 10.15
|
||||
|
||||
# Thanks to RaySajuuk, it's working now
|
||||
- name: Sign app and notary
|
||||
@@ -385,13 +385,6 @@ jobs:
|
||||
dir "C:/Program Files (x86)/Windows Kits/10/Include"
|
||||
choco install nsis
|
||||
|
||||
- name: Install pkg-config
|
||||
# FFmpeg is discovered via pkg-config (pkg_check_modules LIBAV in
|
||||
# src/slic3r/CMakeLists.txt); the Windows runners don't ship it.
|
||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||
run: |
|
||||
choco install pkgconfiglite -y
|
||||
|
||||
- name: Build slicer Win
|
||||
if: runner.os == 'Windows'
|
||||
working-directory: ${{ github.workspace }}
|
||||
|
||||
@@ -476,8 +476,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
# WIN10SDK_PATH is used to point CMake to the WIN10 SDK installation directory.
|
||||
# We pick it from environment if it is not defined in another way
|
||||
# ORCA: Removed Netfabb STL fixing service support in favor of CGAL.
|
||||
if(WIN32)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
# if(WIN32)
|
||||
# if(NOT DEFINED WIN10SDK_PATH)
|
||||
# if(DEFINED ENV{WIN10SDK_PATH})
|
||||
# set(WIN10SDK_PATH "$ENV{WIN10SDK_PATH}")
|
||||
@@ -513,7 +512,7 @@ if(WIN32)
|
||||
# else()
|
||||
# message("Building without Win10 Netfabb STL fixing service support")
|
||||
# endif()
|
||||
endif()
|
||||
# endif()
|
||||
|
||||
if (APPLE)
|
||||
message("OS X SDK Path: ${CMAKE_OSX_SYSROOT}")
|
||||
|
||||
@@ -4,7 +4,7 @@ set -e
|
||||
set -o pipefail
|
||||
SECONDS=0
|
||||
|
||||
while getopts ":dpa:snt:xbc:i:1Tuh" opt; do
|
||||
while getopts ":dpa:snt:xbc:i:j:Tuh" opt; do
|
||||
case "${opt}" in
|
||||
d )
|
||||
export BUILD_TARGET="deps"
|
||||
@@ -38,8 +38,8 @@ while getopts ":dpa:snt:xbc:i:1Tuh" opt; do
|
||||
i )
|
||||
export CMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH:+$CMAKE_IGNORE_PREFIX_PATH;}$OPTARG"
|
||||
;;
|
||||
1 )
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL=1
|
||||
j )
|
||||
export CMAKE_BUILD_PARALLEL_LEVEL="$OPTARG"
|
||||
;;
|
||||
T )
|
||||
export BUILD_TESTS="1"
|
||||
@@ -58,7 +58,7 @@ while getopts ":dpa:snt:xbc:i:1Tuh" opt; do
|
||||
echo " -b: Build without reconfiguring CMake"
|
||||
echo " -c: Set CMake build configuration, default is Release"
|
||||
echo " -i: Add a prefix to ignore during CMake dependency discovery (repeatable), defaults to /opt/local:/usr/local:/opt/homebrew"
|
||||
echo " -1: Use single job for building"
|
||||
echo " -j: Set the number of parallel build jobs (CMAKE_BUILD_PARALLEL_LEVEL)"
|
||||
echo " -T: Build and run tests (set ORCA_TESTS_BUILD_ONLY=1 to build without running)"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
@@ -1793,8 +1793,9 @@ int CLI::run(int argc, char **argv)
|
||||
old_printable_area = config.option<ConfigOptionPoints>("printable_area", true)->values;
|
||||
old_exclude_area = config.option<ConfigOptionPoints>("bed_exclude_area", true)->values;
|
||||
if (old_printable_area.size() >= 4) {
|
||||
old_printable_width = (int)(old_printable_area[2].x() - old_printable_area[0].x());
|
||||
old_printable_depth = (int)(old_printable_area[2].y() - old_printable_area[0].y());
|
||||
BoundingBoxf old_printable_bbox(old_printable_area);
|
||||
old_printable_width = static_cast<int>(old_printable_bbox.size().x());
|
||||
old_printable_depth = static_cast<int>(old_printable_bbox.size().y());
|
||||
}
|
||||
old_printable_height = (int)(config.opt_float("printable_height"));
|
||||
|
||||
@@ -2343,8 +2344,9 @@ int CLI::run(int argc, char **argv)
|
||||
Pointfs orig_printable_area;
|
||||
orig_printable_area = config.option<ConfigOptionPoints>("printable_area", true)->values;
|
||||
if (orig_printable_area.size() >= 4) {
|
||||
orig_printable_width = (int)(orig_printable_area[2].x() - orig_printable_area[0].x());
|
||||
orig_printable_depth = (int)(orig_printable_area[2].y() - orig_printable_area[0].y());
|
||||
BoundingBoxf orig_printable_bbox(orig_printable_area);
|
||||
orig_printable_width = static_cast<int>(orig_printable_bbox.size().x());
|
||||
orig_printable_depth = static_cast<int>(orig_printable_bbox.size().y());
|
||||
}
|
||||
orig_printable_height = (int)(config.opt_float("printable_height"));
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__<< boost::format(":%1%, check printable size: old_printable_width=%2%, orig_printable_width=%3%, old_printable_depth=%4%, orig_printable_depth=%5%, old_printable_height=%6%, orig_printable_height=%7%")
|
||||
@@ -3138,7 +3140,25 @@ int CLI::run(int argc, char **argv)
|
||||
std::vector<int> old_variant_counts(filament_count, 1), new_variant_counts;
|
||||
|
||||
ConfigOptionInts* filament_self_index_opt = m_print_config.option<ConfigOptionInts>("filament_self_index");
|
||||
if (!filament_self_index_opt) {
|
||||
bool need_regenerate_self_index = !filament_self_index_opt;
|
||||
if (filament_self_index_opt) {
|
||||
// a filament_self_index carried over from a stale project can disagree with the
|
||||
// current filament_count. old_start_indice/old_variant_counts below are sized to
|
||||
// filament_count and walked with 1-based group indices, so an index above
|
||||
// filament_count overruns old_start_indice[++k], and a non-positive first index
|
||||
// writes old_variant_counts[-1] - both heap corruption.
|
||||
int max_self_index = 0, min_self_index = 1;
|
||||
for (int v : filament_self_index_opt->values) {
|
||||
max_self_index = std::max(max_self_index, v);
|
||||
min_self_index = std::min(min_self_index, v);
|
||||
}
|
||||
if (max_self_index > filament_count || min_self_index < 1) {
|
||||
BOOST_LOG_TRIVIAL(warning) << boost::format("filament_self_index range [%1%, %2%] is invalid for filament_count %3%, regenerating")
|
||||
% min_self_index % max_self_index % filament_count;
|
||||
need_regenerate_self_index = true;
|
||||
}
|
||||
}
|
||||
if (need_regenerate_self_index) {
|
||||
filament_self_index_opt = m_print_config.option<ConfigOptionInts>("filament_self_index", true);
|
||||
std::vector<int>& filament_self_indice = filament_self_index_opt->values;
|
||||
filament_self_indice.resize(filament_count);
|
||||
@@ -3732,6 +3752,8 @@ int CLI::run(int argc, char **argv)
|
||||
double height_to_lid = m_print_config.opt_float("extruder_clearance_height_to_lid");
|
||||
double height_to_rod = m_print_config.opt_float("extruder_clearance_height_to_rod");
|
||||
double clearance_radius = m_print_config.opt_float("extruder_clearance_radius");
|
||||
double nozzle_height = m_print_config.opt_float("nozzle_height");
|
||||
Vec2d align_center = m_print_config.option<ConfigOptionPoint>("best_object_pos")->value;
|
||||
int shared_printable_width = 0, shared_printable_depth = 0, shared_printable_height = 0, shared_center_x = 0, shared_center_y = 0;
|
||||
//double plate_stride;
|
||||
std::string bed_texture;
|
||||
@@ -3742,8 +3764,11 @@ int CLI::run(int argc, char **argv)
|
||||
if (m_print_config.opt<ConfigOptionFloatsNullable>("extruder_printable_height")) {
|
||||
current_extruder_print_heights = m_print_config.opt<ConfigOptionFloatsNullable>("extruder_printable_height")->values;
|
||||
}
|
||||
current_printable_width = current_printable_area[2].x() - current_printable_area[0].x();
|
||||
current_printable_depth = current_printable_area[2].y() - current_printable_area[0].y();
|
||||
{
|
||||
BoundingBoxf current_printable_bbox(current_printable_area);
|
||||
current_printable_width = static_cast<int>(current_printable_bbox.size().x());
|
||||
current_printable_depth = static_cast<int>(current_printable_bbox.size().y());
|
||||
}
|
||||
current_printable_height = print_height;
|
||||
if (old_printable_width == 0)
|
||||
old_printable_width = current_printable_width;
|
||||
@@ -3944,6 +3969,11 @@ int CLI::run(int argc, char **argv)
|
||||
ConfigOptionFloats *wipe_x_option = dynamic_cast<ConfigOptionFloats *>(print_config.option("wipe_tower_x"));
|
||||
ConfigOptionFloats *wipe_y_option = dynamic_cast<ConfigOptionFloats *>(print_config.option("wipe_tower_y"));
|
||||
|
||||
// get_at() silently clamps an out-of-range index to entry 0 - make the reuse visible
|
||||
if (static_cast<size_t>(plate_index) >= wipe_x_option->values.size() || static_cast<size_t>(plate_index) >= wipe_y_option->values.size()) {
|
||||
BOOST_LOG_TRIVIAL(warning) << boost::format("plate %1%: wipe_tower_x/y only has %2%/%3% entries, reusing entry 0's position")
|
||||
%(plate_index+1) %wipe_x_option->values.size() %wipe_y_option->values.size();
|
||||
}
|
||||
plate_obj_size_info.wipe_x = wipe_x_option->get_at(plate_index);
|
||||
plate_obj_size_info.wipe_y = wipe_y_option->get_at(plate_index);
|
||||
|
||||
@@ -4139,8 +4169,9 @@ int CLI::run(int argc, char **argv)
|
||||
temp_extruder_print_heights = config.option<ConfigOptionFloatsNullable>("extruder_printable_height", true)->values;
|
||||
|
||||
if (temp_printable_area.size() >= 4) {
|
||||
printer_plate.printable_width = (int)(temp_printable_area[2].x() - temp_printable_area[0].x());
|
||||
printer_plate.printable_depth = (int)(temp_printable_area[2].y() - temp_printable_area[0].y());
|
||||
BoundingBoxf temp_printable_bbox(temp_printable_area);
|
||||
printer_plate.printable_width = static_cast<int>(temp_printable_bbox.size().x());
|
||||
printer_plate.printable_depth = static_cast<int>(temp_printable_bbox.size().y());
|
||||
printer_plate.printable_height = (int)(config.opt_float("printable_height"));
|
||||
}
|
||||
if (temp_exclude_area.size() >= 4) {
|
||||
@@ -4788,6 +4819,8 @@ int CLI::run(int argc, char **argv)
|
||||
arrange_cfg.clearance_height_to_rod = height_to_rod;
|
||||
arrange_cfg.clearance_height_to_lid = height_to_lid;
|
||||
arrange_cfg.clearance_radius = clearance_radius;
|
||||
arrange_cfg.nozzle_height = nozzle_height;
|
||||
arrange_cfg.align_center = align_center;
|
||||
arrange_cfg.printable_height = print_height;
|
||||
arrange_cfg.min_obj_distance = 0;
|
||||
if (arrange_cfg.is_seq_print) {
|
||||
@@ -5238,6 +5271,8 @@ int CLI::run(int argc, char **argv)
|
||||
arrange_cfg.clearance_height_to_rod = height_to_rod;
|
||||
arrange_cfg.clearance_height_to_lid = height_to_lid;
|
||||
arrange_cfg.clearance_radius = clearance_radius;
|
||||
arrange_cfg.nozzle_height = nozzle_height;
|
||||
arrange_cfg.align_center = align_center;
|
||||
arrange_cfg.printable_height = print_height;
|
||||
arrange_cfg.min_obj_distance = 0;
|
||||
if (arrange_cfg.is_seq_print) {
|
||||
@@ -5529,6 +5564,23 @@ int CLI::run(int argc, char **argv)
|
||||
}
|
||||
finished_arrange = true;
|
||||
}
|
||||
// CLI-created overflow plates get no wipe_tower_x/y backfill (that is GUI-only) -
|
||||
// keep the arrays sized to the plate count so per-plate get_at() stays in range.
|
||||
{
|
||||
int final_plate_count = partplate_list.get_plate_count();
|
||||
ConfigOptionFloats* wipe_x_opt = m_print_config.option<ConfigOptionFloats>("wipe_tower_x");
|
||||
ConfigOptionFloats* wipe_y_opt = m_print_config.option<ConfigOptionFloats>("wipe_tower_y");
|
||||
if (wipe_x_opt && !wipe_x_opt->values.empty() && wipe_x_opt->values.size() < static_cast<size_t>(final_plate_count)) {
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("wipe_tower_x had %1% entries for %2% plates, backfilling with entry 0")
|
||||
% wipe_x_opt->values.size() % final_plate_count;
|
||||
wipe_x_opt->values.resize(final_plate_count, wipe_x_opt->values.front());
|
||||
}
|
||||
if (wipe_y_opt && !wipe_y_opt->values.empty() && wipe_y_opt->values.size() < static_cast<size_t>(final_plate_count)) {
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("wipe_tower_y had %1% entries for %2% plates, backfilling with entry 0")
|
||||
% wipe_y_opt->values.size() % final_plate_count;
|
||||
wipe_y_opt->values.resize(final_plate_count, wipe_y_opt->values.front());
|
||||
}
|
||||
}
|
||||
original_model.clear_objects();
|
||||
original_model.clear_materials();
|
||||
}
|
||||
@@ -6497,7 +6549,6 @@ int CLI::run(int argc, char **argv)
|
||||
bool need_create_thumbnail_group = false, need_create_no_light_group = false, need_create_top_group = false;
|
||||
|
||||
// get type and color for platedata
|
||||
auto* filament_types = dynamic_cast<const ConfigOptionStrings*>(m_print_config.option("filament_type"));
|
||||
const ConfigOptionStrings* filament_color = dynamic_cast<const ConfigOptionStrings *>(m_print_config.option("filament_colour"));
|
||||
auto* filament_id = dynamic_cast<const ConfigOptionStrings*>(m_print_config.option("filament_ids"));
|
||||
const ConfigOptionFloats* nozzle_diameter_option = dynamic_cast<const ConfigOptionFloats *>(m_print_config.option("nozzle_diameter"));
|
||||
@@ -6516,10 +6567,11 @@ int CLI::run(int argc, char **argv)
|
||||
plate_data->nozzle_diameters = nozzle_diameter_str;
|
||||
|
||||
for (auto it = plate_data->slice_filaments_info.begin(); it != plate_data->slice_filaments_info.end(); it++) {
|
||||
// get_at() on an empty vector option is UB - these can be unpopulated on a from-scratch slice
|
||||
std::string display_filament_type;
|
||||
it->type = m_print_config.get_filament_type(display_filament_type, it->id);
|
||||
it->color = filament_color ? filament_color->get_at(it->id) : "#FFFFFF";
|
||||
it->filament_id = filament_id?filament_id->get_at(it->id):"";
|
||||
it->color = (filament_color && !filament_color->values.empty()) ? filament_color->get_at(it->id) : "#FFFFFF";
|
||||
it->filament_id = (filament_id && !filament_id->values.empty()) ? filament_id->get_at(it->id) : "";
|
||||
}
|
||||
|
||||
if (!plate_data->plate_thumbnail.is_valid()) {
|
||||
@@ -7311,6 +7363,10 @@ bool CLI::setup(int argc, char **argv)
|
||||
m_config.option(optdef.first, true);
|
||||
|
||||
set_data_dir(m_config.opt_string("datadir"));
|
||||
if (!data_dir().empty() && !boost::filesystem::exists(data_dir())) {
|
||||
boost::nowide::cerr << "Could not create data directory: " << data_dir() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
//FIXME Validating at this stage most likely does not make sense, as the config is not fully initialized yet.
|
||||
if (!validity.empty()) {
|
||||
@@ -7423,6 +7479,10 @@ bool CLI::export_models(IO::ExportFormat format, std::string path_dir)
|
||||
for (ModelObject* model_object : model.objects)
|
||||
{
|
||||
const std::string path = this->output_filepath(*model_object, index++, format, path_dir);
|
||||
if (path.empty()) {
|
||||
boost::nowide::cerr << "Could not create output directory for STL export" << std::endl;
|
||||
return false;
|
||||
}
|
||||
success = Slic3r::store_stl(path.c_str(), model_object, true);
|
||||
if (success)
|
||||
BOOST_LOG_TRIVIAL(info) << "Model successfully exported to " << path << std::endl;
|
||||
@@ -7548,8 +7608,19 @@ std::string CLI::output_filepath(const ModelObject &object, unsigned int index,
|
||||
output_path = subdir + "/"+file_name;
|
||||
|
||||
boost::filesystem::path subdir_path(subdir);
|
||||
if (!boost::filesystem::exists(subdir_path))
|
||||
boost::filesystem::create_directory(subdir_path);
|
||||
if (!boost::filesystem::exists(subdir_path)) {
|
||||
try {
|
||||
boost::filesystem::create_directories(subdir_path);
|
||||
} catch (const boost::filesystem::filesystem_error &ex) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": failed to create output directory " << subdir_path.string() << ": " << ex.what();
|
||||
}
|
||||
if (!boost::filesystem::exists(subdir_path)) {
|
||||
// Directory creation failed and won't succeed on a retry (same path, same cause) -
|
||||
// signal failure now instead of letting every object in the model repeat the same
|
||||
// doomed attempt and fail with a less specific "export failed" error later.
|
||||
return std::string();
|
||||
}
|
||||
}
|
||||
return output_path;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ struct PlateBBoxData
|
||||
int first_extruder = 0;
|
||||
float nozzle_diameter = 0.4;
|
||||
std::string bed_type;
|
||||
float first_layer_time;
|
||||
float first_layer_time = 0.0f;
|
||||
// version 1: use view type ColorPrint (filament color)
|
||||
// version 2: use view type FilamentId (filament id)
|
||||
int version = 2;
|
||||
|
||||
@@ -165,7 +165,6 @@ public:
|
||||
|
||||
|
||||
//BBS
|
||||
unsigned int m_last_additional_fan_speed;
|
||||
int m_last_bed_temperature;
|
||||
bool m_last_bed_temperature_reached;
|
||||
double m_lifted;
|
||||
|
||||
@@ -9866,7 +9866,15 @@ std::string DynamicPrintConfig::get_filament_type(std::string &displayed_filamen
|
||||
auto* filament_type = dynamic_cast<const ConfigOptionStrings*>(this->option("filament_type"));
|
||||
auto* filament_is_support = dynamic_cast<const ConfigOptionBools*>(this->option("filament_is_support"));
|
||||
|
||||
if (!filament_type)
|
||||
// get_at() on an empty vector option is undefined behavior (.front() of an empty vector),
|
||||
// and e.g. filament_id is never populated on a CLI from-scratch slice - treat an empty
|
||||
// option the same as a missing one.
|
||||
if (filament_id && filament_id->values.empty())
|
||||
filament_id = nullptr;
|
||||
if (filament_is_support && filament_is_support->values.empty())
|
||||
filament_is_support = nullptr;
|
||||
|
||||
if (!filament_type || filament_type->values.empty())
|
||||
return "";
|
||||
|
||||
if (!filament_is_support) {
|
||||
|
||||
@@ -310,7 +310,11 @@ void set_data_dir(const std::string &dir)
|
||||
{
|
||||
g_data_dir = dir;
|
||||
if (!g_data_dir.empty() && !boost::filesystem::exists(g_data_dir)) {
|
||||
boost::filesystem::create_directory(g_data_dir);
|
||||
try {
|
||||
boost::filesystem::create_directories(g_data_dir);
|
||||
} catch (const boost::filesystem::filesystem_error &ex) {
|
||||
BOOST_LOG_TRIVIAL(error) << "set_data_dir: failed to create data directory " << g_data_dir << ": " << ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -915,6 +915,18 @@ if (APPLE)
|
||||
endif ()
|
||||
target_link_libraries(libslic3r_gui ${LIBAVCODEC_LIBRARY} ${LIBSWSCALE_LIBRARY} ${LIBAVUTIL_LIBRARY})
|
||||
target_include_directories(libslic3r_gui SYSTEM PRIVATE ${CMAKE_PREFIX_PATH}/include)
|
||||
elseif (WIN32)
|
||||
# Prebuilt shared FFmpeg from the deps install. Windows has no pkg-config,
|
||||
# so resolve the import libraries out of the deps prefix directly; the DLLs
|
||||
# are copied next to the executable by the top level CMakeLists.
|
||||
find_library(LIBAVCODEC_LIBRARY NAMES avcodec PATHS ${CMAKE_PREFIX_PATH}/lib NO_DEFAULT_PATH)
|
||||
find_library(LIBSWSCALE_LIBRARY NAMES swscale PATHS ${CMAKE_PREFIX_PATH}/lib NO_DEFAULT_PATH)
|
||||
find_library(LIBAVUTIL_LIBRARY NAMES avutil PATHS ${CMAKE_PREFIX_PATH}/lib NO_DEFAULT_PATH)
|
||||
if (NOT LIBAVCODEC_LIBRARY OR NOT LIBSWSCALE_LIBRARY OR NOT LIBAVUTIL_LIBRARY)
|
||||
message(FATAL_ERROR "FFmpeg (avcodec/swscale/avutil) not found under ${CMAKE_PREFIX_PATH}/lib. Rebuild the deps.")
|
||||
endif ()
|
||||
target_link_libraries(libslic3r_gui ${LIBAVCODEC_LIBRARY} ${LIBSWSCALE_LIBRARY} ${LIBAVUTIL_LIBRARY})
|
||||
target_include_directories(libslic3r_gui SYSTEM PRIVATE ${CMAKE_PREFIX_PATH}/include)
|
||||
else ()
|
||||
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET
|
||||
libavcodec
|
||||
|
||||
@@ -55,7 +55,6 @@ private:
|
||||
|
||||
Label* m_text_label;
|
||||
wxStaticBitmap* m_icon_bitmap;
|
||||
int m_target_size;
|
||||
std::string m_icon_name;
|
||||
ScalableBitmap m_icon;
|
||||
};
|
||||
|
||||
@@ -60,7 +60,6 @@ class AboutDialog : public DPIDialog
|
||||
wxHtmlWindow* m_html;
|
||||
wxStaticBitmap* m_logo;
|
||||
int m_copy_rights_btn_id { wxID_ANY };
|
||||
int m_copy_version_btn_id { wxID_ANY };
|
||||
public:
|
||||
AboutDialog();
|
||||
|
||||
|
||||
@@ -93,7 +93,6 @@ private:
|
||||
CenteredTitle* m_title_ctrl { nullptr };
|
||||
wxString m_titleText;
|
||||
|
||||
wxAuiToolBarItem* m_account_item;
|
||||
wxAuiToolBarItem* m_model_store_item;
|
||||
|
||||
//wxAuiToolBarItem *m_publish_item;
|
||||
|
||||
@@ -74,12 +74,10 @@ private:
|
||||
std::unordered_set<std::string> m_system_filament_types_set;
|
||||
std::set<std::string> m_visible_printers;
|
||||
CreateType m_create_type;
|
||||
Button * m_button_create = nullptr;
|
||||
Button * m_button_cancel = nullptr;
|
||||
ComboBox * m_filament_vendor_combobox = nullptr;
|
||||
::CheckBox * m_can_not_find_vendor_checkbox = nullptr;
|
||||
ComboBox * m_filament_type_combobox = nullptr;
|
||||
ComboBox * m_exist_vendor_combobox = nullptr;
|
||||
ComboBox * m_filament_preset_combobox = nullptr;
|
||||
TextInput * m_filament_custom_vendor_input = nullptr;
|
||||
wxGridSizer * m_filament_presets_sizer = nullptr;
|
||||
|
||||
@@ -199,7 +199,6 @@ private:
|
||||
void OnRefreshButton(wxCommandEvent& event);
|
||||
|
||||
private:
|
||||
int saveTimes{0};
|
||||
wxBoxSizer* mainSizer{nullptr};
|
||||
wxPanel* textPanel{nullptr};
|
||||
wxBoxSizer* textSizer{nullptr};
|
||||
|
||||
@@ -122,7 +122,6 @@ private:
|
||||
private:
|
||||
int m_ext_nozzle_id = -1;
|
||||
int m_rack_nozzle_id = -1;
|
||||
bool m_isRefreshFinish = false;
|
||||
bool findNozzleImage = false;
|
||||
|
||||
NozzleStatus m_nozzle_status = NOZZLE_STATUS_DC;
|
||||
@@ -154,7 +153,6 @@ private:
|
||||
Label* m_diameter_label;
|
||||
Label* m_flowtype_label;
|
||||
Label* m_type_label;
|
||||
ScalableButton* m_error_button{ nullptr };
|
||||
|
||||
Label* m_sn_label;
|
||||
Label* m_version_label;
|
||||
|
||||
@@ -72,7 +72,6 @@ public:
|
||||
float m_model_z_offset{ 0.5f };
|
||||
bool m_visible{ true };
|
||||
bool m_is_dark = false;
|
||||
bool m_fixed_screen_size{ false };
|
||||
float m_scale_factor{ 1.0f };
|
||||
#if ENABLE_ACTUAL_SPEED_DEBUG
|
||||
ActualSpeedImguiWidget m_actual_speed_imgui_widget;
|
||||
|
||||
@@ -327,7 +327,6 @@ private:
|
||||
GLTexture m_icons_texture;
|
||||
bool m_icons_texture_dirty;
|
||||
mutable GLTexture m_images_texture;
|
||||
mutable bool m_images_texture_dirty;
|
||||
BackgroundTexture m_background_texture;
|
||||
GLTexture m_arrow_texture;
|
||||
Layout m_layout;
|
||||
|
||||
@@ -86,7 +86,6 @@ private:
|
||||
boost::thread m_thread;
|
||||
// Mutex and condition variable to synchronize m_thread with the UI thread.
|
||||
std::mutex m_mutex;
|
||||
int m_generate_count;
|
||||
|
||||
// This map holds all translated description texts, so they can be easily referenced during layout calculations
|
||||
// etc. When language changes, GUI is recreated and this class constructed again, so the change takes effect.
|
||||
|
||||
@@ -176,7 +176,6 @@ private:
|
||||
// Use those values to disable selection of active extruders
|
||||
bool m_is_dark = false;
|
||||
|
||||
bool is_osx{false};
|
||||
int m_min_value;
|
||||
int m_max_value;
|
||||
int m_lower_value;
|
||||
@@ -201,10 +200,6 @@ private:
|
||||
void *m_one_layer_on_hover_id;
|
||||
void *m_one_layer_off_id;
|
||||
void *m_one_layer_off_hover_id;
|
||||
void* m_one_layer_on_light_id;
|
||||
void* m_one_layer_on_hover_light_id;
|
||||
void* m_one_layer_off_light_id;
|
||||
void* m_one_layer_off_hover_light_id;
|
||||
void* m_one_layer_on_dark_id;
|
||||
void* m_one_layer_on_hover_dark_id;
|
||||
void* m_one_layer_off_dark_id;
|
||||
|
||||
@@ -61,7 +61,6 @@ private:
|
||||
::Button *m_button_year = nullptr;
|
||||
::Button *m_button_month = nullptr;
|
||||
::Button *m_button_all = nullptr;
|
||||
::Label *m_switch_label = nullptr;
|
||||
|
||||
::StaticBox * m_type_panel = nullptr;
|
||||
::Button * m_button_video = nullptr;
|
||||
|
||||
@@ -86,11 +86,8 @@ private:
|
||||
|
||||
/* side tools */
|
||||
SideTools* m_side_tools{nullptr};
|
||||
wxStaticBitmap* m_bitmap_printer_type;
|
||||
wxStaticBitmap* m_bitmap_arrow;
|
||||
wxStaticText* m_staticText_printer_name;
|
||||
wxStaticBitmap* m_bitmap_wifi_signal;
|
||||
wxBoxSizer * m_side_tools_sizer;
|
||||
SelectMachinePopup m_select_machine;
|
||||
|
||||
/* images */
|
||||
@@ -101,7 +98,6 @@ private:
|
||||
wxBitmap m_printer_img;
|
||||
wxBitmap m_arrow_img;
|
||||
|
||||
int last_wifi_signal = -1;
|
||||
int last_status;
|
||||
bool m_initialized { false };
|
||||
bool update_flag{false};
|
||||
|
||||
@@ -88,7 +88,6 @@ private:
|
||||
Button* m_task_name{ nullptr };
|
||||
Button* m_status{ nullptr };
|
||||
Button* m_action{ nullptr };
|
||||
Button* m_stop_all_botton{nullptr};
|
||||
|
||||
// tip when no device
|
||||
wxStaticText* m_tip_text{ nullptr };
|
||||
|
||||
@@ -79,7 +79,6 @@ private:
|
||||
std::vector<wxBoxSizer *> m_row_col_boxsizer_list;
|
||||
std::vector<ButtonState*> m_result_icon_list;
|
||||
int m_last_cluster_num{-1};
|
||||
const int m_combox_width{50};
|
||||
int m_combox_icon_width;
|
||||
int m_combox_icon_height;
|
||||
wxButton * m_image_button = nullptr;
|
||||
|
||||
@@ -6470,7 +6470,7 @@ int PartPlateList::store_to_3mf_structure(PlateDataPtrs& plate_data_list, bool w
|
||||
plate_data_item->filament_change_sequence = m_plate_list[i]->m_gcode_result->filament_change_sequence;
|
||||
plate_data_item->nozzle_change_sequence = m_plate_list[i]->m_gcode_result->nozzle_change_sequence;
|
||||
plate_data_item->optimal_assignment = m_plate_list[i]->m_gcode_result->optimal_assignment;
|
||||
plate_data_item->first_layer_time = std::to_string(m_plate_list[i]->cali_bboxes_data.first_layer_time);
|
||||
plate_data_item->first_layer_time = std::to_string(m_plate_list[i]->get_slice_result()->initial_layer_time);
|
||||
Print *print = nullptr;
|
||||
m_plate_list[i]->get_print((PrintBase **) &print, nullptr, nullptr);
|
||||
if (print) {
|
||||
|
||||
@@ -128,7 +128,6 @@ private:
|
||||
bool is_drag_mode();
|
||||
|
||||
boost::shared_ptr<PrinterFileSystem> m_file_sys;
|
||||
bool m_file_sys_result{false};
|
||||
std::string m_timestamp;
|
||||
std::string m_tmp_path;
|
||||
std::vector<string> m_local_paths;
|
||||
|
||||
@@ -33,7 +33,6 @@ class PhysicalPrinterDialog : public DPIDialog
|
||||
Button* m_printhost_test_btn {nullptr};
|
||||
Button* m_printhost_logout_btn {nullptr};
|
||||
Button* m_printhost_cafile_browse_btn {nullptr};
|
||||
Button* m_printhost_client_cert_browse_btn {nullptr};
|
||||
Button* m_printhost_port_browse_btn {nullptr};
|
||||
|
||||
RoundedRectangle* m_input_area {nullptr};
|
||||
|
||||
@@ -63,7 +63,6 @@ class ProjectPanel : public wxPanel
|
||||
{
|
||||
private:
|
||||
std::atomic<bool> m_web_init_completed{false};
|
||||
bool m_reload_already = {false};
|
||||
|
||||
std::shared_ptr<std::atomic<bool>> m_reload_cancel_token{std::make_shared<std::atomic<bool>>(false)};
|
||||
std::unique_ptr<boost::thread> m_reload_task;
|
||||
|
||||
@@ -10,8 +10,6 @@ namespace Slic3r { namespace GUI {
|
||||
class RecenterDialog : public DPIDialog
|
||||
{
|
||||
private:
|
||||
wxStaticText* m_staticText_hint;
|
||||
wxStaticBitmap* m_bitmap_home;
|
||||
ScalableBitmap m_home_bmp;
|
||||
wxString hint1;
|
||||
wxString hint2;
|
||||
|
||||
@@ -181,8 +181,6 @@ private:
|
||||
PinCodePanel* m_panel_direct_connection{nullptr};
|
||||
wxWindow* m_placeholder_panel{nullptr};
|
||||
HyperLink* m_hyperlink{nullptr}; // ORCA
|
||||
Label* m_ping_code_text{nullptr};
|
||||
wxStaticBitmap* m_img_ping_code{nullptr};
|
||||
wxBoxSizer * m_sizer_body{nullptr};
|
||||
wxBoxSizer * m_sizer_my_devices{nullptr};
|
||||
wxBoxSizer * m_sizer_other_devices{nullptr};
|
||||
|
||||
@@ -149,7 +149,6 @@ private:
|
||||
ScalableBitmap* print_time{ nullptr };
|
||||
wxStaticBitmap* weightimg{ nullptr };
|
||||
ScalableBitmap* print_weight{ nullptr };
|
||||
wxBoxSizer* m_thumbnail_sizer{ nullptr };
|
||||
ThumbnailPanel* m_thumbnail_panel{nullptr};
|
||||
wxPanel* m_panel_image{ nullptr };
|
||||
wxBoxSizer* m_image_sizer{ nullptr };
|
||||
|
||||
@@ -62,7 +62,6 @@ private:
|
||||
bool m_is_in_sending_mode{ false };
|
||||
bool m_is_rename_mode{ false };
|
||||
bool enable_prepare_mode{ true };
|
||||
bool m_need_adaptation_screen{ false };
|
||||
bool m_export_3mf_cancel{ false };
|
||||
bool m_is_canceled{ false };
|
||||
bool m_tcp_try_connect{true};
|
||||
@@ -81,7 +80,6 @@ private:
|
||||
wxStaticBitmap* m_staticbitmap{ nullptr };
|
||||
ThumbnailPanel* m_thumbnailPanel{ nullptr };
|
||||
ComboBox* m_comboBox_printer{ nullptr };
|
||||
ComboBox* m_comboBox_bed{ nullptr };
|
||||
Button* m_rename_button{ nullptr };
|
||||
Button* m_button_refresh{ nullptr };
|
||||
Button* m_button_ensure{ nullptr };
|
||||
|
||||
@@ -87,7 +87,6 @@ private:
|
||||
std::unordered_map < uint32_t, std::vector<std::vector<FloatPoint>>> parts_triangles_;
|
||||
std::unordered_map < uint32_t, std::vector<std::vector<cv::Point>>> pick_parts_;
|
||||
std::unordered_map<uint32_t, PartState> parts_state_;
|
||||
bool gl_inited_{false};
|
||||
int zoom_percent_{100};
|
||||
wxPoint offset_{0,0};
|
||||
wxPoint drag_start_offset_{0,0};
|
||||
|
||||
@@ -307,8 +307,6 @@ private:
|
||||
// wxBoxSizer * m_plate_combox_sizer = nullptr;
|
||||
wxBoxSizer * m_mode_combox_sizer = nullptr;
|
||||
//wxStaticText * m_printer_title = nullptr;
|
||||
wxStaticText * m_printer_device_name = nullptr;
|
||||
wxStaticText * m_printer_is_map_title = nullptr;
|
||||
|
||||
CapsuleButton * m_colormap_btn = nullptr;
|
||||
CapsuleButton * m_override_btn = nullptr;
|
||||
@@ -326,7 +324,6 @@ private:
|
||||
|
||||
bool m_check_dirty_fialment = true;
|
||||
bool m_expand_more_settings = true;
|
||||
bool m_image_is_top = false;
|
||||
|
||||
const int LEFT_THUMBNAIL_SIZE_WIDTH = 100;
|
||||
const int RIGHT_THUMBNAIL_SIZE_WIDTH = 300;
|
||||
|
||||
@@ -626,8 +626,6 @@ private:
|
||||
bool m_rebuild_kinematics_page = false;
|
||||
void update_input_shaper_menu(GCodeFlavor flavor);
|
||||
|
||||
ogStaticText* m_fff_print_host_upload_description_line {nullptr};
|
||||
ogStaticText* m_sla_print_host_upload_description_line {nullptr};
|
||||
|
||||
std::vector<PageShp> m_pages_fff;
|
||||
std::vector<PageShp> m_pages_sla;
|
||||
|
||||
@@ -31,7 +31,6 @@ private:
|
||||
wxStaticText *m_remaining_time_label;
|
||||
wxStaticText *m_explanation_label;
|
||||
wxButton *m_ok_button;
|
||||
wxStaticBitmap *m_title_bitmap;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
@@ -112,7 +112,6 @@ private:
|
||||
AppConfig m_appconfig_new;
|
||||
|
||||
wxWebView *m_browser;
|
||||
wxButton * m_TestBtn;
|
||||
|
||||
wxString m_SectionName;
|
||||
|
||||
|
||||
@@ -125,10 +125,6 @@ private:
|
||||
wxMenuItem* m_edit_undo;
|
||||
wxMenuItem* m_edit_redo;
|
||||
wxMenuItem* m_edit_mode;
|
||||
wxMenuItem* m_scroll_line_up;
|
||||
wxMenuItem* m_scroll_line_down;
|
||||
wxMenuItem* m_scroll_page_up;
|
||||
wxMenuItem* m_scroll_page_down;
|
||||
wxMenuItem* m_script_string;
|
||||
wxMenuItem* m_script_integer;
|
||||
wxMenuItem* m_script_double;
|
||||
|
||||
@@ -684,7 +684,6 @@ public:
|
||||
|
||||
private:
|
||||
int m_nozzle_num = {1};
|
||||
AMSRoadShowMode m_single_ext_rode_mode = {AMSRoadShowMode::AMS_ROAD_MODE_FOUR};
|
||||
AMSRoadShowMode m_left_rode_mode = {AMSRoadShowMode::AMS_ROAD_MODE_FOUR};
|
||||
AMSRoadShowMode m_right_rode_mode = {AMSRoadShowMode::AMS_ROAD_MODE_FOUR};
|
||||
bool m_selected = {false};
|
||||
@@ -693,7 +692,6 @@ private:
|
||||
int m_right_road_length = {-1};
|
||||
int m_passroad_width = {6};
|
||||
double m_radius = {4};
|
||||
AMSPassRoadType m_pass_road_type = {AMSPassRoadType::AMS_ROAD_TYPE_NONE};
|
||||
AMSPassRoadSTEP m_pass_road_left_step = {AMSPassRoadSTEP::AMS_ROAD_STEP_NONE};
|
||||
AMSPassRoadSTEP m_pass_road_right_step = {AMSPassRoadSTEP::AMS_ROAD_STEP_NONE};
|
||||
|
||||
@@ -866,11 +864,7 @@ private:
|
||||
AMSinfo m_info;
|
||||
wxBoxSizer * sizer_can = {nullptr};
|
||||
wxGridSizer* sizer_can_extra = { nullptr };
|
||||
wxBoxSizer * sizer_humidity = { nullptr };
|
||||
wxBoxSizer * sizer_item = { nullptr };
|
||||
wxBoxSizer * sizer_can_middle = {nullptr};
|
||||
wxBoxSizer * sizer_can_left = {nullptr};
|
||||
wxBoxSizer * sizer_can_right = {nullptr};
|
||||
AMSExtImage* m_ext_image = { nullptr }; //the ext image upon the ext ams
|
||||
AMSExtText* m_ext_text = { nullptr }; //the ext text upon the ext ams
|
||||
};
|
||||
|
||||
@@ -109,7 +109,6 @@ public:
|
||||
void decrease_fan_speeds();
|
||||
private:
|
||||
int m_current_speeds;
|
||||
int m_target_speed;
|
||||
int m_min_speeds;
|
||||
int m_max_speeds;
|
||||
ScalableBitmap m_bitmap_add;
|
||||
|
||||
@@ -204,7 +204,6 @@ private:
|
||||
Label* m_caution;
|
||||
|
||||
wxTimer* m_refresh_timer {nullptr};
|
||||
size_t m_rack_event_token;
|
||||
Button* m_cancel_btn;
|
||||
Button* m_confirm_btn;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user