This commit is contained in:
Vojtech Bubnik 2021-08-20 14:21:33 +02:00
commit c821b0a3ad
17 changed files with 36 additions and 30 deletions

View File

@ -56,4 +56,4 @@ FIND_PATH(DBUS_ARCH_INCLUDE_DIR
SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBus REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(Shiny)
cmake_minimum_required(VERSION 2.6)
add_library(Shiny STATIC
Shiny.h

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(admesh)
cmake_minimum_required(VERSION 2.6)
add_library(admesh STATIC
connect.cpp

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(nowide)
cmake_minimum_required(VERSION 2.6)
add_library(nowide STATIC
nowide/args.hpp

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(clipper)
cmake_minimum_required(VERSION 2.6)
add_library(clipper STATIC
# We are using ClipperLib compiled as part of the libslic3r project using Slic3r::Point as its base type.

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(glu-libtess)
cmake_minimum_required(VERSION 2.6)
add_library(glu-libtess STATIC
src/dict-list.h

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(imgui)
cmake_minimum_required(VERSION 2.6)
add_library(imgui STATIC
imconfig.h

View File

@ -1,5 +1,5 @@
project(libigl)
cmake_minimum_required(VERSION 3.0)
project(libigl)
add_library(libigl INTERFACE)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(miniz)
cmake_minimum_required(VERSION 2.6)
add_library(miniz INTERFACE)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.12)
project(semver)
cmake_minimum_required(VERSION 2.6)
add_library(semver STATIC
semver.c

View File

@ -36,6 +36,8 @@ protected:
void on_exception(const std::exception_ptr &) override;
void process() override;
public:
ArrangeJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater)
: PlaterJob{std::move(pri), plater}
@ -46,8 +48,6 @@ public:
return int(m_selected.size() + m_unprintable.size());
}
void process() override;
void finalize() override;
};

View File

@ -24,6 +24,7 @@ class FillBedJob : public PlaterJob
protected:
void prepare() override;
void process() override;
public:
FillBedJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater)
@ -35,8 +36,6 @@ public:
return m_status_range;
}
void process() override;
void finalize() override;
};

View File

@ -50,10 +50,19 @@ protected:
// Launched just before start(), a job can use it to prepare internals
virtual void prepare() {}
// The method where the actual work of the job should be defined.
virtual void process() = 0;
// Launched when the job is finished. It refreshes the 3Dscene by def.
virtual void finalize() { m_finalized = true; }
virtual void on_exception(const std::exception_ptr &) {}
// Exceptions occuring in process() are redirected from the worker thread
// into the main (UI) thread. This method is called from the main thread and
// can be overriden to handle these exceptions.
virtual void on_exception(const std::exception_ptr &eptr)
{
if (eptr) std::rethrow_exception(eptr);
}
public:
Job(std::shared_ptr<ProgressIndicator> pri);
@ -65,8 +74,6 @@ public:
Job &operator=(const Job &) = delete;
Job &operator=(Job &&) = delete;
virtual void process() = 0;
void start();
// To wait for the running job and join the threads. False is

View File

@ -48,6 +48,7 @@ class RotoptimizeJob : public PlaterJob
protected:
void prepare() override;
void process() override;
public:
@ -55,7 +56,6 @@ public:
: PlaterJob{std::move(pri), plater}
{}
void process() override;
void finalize() override;
static constexpr size_t get_methods_count() { return std::size(Methods); }

View File

@ -10,18 +10,16 @@ class SLAImportJob : public PlaterJob {
std::unique_ptr<priv> p;
protected:
void prepare() override;
void process() override;
void finalize() override;
public:
SLAImportJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater);
~SLAImportJob();
void process() override;
void reset();
protected:
void prepare() override;
void finalize() override;
};
}} // namespace Slic3r::GUI

View File

@ -2334,7 +2334,9 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
else {
model = Slic3r::Model::read_from_file(path.string(), nullptr, nullptr, only_if(load_config, Model::LoadAttribute::CheckVersion));
for (auto obj : model.objects)
if (obj->name.empty())
if (obj->name.empty() ||
obj->name.find_first_of("/") != std::string::npos) // When file is imported from Fusion360 the path containes "/" instead of "\\" (see https://github.com/prusa3d/PrusaSlicer/issues/6803)
// But read_from_file doesn't support that direction separator and as a result object name containes full path
obj->name = fs::path(obj->input_file).filename().string();
}
} catch (const ConfigurationError &e) {

View File

@ -1518,11 +1518,11 @@ void TabPrint::build()
optgroup->append_single_option_line("support_material_auto", category_path + "auto-generated-supports");
optgroup->append_single_option_line("support_material_threshold", category_path + "overhang-threshold");
optgroup->append_single_option_line("support_material_enforce_layers", category_path + "enforce-support-for-the-first");
optgroup->append_single_option_line("raft_first_layer_density", category_path + "raft-first-layer-density");
optgroup->append_single_option_line("raft_first_layer_expansion", category_path + "raft-first-layer-expansion");
optgroup = page->new_optgroup(L("Raft"));
optgroup->append_single_option_line("raft_layers", category_path + "raft-layers");
optgroup->append_single_option_line("raft_first_layer_density", category_path + "raft-first-layer-density");
optgroup->append_single_option_line("raft_first_layer_expansion", category_path + "raft-first-layer-expansion");
optgroup->append_single_option_line("raft_contact_distance");
optgroup->append_single_option_line("raft_expansion");